Page 1 of 2
Omero web on separate machine
Posted:
Tue Nov 07, 2017 7:52 am
by Gebhard
Hi guys,
I've just upgraded to OMERO 5.4 ; The upgrade from 5.3.1 to 5.4 went very smoothly!
Now, I'm trying to setup a machine which is only running omero web.
Omero web itself is running.
In my nginx conf I've set the upstream server to the IP of the actual Omero server and the port is 4080.
However, on the Omero server port 4080 is listening on 127.0.0.1 and thus refusing the connection.
How can I "convince" Omero to accept incomming connections from my webserver(s) [there might be more in the future]? Or, do I have to specify another port in my nginx config?
Best,
Gebhard
Re: Omero web on separate machine
Posted:
Tue Nov 07, 2017 8:12 am
by jmoore
Re: Omero web on separate machine
Posted:
Tue Nov 07, 2017 8:31 am
by Gebhard
So, omero web and omero have to be on the same machine, only nginx can be run on a separate server?
I've used omero.web.applicaiton_server , omero.web.applicaiton_server.host and omero.web.applicaiton_server.port to adjust my configuration and then the omero web config nginx command to generate the configuration file.
Re: Omero web on separate machine
Posted:
Tue Nov 07, 2017 8:38 am
by jmoore
Gebhard wrote:So, omero web and omero have to be on the same machine, only nginx can be run on a separate server?
No. They can all be on different machines.
I've used omero.web.application_server , omero.web.application_server.host and omero.web.application_server.port to adjust my configuration and then the omero web config nginx command to generate the configuration file.
Can you perhaps paste us your configuration from nginx as well as
- Code: Select all
bin/omero config get --hide-password
?
Thanks,
~Josh.
Re: Omero web on separate machine
Posted:
Tue Nov 07, 2017 8:48 am
by Gebhard
Config of the OMERO server
- Code: Select all
omero.client.ui.tree.orphans.name=Not Assigned
omero.data.dir=/OMERO
omero.db.name=omerodb
omero.db.pass=********
omero.db.user=dbomero
omero.fs.dirImportWait=180
omero.fs.importArgs=--transfer=upload_rm
omero.mail.config=true
omero.mail.from=omero@kirchhoff-lab.de
omero.mail.port=25
omero.mail.smtp.auth=true
omero.mail.smtp.connectiontimeout=60000
omero.mail.smtp.socketFactory.fallback=true
omero.mail.smtp.starttls.enable=false
omero.mail.smtp.timeout=60000
omero.web.application_server=wsgi-tcp
omero.web.apps=["tag_gallery", "omero_figure", "omero_iviewer"]
omero.web.login_logo=http://kirchhoff-lab.de/images/MolPhysiol-EN-s.jpg
omero.web.open_with=[["Image viewer", "webindex", {"supported_objects": ["image"], "script_url": "webclient/javascript/ome.openwith_viewer.js"}], ["omero_figure", "new_figure", {"supported_objects": ["images"], "target": "_blank", "label": "OMERO.figure"}], ["omero_iviewer", "omero_iviewer_index", {"supported_objects": ["image"], "script_url": "omero_iviewer/openwith.js", "label": "OMERO.iviewer"}]]
omero.web.ui.top_links=[["Data", "webindex", {"title": "Browse Data via Projects, Tags etc"}], ["History", "history", {"title": "History"}], ["Help", "http://help.openmicroscopy.org/", {"target": "new", "title": "Open OMERO user guide in a new tab"}], ["Gallery", "tag_gallery_index", {"title": "Open Image Gallery"}], ["Figure", "figure_index", {"target": "_blank", "title": "Open Figure in new tab"}]]
Config of OMERO.web running on separate machine
- Code: Select all
omero.web.application_server=wsgi-tcp
omero.web.application_server.host=10.60.8.228
omero.web.application_server.port=4080
omero.web.login_logo=http://www.kirchhoff-lab.de/images/MolPhysiol-EN-s.jpg
omero.web.server_list=[[10.60.8.228,4080,omero]]
nginx config, running on same machine as OMERO.web
- Code: Select all
upstream omeroweb {
server 10.60.8.228:4080 fail_timeout=0;
}
server {
listen 80;
server_name $hostname;
sendfile on;
client_max_body_size 0;
# maintenance page serve from here
location @maintenance {
root /home/omero/OMERO.py/etc/templates/error;
try_files $uri /maintainance.html =502;
}
# weblitz django apps serve media from here
location /static {
alias /home/omero/OMERO.py/lib/python/omeroweb/static;
}
location @proxy_to_app {
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_buffering off;
proxy_pass http://omeroweb;
}
location / {
error_page 502 @maintenance;
# checks for static file, if not found proxy to app
try_files $uri @proxy_to_app;
}
}
Re: Omero web on separate machine
Posted:
Tue Nov 07, 2017 9:07 am
by jmoore
Hi Gebhard,
Ah, ok. Then NGINX should in fact use localhost. NGINX talks to OMERO.web and OMERO.web talks to OMERO.server. Port 4080 belongs to OMERO.web and so *shouldn't* be open on 10.60.8.228, but instead on the machine where NGINX and OMERO.web are running.
omero.web.application_server.host tells Django (i.e. OMERO.web) which interface to listen on.
omero.web.server_list defines the logins available to the end-user and points to OMERO.server, but the port should be 4064 (which should be open on 10.60.8.228).
Cheers,
~Josh.
Re: Omero web on separate machine
Posted:
Tue Nov 07, 2017 9:53 am
by Gebhard
Hi Josh,
this seems to go into the right direction, however, now I get
Invalid SERVER_LIST (omero.web.server_list = '[[10.60.8.228,4064,omero]]'). Expecting , delimiter: line 1 column 8 (char 7). A list of servers the Web client can connect to.
when I try to restart omero.web, but I don't see what's wrong...
Best,
Gebhard
Re: Omero web on separate machine
Posted:
Tue Nov 07, 2017 10:14 am
by jmoore
Hi Gebhard,
you're missing quotes around "OMERO". That property is parsed as JSON so strings need to be quoted.
Cheers,
~Josh
Re: Omero web on separate machine
Posted:
Tue Nov 07, 2017 10:25 am
by Gebhard
Here's what I do
- Code: Select all
bin/omero config set omero.web.server_list [["10.60.8.228",4064,"omero"]]
I also tried
- Code: Select all
bin/omero config set omero.web.server_list [['10.60.8.228',4064,'omero']]
but the result is still the same.
Also, if I look at etc/grid.config.xml the quotas are always gone
Re: Omero web on separate machine
Posted:
Tue Nov 07, 2017 10:29 am
by jmoore
Your shell is eating them. You can either use:
- Code: Select all
bin/omero config edit
to not interact with the shell, or wrap everything in one more set of quotes:
- Code: Select all
bin/omero config set omero.web.server_list '[["10.60.8.228",4064,"omero"]]'
Cheers,
~Josh