Question: How to make galaxy accessible through the network?
0
gravatar for Marc
3.6 years ago by
Marc30
United Kingdom
Marc30 wrote:

Hi, 

In the galaxy.ini file, there's the following setting.

# The address on which to listen.  By default, only listen to localhost (Galaxy

# will not be accessible over the network).  Use '0.0.0.0' to listen on all

# available network interfaces.

#host = 127.0.0.1/

What can I do to make it accessible over the network?

Thanks

 

galaxy • 1.6k views
ADD COMMENTlink modified 3.6 years ago by Dannon Baker3.7k • written 3.6 years ago by Marc30
0
gravatar for Dannon Baker
3.6 years ago by
Dannon Baker3.7k
United States
Dannon Baker3.7k wrote:

If you set 'host' to 0.0.0.0, Galaxy will listen on your local network instead of just the loopback device, so:

 

host=0.0.0.0

 

(note that the # is removed)

ADD COMMENTlink written 3.6 years ago by Dannon Baker3.7k

My galaxy is running on a vm in the cloud, I've tried the setting you mentioned and it didn't work. What I'm trying to do is access the web interface host by the cloud vm in my local machine.

ADD REPLYlink written 3.6 years ago by Marc30

Ahh, I assumed you were running a local Galaxy.  Can you give more details about how you're running this cloud vm?

ADD REPLYlink written 3.6 years ago by Dannon Baker3.7k

Yeah, I'm running a local Galaxy. My vm is a Microsoft azure vm running a ubuntu environment.

ADD REPLYlink written 3.6 years ago by Marc30

Ahh!  Ok, that helps a ton.  What you probably need to do is expose port 8080 (or 80, and make sure to run Galaxy on port 80) in the Azure VM.  I don't have hands-on experience with this, but I can dig if you're not able to find it.

ADD REPLYlink written 3.6 years ago by Dannon Baker3.7k

what do you mean by expose port 8080? At the vm? 

ADD REPLYlink written 3.6 years ago by Marc30

Right, you need to do something like this:  http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-set-up-endpoints/

Which allows the external world to communicate with the VM on port 8080 (or whatever you want to run Galaxy on)

ADD REPLYlink written 3.6 years ago by Dannon Baker3.7k

I can't post yesterday coz I'm new to this cite. I tried your way before and i didn't get it to work. I tried with the DNS, PUBLIC VIRTUAL IP (VIP) ADDRESS, but still it didn't work. Can you help?

ADD REPLYlink written 3.6 years ago by Marc30

So you set up a public endpoint for "Galaxy", mapping TCP on port 8080 internal to port 8080 external, and when running Galaxy it does not respond?

ADD REPLYlink written 3.6 years ago by Dannon Baker3.7k

This is the last part of the message when i do "sh run.sh"

##########################

galaxy.queue_worker INFO 2015-05-06 15:01:15,130 Initalizing Galaxy Queue Worker on sqlalchemy+sqlite:///./database/control.sqlite?isolation_level=IMMEDIATE

Starting server in PID 16482.

serving on http://127.0.0.1:8080

########################

but I don't know what to use as the url to access this server

 

ADD REPLYlink written 3.6 years ago by Marc30

Ok, so that means it's actually running and listening to the loopback adapter I mentioned before, so you'll need to change the galaxy.ini (*NOT* the galaxy.ini.sample -- you need to make your own copy as galaxy.ini for edits) to have host=0.0.0.0

ADD REPLYlink written 3.6 years ago by Dannon Baker3.7k

Just to make sure, I copied everything here:

########################################

# ---- HTTP Server ----------------------------------------------------------

 

# Configuration of the internal HTTP server.

 

[server:main]

 

# The internal HTTP server to use.  Currently only Paste is provided.  This

# option is required.

use = egg:Paste#http

 

# The port on which to listen.

#port = 80

 

# The address on which to listen.  By default, only listen to localhost (Galaxy

# will not be accessible over the network).  Use '0.0.0.0' to listen on all

# available network interfaces.

host = 0.0.0.0/

 

# Use a threadpool for the web server instead of creating a thread for each

# request.

use_threadpool = True

 

# Number of threads in the web server thread pool.

#threadpool_workers = 10

 

# Set the number of seconds a thread can work before you should kill it

# (assuming it will never finish) to 3 hours.  Default is 600 (10 minutes).

threadpool_kill_thread_limit = 10800

##########################################

Once I change the host, the server couldn't start:

##########################################

galaxy.webapps.galaxy.buildapp ERROR 2015-05-06 15:26:59,704 Unable to dispose of pooled toolshed install model database connections.

Traceback (most recent call last):

  File "/home/azureuser/galaxy/lib/galaxy/webapps/galaxy/buildapp.py", line 113, in app_factory

    galaxy.model.tool_shed_install.mapping.metadata.bind.dispose()

AttributeError: 'NoneType' object has no attribute 'dispose'

galaxy.queue_worker INFO 2015-05-06 15:26:59,705 Initalizing Galaxy Queue Worker on sqlalchemy+sqlite:///./database/control.sqlite?isolation_level=IMMEDIATE

Starting server in PID 16545.

Traceback (most recent call last):

  File "./scripts/paster.py", line 37, in <module>

    serve.run()

  File "/home/azureuser/galaxy/lib/galaxy/util/pastescript/serve.py", line 1049, in run

    invoke(command, command_name, options, args[1:])

  File "/home/azureuser/galaxy/lib/galaxy/util/pastescript/serve.py", line 1055, in invoke

    exit_code = runner.run(args)

  File "/home/azureuser/galaxy/lib/galaxy/util/pastescript/serve.py", line 220, in run

    result = self.command()

  File "/home/azureuser/galaxy/lib/galaxy/util/pastescript/serve.py", line 670, in command

    serve()

  File "/home/azureuser/galaxy/lib/galaxy/util/pastescript/serve.py", line 654, in serve

    server(app)

  File "/home/azureuser/galaxy/lib/galaxy/util/pastescript/loadwsgi.py", line 292, in server_wrapper

    **context.local_conf)

  File "/home/azureuser/galaxy/lib/galaxy/util/pastescript/loadwsgi.py", line 97, in fix_call

    val = callable(*args, **kw)

  File "/home/azureuser/galaxy/eggs/Paste-1.7.5.1-py2.7.egg/paste/httpserver.py", line 1342, in server_runner

    serve(wsgi_app, **kwargs)

  File "/home/azureuser/galaxy/eggs/Paste-1.7.5.1-py2.7.egg/paste/httpserver.py", line 1291, in serve

    request_queue_size=request_queue_size)

  File "/home/azureuser/galaxy/eggs/Paste-1.7.5.1-py2.7.egg/paste/httpserver.py", line 1134, in __init__

    request_queue_size=request_queue_size)

  File "/home/azureuser/galaxy/eggs/Paste-1.7.5.1-py2.7.egg/paste/httpserver.py", line 1113, in __init__

    request_queue_size=request_queue_size)

  File "/home/azureuser/galaxy/eggs/Paste-1.7.5.1-py2.7.egg/paste/httpserver.py", line 360, in __init__

    HTTPServer.__init__(self, server_address, RequestHandlerClass)

  File "/usr/lib/python2.7/SocketServer.py", line 419, in __init__

    self.server_bind()

  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind

    SocketServer.TCPServer.server_bind(self)

  File "/usr/lib/python2.7/SocketServer.py", line 430, in server_bind

    self.socket.bind(self.server_address)

  File "/usr/lib/python2.7/socket.py", line 224, in meth

    return getattr(self._sock,name)(*args)

