Question: Galaxy IE - 502 (Bad Gateway)
0
gravatar for marija.durdevic
2.3 years ago by
marija.durdevic10 wrote:

Hi all,

I am trying to integrate IE (jupyter and rstudio) into my galaxy server. I am following instructions from here and galaxy wiki page.

My galaxy.ini is:

dynamic_proxy_manage=True
dynamic_proxy_session_map=database/session_map.sqlite
dynamic_proxy_bind_port=8800
dynamic_proxy_bind_ip=0.0.0.0
dynamic_proxy_debug=True
dynamic_proxy_external_proxy=True
dynamic_proxy_prefix=gie_proxy

And Nginx configuration file:

# Global GIE configuration
location /gie_proxy {
    proxy_pass http://localhost:8800/gie_proxy;
    proxy_redirect off;
}

# IPython specific. Other IEs may require their own routes.
location /gie_proxy/ipython/api/kernels {
    proxy_pass http://localhost:8800/gie_proxy/ipython/api/kernels;
    proxy_redirect off;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

Galaxy log file:

galaxy.web.base.interactive_environments INFO 2016-07-27 14:01:45,141 Starting docker container for IE jupyter with command [docker run --sig-proxy=true -e DEBUG=true -e DEFAULT_CONTAINER_RUNTIME=120 -e "GALAXY_URL=https://galaxy.medunigraz.at" -e "CORS_ORIGIN=https://galaxy.medunigraz.at" -e "GALAXY_WEB_PORT=None" -e "HISTORY_ID=218251f991cbe2f9" -e "NOTEBOOK_PASSWORD=none" -e "DATASET_HID=None" -e "PROXY_PREFIX=/gie_proxy/jupyter" -e "API_KEY=b27201ca5ac4cc7e469c77f13ad05b91" -e "REMOTE_HOST=10.200.168.222" -e "USER_EMAIL=marija.durdevic@medunigraz.at" -d -P   bgruening/docker-jupyter-notebook:16.01]
galaxy.web.base.interactive_environments DEBUG 2016-07-27 14:01:46,982 Container id: 441fbecd4348167ed31536565ddb2a71ece1e9f0e6fc11438f834b07c5aa0523
galaxy.web.base.interactive_environments INFO 2016-07-27 14:01:46,983 Inspecting docker container 441fbecd4348167ed31536565ddb2a71ece1e9f0e6fc11438f834b07c5aa0523 with command [docker inspect 441fbecd4348167ed31536565ddb2a71ece1e9f0e6fc11438f834b07c5aa0523]
galaxy.web.proxy INFO 2016-07-27 14:01:47,052 Attempting to start dynamic proxy process
galaxy.web.proxy DEBUG 2016-07-27 14:01:47,053 Cmd: lib/galaxy/web/proxy/js/lib/main.js --sessions /home/data/galaxy_database/session_map.sqlite --ip 0.0.0.0 --port 8800 --verbose
10.200.168.222 - - [27/Jul/2016:14:01:45 +0200] "GET /plugins/interactive_environments/jupyter/show?dataset_id=d4870b8b64a5b380 HTTP/1.1" 200 - "https://galaxy.medunigraz.at/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
[pid: 5599|app: 0|req: 30/47] 10.200.168.222 () {46 vars in 1016 bytes} [Wed Jul 27 14:01:45 2016] GET /plugins/interactive_environments/jupyter/show?dataset_id=d4870b8b64a5b380 => generated 1641 bytes in 2058 msecs (HTTP/1.1 200) 2 headers in 73 bytes (1 switches on core 1)

IE is not working and error message is 502 (Bad Gateway).

Can anybody help me with this please?

Regards, Marija

galaxy • 1.8k views
ADD COMMENTlink modified 2.3 years ago by nitesh.turaga100 • written 2.3 years ago by marija.durdevic10
3
gravatar for nitesh.turaga
2.3 years ago by
nitesh.turaga100
United States
nitesh.turaga100 wrote:

Can you try docker inspect <container> on the image? And post the json?

ADD COMMENTlink modified 2.3 years ago • written 2.3 years ago by nitesh.turaga100

Here is the json file when I did docker inspect.

ADD REPLYlink written 2.3 years ago by marija.durdevic10

Can you try to npm install again? and maybe see if that process is working properly.

ADD REPLYlink written 2.3 years ago by nitesh.turaga100
1

I fixed my error adding additional code in nginx config:

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
proxy_set_header        Host            $host;
proxy_set_header        X-Real-IP       $remote_addr;
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;

Now I am having issue that dynamic_proxy_manage=True is not working properly. I have to run it manually and then jupyter works:

node galaxy/lib/galaxy/web/proxy/js/lib/main.js --sessions /home/data/galaxy_database/session_map.sqlite --ip 0.0.0.0 --port 8800 --verbose
ADD REPLYlink written 2.3 years ago by marija.durdevic10
0
gravatar for Jennifer Hillman Jackson
2.3 years ago by
United States
Jennifer Hillman Jackson25k wrote:

Hello,

iPython for GIEs has been deprecated as of 16.04. Jupyter replaces it and will be fully incorporated into the upcoming 16.07 release.

The change is captured in this prior Q&A C: Ipython on local galaxy - and we will be updating the wiki to reflect the changes/include the link below.

How to set up a GIE: http://galaxy.readthedocs.io/en/master/admin/interactive_environments.html

Hopefully this helps! The development is new, please let us know if you have any issues.

Thanks, Jen, Galaxy team

ADD COMMENTlink written 2.3 years ago by Jennifer Hillman Jackson25k

Ps: I updated the http://galaxyproject.org wiki to note the changes and to link to the documentation, for others looking for the same help. Please see: https://wiki.galaxyproject.org/Admin/GIEs

ADD REPLYlink written 2.3 years ago by Jennifer Hillman Jackson25k
0
gravatar for marija.durdevic
2.3 years ago by
marija.durdevic10 wrote:

Hi,

Thank you for the answer. I sow changing from iPython to Jupyter and I adapt my nginx. config file:

#Global GIE configuration
location /gie_proxy {
proxy_pass http://localhost:8800/gie_proxy;
proxy_redirect off;
}

# IPython specific. Other IEs may require their own routes.
 location /gie_proxy/jupyter/api/kernels {
proxy_pass http://localhost:8800/gie_proxy/gie_proxy/jupyter/api/kernels;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

Everything is the same! I cannot realize where the problem is?

ADD COMMENTlink written 2.3 years ago by marija.durdevic10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 169 users visited in the last hour