
Open the doc without errors ! :)
When I open a project, I have this error. When I change the file in the editor I get the same error.
But when I came back on the first file, Sharelatex open it without issue.
It seems that I have to open 2 times a file to open it without error.
It seems also that Sharelatex can compile without error.
I'm using Docker on Synology NAS. I'm not using docker-compose file but I managed to get up and running 3 docker (Redis 5.0.7 / mongodb 4.2.2 / and Sharelatex 2.0.2 )
Please find the 3 docker config:
Sharelatex_Redis.txt
Sharelatex_MongoDB.txt
Sharelatex.txt
I found this error in the real-time.log file:
{"name":"real-time","hostname":"Sharelatex","pid":145,"level":50,"project_id":"5e13bbc73e1b6b00933db5c6","doc_id":"5e13bbc83e1b6b00933db5d1","user_id":"5e13bba13e1b6b00933db5c2","fromVersion":-1,"client_id":"hdSnWTG5TozCeaG4EjnI","err":{"message":"Connection is closed.","name":"Error","stack":"Error: Connection is closed.
at Redis.sendCommand (/var/www/sharelatex/real-time/node_modules/ioredis/built/redis/index.js:557:24)
at Redis.subscribe (/var/www/sharelatex/real-time/node_modules/ioredis/built/commander.js:123:21)
at Object.subscribe (/var/www/sharelatex/real-time/app/js/ChannelManager.js:28:36)
at /var/www/sharelatex/real-time/app/js/DocumentUpdaterController.js:69:42
at EventEmitter.<anonymous> (/var/www/sharelatex/real-time/app/js/DocumentUpdaterController.js:72:11)
at emitOne (events.js:96:13)
at EventEmitter.emit (events.js:188:7)
at Object.joinEntity (/var/www/sharelatex/real-time/app/js/RoomManager.js:78:20)
at Object.joinDoc (/var/www/sharelatex/real-time/app/js/RoomManager.js:27:19)
at /var/www/sharelatex/real-time/app/js/WebsocketController.js:163:30
"},"msg":"server side error in joinDoc","time":"2020-01-07T16:25:09.583Z","v":0}
(node:145) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 53): Error: Connection is closed.
This seems to point out the Redis installation but in the Sharelatex init it pass the check:
Checking can connect to mongo and redis
Running "check:redis" task
Checking can connect to redis
node_redis: Warning: Redis server does not require a password, but a password was supplied.
OK.
Done, without errors.
Running "check:mongo" task
Checking can connect to mongoOK.
Done, without errors.
All checks passed
I tried to clean all data from the 3 dockers with no luck.
Did you already encounter this ? It's been multiple days that I'm on this ... I'm a little bit out of idea ...
Regards
I had the exactly the same issue. What is worse, you cannot really do any new edits. It will report lost connection after you try to compile or save.
It's good to see that I'm not crazy...
Did you manage to get rid of this one ?
Hi @Zeawiel, thanks for bringing this to our attention.
So this seems to be an issue with the connection between the main sharelatex container and redis. Have you checked that the Redis container is up and accepting connections?
It's possible that the redis container is falling over some time after it starts.
Could you also check if rebooting the sharelatex container fixes the issue? (Even temporarily?)
I had a similar (same I don't know) Issue, setting SHARELATEX_REDIS_HOST and REDIS_HOST (You have to set both) solved the problem.
https://github.com/overleaf/overleaf/wiki/Configuring-Overleaf
That might also be a networking issue. When using some launching method different than docker-compose we're not controlling networking as we should. It's possible that redis pub/sub doesn't work as expected due to redis and sharelatex container not running in the same network.
Most helpful comment
I had a similar (same I don't know) Issue, setting SHARELATEX_REDIS_HOST and REDIS_HOST (You have to set both) solved the problem.
https://github.com/overleaf/overleaf/wiki/Configuring-Overleaf