socket.gaierror: [Errno -2] Name or service not known

galaxy.jobs.handler INFO 2015-05-06 15:26:59,751 sending stop signal to worker thread

galaxy.jobs.handler INFO 2015-05-06 15:26:59,751 job handler queue stopped

galaxy.jobs.runners INFO 2015-05-06 15:26:59,759 LWRRunner: Sending stop signal to monitor thread

galaxy.jobs.runners INFO 2015-05-06 15:26:59,759 LWRRunner: Sending stop signal to 3 worker threads

galaxy.jobs.runners INFO 2015-05-06 15:26:59,759 LocalRunner: Sending stop signal to 5 worker threads

galaxy.jobs.handler INFO 2015-05-06 15:26:59,760 sending stop signal to worker thread

galaxy.jobs.handler INFO 2015-05-06 15:26:59,761 job handler stop queue stopped

ADD REPLYlink written 3.6 years ago by Marc30

Take the trailing slash off of host, so it's exactly:

host = 0.0.0.0

ADD REPLYlink written 3.6 years ago by Dannon Baker3.7k

the server is working now, but how can I access it on my local web browser?

######################

Traceback (most recent call last):

  File "/home/azureuser/galaxy/lib/galaxy/webapps/galaxy/buildapp.py", line 113, in app_factory

    galaxy.model.tool_shed_install.mapping.metadata.bind.dispose()

AttributeError: 'NoneType' object has no attribute 'dispose'

galaxy.queue_worker INFO 2015-05-06 15:40:18,944 Initalizing Galaxy Queue Worker on sqlalchemy+sqlite:///./database/control.sqlite?isolation_level=IMMEDIATE

Starting server in PID 16683.

serving on 0.0.0.0:8080 view at http://127.0.0.1:8080

ADD REPLYlink written 3.6 years ago by Marc30

That looks correct, now you just have to go to the URL of the azure VM (or the IP you ssh'd to to get in) at port 8080, if you have the endpoint configured as we previously discussed.
 

ADD REPLYlink written 3.6 years ago by Dannon Baker3.7k

I've tried with my DNS name: *.cloudapp.net:8080, and it didn't work; and my PUBLIC VIRTUAL IP (VIP) ADDRESS: ***.***.***.***:8080, and it didn't work. I don't know what url I should use. And this is probably the last post in the next 6 hours..... 


ADD REPLYlink written 3.6 years ago by Marc30

It may be easier to email galaxy-dev with questions like this -- others with azure experience on the developer list will be able to hopefully chime in.  See http://dev.list.galaxyproject.org/

ADD REPLYlink written 3.6 years ago by Dannon Baker3.7k
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