We're Hiring!

Omero.server 5.0.1 not listening on host's IP address

Having a problem deploying OMERO? Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

Omero.server 5.0.1 not listening on host's IP address

Postby crawley » Thu Jun 26, 2014 7:23 am

I'm developing some Chef recipes for installing Omero on virtual machines in the NeCTAR cloud, and I ran into a problem with the installed system. Basically, I couldn't get external clients to connect on ports 4063 and 4064. I checked the external firewalls and so on. No dice.

Then I ran netstat -a. It turned out that nothing on the server was listening on TCP IPv4 on those ports.

After a lot of digging, I discovered that in etc/grid/default.xml, the client-endpoints attribute was defined thus:

Code: Select all
    client-endpoints="ssl -p ${ROUTERPORT}:tcp -p 4063"


But the documentation I found for glacier2router configs says that you can specify an endpoint host explicitly using the -h parameter. So I changed the attribute to this.

Code: Select all
client-endpoints="ssl -h nnn.nnn.nnn.nnn -p ${ROUTERPORT}:tcp -h nnn.nnn.nnn.nnn -p 4063"


where nnn.nnn.nnn.nnn is the server's IP address. And restarted. And it worked. Netstat shows that something is now listening on those ports, and I can get external clients to talk to the server.

Question 1) do you have any idea why I needed to do that to the default.xml file to get Omero.server to listen?

The installation instructions don't mention this. The troubleshooting instructions don't either.

Question 2) assuming that I really do need to localize to make this work, is there a neat way to avoid hacking the default.xml file (in place or a copy)? I'd like to make my recipes work without embedding a "snarfed" copy of any Omero config files into the cookbook ... 'cos that is liable to be problematic as Omero evolves.
crawley
 
Posts: 5
Joined: Thu Jun 26, 2014 1:28 am

Re: Omero.server 5.0.1 not listening on host's IP address

Postby jmoore » Thu Jun 26, 2014 10:54 am

crawley wrote:I'm developing some Chef recipes for installing Omero on virtual machines in the NeCTAR cloud


Interesting.

Basically, I couldn't get external clients to connect on ports 4063 and 4064. ... It turned out that nothing on the server was listening on TCP IPv4 on those ports.


Ice proxy strings with no host name are intended to listen on all interfaces (see "Server semantics"):

http://doc.zeroc.com/display/Ice/Proxy+and+Endpoint+Syntax#ProxyandEndpointSyntax-AddressSyntax

Question 1) do you have any idea why I needed to do that to the default.xml file to get Omero.server to listen?
The installation instructions don't mention this. The troubleshooting instructions don't either.


I've not yet found a reason on the ZeroC forums why it wouldn't in your case, but will keep looking. I also don't remember it happening before, which would likely explain why it's not (yet!) on the troubleshooting page.

Question 2) assuming that I really do need to localize to make this work, is there a neat way to avoid hacking the default.xml file (in place or a copy)? I'd like to make my recipes work without embedding a "snarfed" copy of any Omero config files into the cookbook ... 'cos that is liable to be problematic as Omero evolves.


Ice.Default.Host, described on the "Proxy+And+Endpoint+Syntax" page above may be what you need:

Code: Select all
$ netstat -na | grep 4064
tcp6       0      0 :::4064                 :::*                    LISTEN     
$ bin/omero config set Ice.Default.Host 127.0.0.1
$ bin/omero admin restart
Waiting on shutdown. Use CTRL-C to exit
......No descriptor given. Using etc/grid/default.xml
Waiting on startup. Use CTRL-C to exit
$ netstat -na | grep 4064
tcp        0      0 127.0.0.1:4064          0.0.0.0:*               LISTEN


I haven't used this in production yet, so any feedback would be appreciated!

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Omero.server 5.0.1 not listening on host's IP address

Postby crawley » Thu Jun 26, 2014 11:49 pm

Using "omero config set Ice.Default.Host nnn.nnn.nnn.nnn" is doing the job for me. Many thanks.
crawley
 
Posts: 5
Joined: Thu Jun 26, 2014 1:28 am

Re: Omero.server 5.0.1 not listening on host's IP address

Postby crawley » Mon Jun 30, 2014 3:05 am

Actually, it turns out that there is some fallout from setting Ice.Default.Host to the external IP address.

If you then try to use Omero.web, it turns out that we've configured Omero.server to NOT listen on localhost any more. This is confirmed by 'netstat -a'.

But the default setting for "omero.web.server_list" configures the webclient login page with "localhost:4064" as the only selectable option. And naturally, django can't connect to the server on that IP/port.

Fortunately, this can be reconfigured; e.g. by running

Code: Select all
bin/omero config set "omero.web.server_list" '[["nnn.nnn.nnn.nnn", 4064, "omero"]]'
crawley
 
Posts: 5
Joined: Thu Jun 26, 2014 1:28 am

Re: Omero.server 5.0.1 not listening on host's IP address

Postby jmoore » Mon Jun 30, 2014 7:00 am

Ah, good point. Thanks for the heads up. We should be able to detect the setting and do this automatically in the future.

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany


Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest