Some days ago we identified that our Wiki project stopped pushing to remote repository.
Our project was correctly configured since it already had pushed modifications automatically several times before. But now the modifications are being committed and the push do not occur, although we can go to repository folder and do the "git push" manually.
Any ideas about this issue?
@adrianokerbermenvia are you working with the master branch or is there a different branch in your repository?
@XerqJon We are currently working with the branch master as the default (There are no other branches on the repository).
Ok. I have nothing else to add - sorry. I had a problem previously with a non-master branch but that is likely not relevant.
I tried to identify the problem. It seems that the function resync() from git.js is called just when wiki starts, so it will never fetch the data neither push the commits.
Also the logs are written just right after the wiki is started. Then the logs stop and won't be written again unless the wiki is restarted
git push origin master from your /repo folder?node wiki start or directly node server?@NGPixel
git push from the folder /repo.node wiki start to run the Wiki.I have the same problem, pushing was working before, now it isn't. I have wiki and copy of repo on the same server.
In my case it is a problem with agent. I diagnosed that last output in wiki-output-0.log was when pushing still worked. Now agent works only immediatly after npm run restart command, put some output like:
2017-11-24T11:45:41.103Z - info: [SERVER] Search index flushed and ready.
2017-11-24T11:45:41.328Z - info: [SERVER] Git repository is OK.
2017-11-24T11:45:41.441Z - info: [AGENT] Background Agent is initializing...
2017-11-24T11:45:43.254Z - info: [AGENT] Checking Git repository...
2017-11-24T11:45:52.421Z - info: [AGENT] Running all jobs...
2017-11-24T11:45:52.423Z - info: [AGENT] Performing pull from remote Git repository...
2017-11-24T11:45:52.475Z - info: [AGENT] Git repository is OK.
2017-11-24T11:45:52.483Z - info: [AGENT] Git Pull completed.
2017-11-24T11:45:52.498Z - info: [AGENT] Git Push skipped. Repository is already in sync.
2017-11-24T11:45:58.150Z - info: [AGENT] All jobs completed successfully! Going to sleep for now.
and then do nothing at all.
I dealt with this problem by restarting server and start mongo and then wiki again. I don't know how invoke this problem again... but probably by running some .js file by myself for example:
node ./server/index.js
and then u could see two parallel processes:
node ~/wiki/server
node ~/wiki/server/index.js
which they interfere each other and self replicant and so on...
I haven't tried to repeat this bug so I'm not sure (if my pointing of cause is correct), but it is easy to check.
I have the same problem (git pushes only after restart).
There is following error in /logs/wiki-stderr.log after each change in wiki page
Unhandled rejection RangeError: Array buffer allocation failed
at new ArrayBuffer (<anonymous>)
at typedArrayConstructByLength (<anonymous>)
at new Uint8Array (native)
at new FastBuffer (buffer.js:38:5)
at Function.Buffer.alloc (buffer.js:243:10)
at new Buffer (buffer.js:156:19)
at new Jimp (/var/wiki/node_modules/jimp/index.js:150:22)
at Jimp.clone (/var/wiki/node_modules/jimp/index.js:541:17)
at Jimp.contain (/var/wiki/node_modules/jimp/index.js:1859:18)
at jimp.read.then.img (/var/wiki/server/libs/uploads-agent.js:237:10)
at <anonymous>
@vrabcak Looks like you're running out of memory...
I work with @adrianokerbermenvia and I finally figured out what was the issue. It was related to the mathjax as reported in the issue #327.
After changing the mathjax setting on the config.yml to false it started working properly.
When is the wiki supposed to _push_ to the remote repo? It doesn't seem to push automatically, so I had to run git push origin master manually. Each edit is committed though.
A git push (and pull) occurs every 5 minutes.
Woke up to my log filled with these errors:
2018-03-02T09:35:00.563Z - ^[[31merror^[[39m: [AGENT] Unable to push changes to remote Git repository!
2018-03-02T09:35:00.566Z - ^[[31merror^[[39m: [AGENT] One or more jobs have failed:
{ code: ^[[33m128^[[39m,
message: ^[[32m'`git --git-dir=repo/.git --work-tree=repo push origin master` failed with code 128'^[[39m,
stderr: ^[[32m'fatal: could not read Username for \'https://github.com\': No such device or address\n'^[[39m,
stdout: ^[[32m''^[[39m }
Looks like config.yml has a default username and password. Hmm, I wasn't prompted for credentials when I set this thing up. edit: I'm still getting the error even with a username/password set.
Im using source and when pushing i get this popup?
Ive clones the wiki repo using the url we see on the wiki page. I find it weird that i get this popup. In the settings it looks different then a regular repo.

EDIT
after a quick check with a regular repo i noticed the difference. In the settings of a repo, the remote path is like this;
https://[email protected]/USERNAME/REPONAME.git
However when i clone a wikie page, i get this address and this is also added as a remote address. Which give errors in return.
https://github.com/USERNAME/REPONAME.wiki.git
It's pushing only to the repository whenever I did a restart on the Docker container.
@NGPixel Is there somewhere to configure how often the git agent syncs ?
I have the same problem (git pushes only after restart).
I run wiki.js on a single CPU, 500MB memory VPS with CentOS 7, behind a nginx server, and start wiki.js using node wiki start.
I can run a git push origin master from my /repo folder.
I have already changed mathjax setting on the config.yml to false, but it doesn't help.
A reverse proxy is deployed on nginx to map http:80 to 3001.
I was unable to run the configure mode behind nginx, so I edited config.yml manually, according to a test instance running on my local macOS machine without nginx, which automatically sync with git periodically without any problem.
logs/wiki-output-0.log is like this:
2019-02-12T03:59:12.917Z - info: [SERVER] Wiki.js is initializing...
2019-02-12T03:59:13.446Z - info: [SERVER] Checking data directories...
2019-02-12T03:59:13.461Z - info: [SERVER] Data and Repository directories are OK.
2019-02-12T03:59:14.477Z - info: [SERVER] Checking Git repository...
2019-02-12T03:59:18.653Z - info: [SERVER] Starting HTTP/WS server on port 3001...
2019-02-12T03:59:18.727Z - info: [SERVER] HTTP/WS server started successfully! [RUNNING]
2019-02-12T03:59:19.055Z - info: [SERVER] Search index flushed and ready.
2019-02-12T03:59:19.462Z - info: [SERVER] Git repository is OK.
2019-02-12T03:59:19.536Z - info: [AGENT] Background Agent is initializing...
2019-02-12T03:59:21.511Z - info: [AGENT] Checking Git repository...
2019-02-12T03:59:24.466Z - info: [AGENT] Git repository is OK.
2019-02-12T03:59:24.503Z - info: [AGENT] Running all jobs...
2019-02-12T03:59:24.509Z - info: [AGENT] Performing pull from remote Git repository...
2019-02-12T03:59:25.073Z - info: [AGENT] Git Pull completed.
2019-02-12T03:59:25.190Z - info: [AGENT] Git Push skipped. Repository is already in sync.
2019-02-12T03:59:26.752Z - info: [AGENT] All jobs completed successfully! Going to sleep for now.
And logs/wiki-error-0.log is empty, even after I make some editing, save, and wait for at least 5 minutes.
It seems that the AGENT never resurrect after sleep...
Is there a way to further investigate the issue?
Thanks for any help or hint~
Woke up to my log filled with these errors:
2018-03-02T09:35:00.563Z - ^[[31merror^[[39m: [AGENT] Unable to push changes to remote Git repository! 2018-03-02T09:35:00.566Z - ^[[31merror^[[39m: [AGENT] One or more jobs have failed: { code: ^[[33m128^[[39m, message: ^[[32m'`git --git-dir=repo/.git --work-tree=repo push origin master` failed with code 128'^[[39m, stderr: ^[[32m'fatal: could not read Username for \'https://github.com\': No such device or address\n'^[[39m, stdout: ^[[32m''^[[39m }Looks like
config.ymlhas a default username and password. Hmm, I wasn't prompted for credentials when I set this thing up. edit: I'm still getting the error even with a username/password set.
First check to see that that you are using the git link for SSH, not HTTP (default when cloning with github).
Then make sure that your directory has permission to access the folder that contains the SSH key.
After upload 60M file, it stopped ,like this :
global.winston.warn('Previous job has not completed gracefully or is still running! Skipping for now. (This is not normal, you should investigate)')
Only restart can fix this?
This is unrelated and simply means the previous sync isn't finished yet, so the new one will skipped. This isn't an error, it just means the push is taking long which might indicate an issue.
Most helpful comment
I work with @adrianokerbermenvia and I finally figured out what was the issue. It was related to the mathjax as reported in the issue #327.
After changing the mathjax setting on the config.yml to false it started working properly.