Comments (35)
Hi, using @Nobody84's information, I've run
$ docker run -d --name sharemongo mongo:latest
$ docker run -d --name shareredis redis:latest
$ docker run -d -P -p 80:80 -v /opt/sharelatex --env SHARELATEX_MONGO_URL=mongodb://mongo/sharelatex --end SHARELATEX_REDIS_HOST=redis --link sharemongo:mongo --link shareredis:redis --name sharelatex sharelatex/sharelatex
and it seems to work
from docker-image.
Correction to @Valantin's (very helpful!) comment: --end should be --env in the last command. Fixed command below.
$ docker run -d -P -p 80:80 -v /opt/sharelatex --env SHARELATEX_MONGO_URL=mongodb://mongo/sharelatex --env SHARELATEX_REDIS_HOST=redis --link sharemongo:mongo --link shareredis:redis --name sharelatex sharelatex/sharelatex
from docker-image.
here the solution which works for me
sudo docker run -d --name sharemongo -v /var/mongodb:/data/db mongo:2.6
sudo docker run -d --name shareredis -v /var/redis:/var/lib/redis redis:latest
sudo docker run -d -P -p 5000:80 -v /var/sharelatex:/var/lib/sharelatex --env SHARELATEX_MONGO_URL=mongodb://mongo/sharelatex --env SHARELATEX_REDIS_HOST=redis --env [email protected] --link sharemongo:mongo --link shareredis:redis --name sharelatex sharelatex/sharelatex
and
sudo docker exec sharelatex /bin/bash -c "cd /var/www/sharelatex/web; grunt create-admin-user --email [email protected]"
thanks to @Valantin @marcodussin
from docker-image.
$ git clone https://github.com/sharelatex/sharelatex
$ cd sharelatex
$ sudo docker-compose up
If you have something at port 80 running, change the docker-compose.yml
from
ports:
- 80:80
to
ports:
- 5123:80
(if 5123 is free - the right 80 is the port within the container, the left 80 is the port on the host)
Then go to http://localhost:5123/launchpad to create the admin account.
Then execute the following two commands to update to full LaTeX.
$ sudo docker exec sharelatex tlmgr update --self
$ sudo docker exec sharelatex tlmgr install scheme-full
from docker-image.
On CentOS 7.0 we originally had this problem as we did not have mongodb or redis installed.
Installed mongodb according to the instructions here : http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat/
Note that you must copy the /etc/mongod.conf.rpm.new over to /etc/mongod.conf and change the bindIP parameter to what it is in the sharelatex docker install [the ip of the docker0 interface]
Redis was simply installed via yum, change the bind parameter as in the docs. [the ip of the docker0 interface]
After that I was able to restart sharelatex [docker restart sharelatex] and everything worked perfectly.
Let me suggest that the installation instructions should have the installation of mongodb and redis BEFORE the docker command to start the sharelatex image. It is really a prerequisite for the docker installation to work, so it logically should be put before the step of pulling the image and running the instance. I think many users would be confused by the current description as it sort of implies that you can run sharelatex without them.
from docker-image.
Thanks to @benoitldr for your instructions.
For those that also struggled with mongos official MongoDB 2.6 Docker container image. I struggled over this issue:
"2016-04-15T10:20:46.596+0000 [initandlisten] exception in initAndListen: 28574 Cannot start server. Detected data files in /data/db created by storage engine 'wiredTiger'. The configured storage engine is 'mmapv1'., terminating"
The solution that works for me (Most probably get rid off the resources stuff):
MongoDB (if you need auth, definitively change it!)
docker run -d --name sharemongo --cpuset-cpus=5 -m 2048m -e AUTH=no tutum/mongodb
Redis
docker run -d --name shareredis --cpuset-cpus=6 -m 2048m -v /var/redis:/var/lib/redis redis
Sharelatex
docker run -d --cpuset-cpus=2,3 -m 4096m -P -p 5000:80 -v /var/sharelatex_data:/var/lib/sharelatex --env SHARELATEX_MONGO_URL=mongodb://mongo/sharelatex --env SHARELATEX_REDIS_HOST=redis --env [email protected] --link sharemongo:mongo --link shareredis:redis --name sharelatex sharelatex/sharelatex
Setting up admin
docker exec sharelatex /bin/bash -c "cd /var/www/sharelatex/web; grunt create-admin-user --email [email protected]"
Cheers,
Miau
from docker-image.
same error 👎
from docker-image.
Hi, I've docker 1.3.3 on debian 8, run the container using "docker run -d -v /opt/sharelatex/:/var/lib/sharelatex --name=sharelatex -p 80:80 sharelatex/sharelatex", also with the command suggested in the readme and I have same issue.
What error you talking about?
from docker-image.
What i was saying is that I have the same error/issue...
from docker-image.
@marcodussin sorry, my misunderstanding
from docker-image.
I got the same error when I pull the docker image or build it. However, I think the 502 error is not related to a port problem but to a problem with the nodejs service: when I launch the sharelatex docker container, I observe that nodejs consume 100% of my cpu time. IMHO I think the 502 error come from the fact that nodejs do not answer to requests.
Updating the system and sharelatex in the docker image do not solve the problem.
Edit: tests were done with docker 1.5.0 under debian 7.8 with backported kernel from wheezy-backport.
from docker-image.
Same here. Using docker with Fedora 21.
nginx/1.4.6 (Ubuntu) just responds with 502 Bad Gateway
from docker-image.
Same here with utopic and docker 1.5.0. All 10 node processes seem to run and web.log says "web-sharelatex listening on port 3000" (i.e. it doesn't crash because it can't connect to the mongodb).
Hope somebody can look into this.
from docker-image.
It seems sharelatex team is ignoring us...
from docker-image.
same here.
from docker-image.
dito
from docker-image.
same here:
Host:
Debian 7.8
Docker version:
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
from docker-image.
I recognized that mongodb-server and redis-server were not installed on the host.
Install the mongodb and redis as described here [https://github.com/sharelatex/sharelatex/wiki/Dependencies]
and changing the conifg as described here [https://github.com/sharelatex/sharelatex-docker-image#mongo-and-redis] solved the problem for me.
from docker-image.
it works for me too. ATTENTION: if you have troubles with mongo drivers (e.t. on ubuntu) refer to #7 and install mongo using
$ docker run -d --name sharemongo mongo:2.6.9
from docker-image.
Hi guys...I have tried all your suggestions, but none of them worked for me. I am on Fedora 22 server and I have followed the instructions from @Valantin in the exact order but nothing...I am still having the Error 502
Any other help will be REALLY appreciated!
Thank you guys
from docker-image.
Hey, if you look in side the docker container at /var/log/sharelatex is there anything interesting in the logs?
from docker-image.
Hi @henryoswald ... sadly I have found the following erros:
./web.log:Exception: Error: failed to connect to [mongo:27017]
./document-updater.log:Error: Redis connection to redis:6379 failed - connect EHOSTUNREACH
./real-time.log:Error: Redis connection to redis:6379 failed - connect EHOSTUNREACH
but I am not able to fix them...any hint? :D
from docker-image.
It looks like the docker container can not see wherever you are pointing mongodb/redis, are you sure your SHARELATEX_MONGO_URL etc are correct?
from docker-image.
I have just copy/paste what I found in this page....this is my first run with docker...how can I check them? and what do they point to?
thanks for your help!
from docker-image.
Do you have your own instance of mongodb and redis running? This isn't todo
with docker at this point if they are not yet running locally. If you go
through https://github.com/sharelatex/sharelatex-docker-image it should
explain how you need to set them up. You can check they are live by trying
to access them via the standard command line tools like redis-cli and mongo
On Thu, Jul 30, 2015 at 11:15 PM, 84matte84 [email protected]
wrote:
I have just copy/paste what I found in this page....this is my first run
with docker...how can I check them? and what do they point to?thanks for your help!
—
Reply to this email directly or view it on GitHub
#2 (comment)
.
Henry Oswald
shareLaTeX.com co-founder
from docker-image.
Have you checked your firewall settings? Fedora 22 comes with firewalld enabled, including some rules for all interfaces, especially blocking connections from the "outside".
from docker-image.
Sorry for the late reply....I tried both your hints but still I am having the Error 502 when trying to open sharelatex from another pc in the same LAN...
this is the situation:
1)I have used "dockerhost" as written in the manual and also used the right container names to link them correctly from sharelatex container and now my log directory has no errors:
root@aa853970c089:/# grep -Ri error /var/log/sharelatex/
Furthermore I have checked the iptables and what should be there seems to be there as following:
sudo iptables -L -n -t nat | grep -i docker
DOCKER all -- 0.0.0.0/0 0.0.0.0/0 ADDRTYPE match dst-type LOCAL
DOCKER all -- 0.0.0.0/0 !127.0.0.0/8 ADDRTYPE match dst-type LOCAL
Chain DOCKER (2 references)
But still I cannot access sharelatex...what should I do/check next?
Thank you for your help!
from docker-image.
Hi everyone, i also used exactly same as @benoitldr did (just changed 5000 to 5050 and volume shares). Now i can access the web page of share latex, create accounts but LaTeX throws me error that:
"Server Error Sorry, something went wrong and your project could not be compiled. Please try again in a few moments."
Also if i try to upload my files (as .zip) it does not upload rather asks if its a correct zip file?
Can anybody help me. If you need some logs i can provide it. I am not sure where to look at. There is also another tread open, but no answers yet. Since i used the method you guys mentioned i thought i could get a quick help.
I will also post this message to that thread. or you can help me in that thread
I am a beginner and using docker for first time. Thank you!
from docker-image.
I think i figure it out. It is about the permissions to the folders of mongo, share latex and redis. For now i have given read/write permission to everyone and it is working fine. I will change the permission till it works.
from docker-image.
Still not working for me, unfortunately. I followed all the steps as described by @benoitldr, changed 5000 to 4050 as well as the volume paths. But when I enter the create-admin-user task, i get:
Running "create-admin-user" task
Fatal error: driver is incompatible with this server version
If I go to http://mylocalip:4050/, I still get 502 Bad Gateway
I'm running this on a NAS by Synology - does anyone have a suggestion? Thx!
from docker-image.
Ok i think you are using latest version of mongodb:latest or higher than 2.6.x. Use version 2.6 It will work. I was getting the same issue, installed ver 2.6 and it worked. Try that.
from docker-image.
@Valantin @marcodussin @benoitldr based on your instructions, did you manage to launch sharelatex on system start up?
Adding the parameters --restart always during the docker run command breakes the container (container can't be started at all). I also tried these steps https://docs.docker.com/engine/admin/host_integration/
from docker-image.
@MarcoMeter I tried that link but keep getting "Error response from daemon: Cannot link to a non running container: /sharemongo AS /sharelatex/mongo". How do you guys make sharelatex autostart on reboot? Thanks. I think I need to figure out how to start sharemongo and shareredis to start before sharelatex.
from docker-image.
After changing the IP of the Docker Bridge, I'm facing again the 502 issue. I had to change the IP due to access issues (after installing docker access within the intranet didn't work while access from the internet was working).
So I tried to bind Mongo and Redis to the IP of the Network Bridge using their respective configs without any success. Any ideas?
Edit:
I originally set the IP of docker to something like 10.177.11.12/24. So the first docker container would use 10.177.11.1 as ip adress which conflicts with the gateway of my subnet, so I gave docker a different one like 10.177.111.1/24. Now everything seems to work accordingly.
Edit 2:
I didn't work on the restart issue, yet.
from docker-image.
This is a bit of a dumping ground of random errors so closing for moment to keep on top of things. There is a new docker image available now with better logging that should help problems.
from docker-image.
Related Issues (20)
- How to migrate server? HOT 4
- Docstore API Responded with Non-Success Code: 301 HOT 3
- Missing directory `modules` HOT 1
- Project doesn't build HOT 2
- Please update quickstart guide HOT 2
- Cached/maked files not found by pdflatex. \tikzexternalize[mode=list and make] not working. HOT 1
- Protected MongoDB -> history and spellcheck disabled HOT 1
- docker-compose UnicodeEncodeError HOT 1
- Latest/v0.6.3 docker hub images uses depreciated 2016 texlive HOT 3
- http/2 with ProxyPass not working HOT 1
- er ps
- migrations do not work: TypeError: db.collection is not a function HOT 1
- Can't handle RDB format version 8 – 502 Bad Gateway
- Issue with Building a Docker Image then Running ShareLatex HOT 9
- TeXLive package manager requires an upgrade! HOT 16
- runit run files missing after container restart HOT 1
- base image (phusion/baseimage:0.9.16) still depends on ubuntu 14.04 HOT 2
- Branch sk-update-mongojs for contacts-sharelatex git repo is missing HOT 1
- Increase compilation timeout HOT 1
- Request validation needed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-image.