Omero will not start after fresh install

I have just installed Omero 5.6.1 on a Ubuntu 18.04 box (not a VM) and I can;t seem to figure out why it will not start up. Here is the results of the diagnostics command.

=============================================================================
OMERO Diagnostics (admin) 5.7.1
=============================================================================

Commands:   java -version                        11.0.7    (/usr/bin/java)
Commands:   python -V                             3.6.9     (/opt/omero/server/venv3/bin/python)
Commands:   icegridnode --version           3.6.5     (/opt/ice-3.6.5-0.3.0/bin/icegridnode)
Commands:   icegridadmin --version         3.6.5     (/opt/ice-3.6.5-0.3.0/bin/icegridadmin)
Commands:   psql --version                       11.8      (/usr/bin/psql)
Commands:   openssl version                    1.1.111   (/usr/local/bin/openssl -- 2 others)

Server:     icegridnode                    not started

Log dir:    /opt/omero/server/OMERO.server/var/log exists
Log files:  Blitz-0.log                    27.5 KB       errors=1    warnings=3
Log files:  DropBox.log                    n/a
Log files:  FileServer.log                 n/a
Log files:  Indexer-0.log                  21.9 KB       errors=1    warnings=1
Log files:  MonitorServer.log              n/a
Log files:  PixelData-0.log                21.9 KB       errors=1    warnings=1
Log files:  Processor-0.log                22.9 KB       errors=4    warnings=16
Log files:  Tables-0.log                   24.1 KB       errors=4    warnings=16
Log files:  TestDropBox.log                n/a
Log files:  master.err                     34.5 KB       errors=0    warnings=2
Log files:  master.out                     empty
Log files:  Total size                     0.15 MB


Environment:OMERO_HOME=(unset)
Environment:OMERODIR=/opt/omero/server/OMERO.server
Environment:OMERO_NODE=(unset)
Environment:OMERO_MASTER=(unset)
Environment:OMERO_USERDIR=(unset)
Environment:OMERO_TMPDIR=(unset)
Environment:PATH=/opt/omero/server/venv3/bin:/opt/ice-3.6.5-0.3.0//bin:/opt/omero/server/venv3/bin:/bin:/home/omero/bin:/home/omero/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/ssl/bin:/snap/bin
Environment:PYTHONPATH=(unset)
Environment:ICE_HOME=/opt/ice-3.6.5-0.3.0/
Environment:LD_LIBRARY_PATH=(unset)
Environment:DYLD_LIBRARY_PATH=(unset)

Cannot list deployed applications.
OMERO data dir:'/OMERO'                       Exists? True      Is writable? False
OMERO temp dir:'/home/omero/omero/tmp'        Exists? True      Is writable? True   (Size: 0)

JVM settings: Blitz-${index}                -Xmx1253m -XX:MaxPermSize=1g -XX:+IgnoreUnrecognizedVMOptions
JVM settings: Indexer-${index}              -Xmx835m -XX:MaxPermSize=1g -XX:+IgnoreUnrecognizedVMOptions
JVM settings: PixelData-${index}            -Xmx1253m -XX:MaxPermSize=1g -XX:+IgnoreUnrecognizedVMOptions
JVM settings: Repository-${index}           -Xmx835m -XX:MaxPermSize=1g -XX:+IgnoreUnrecognizedVMOptions

Jar:        lib/server/formats-api.jar     Bio-Formats API      6.3.1   13 December 2019        e355a853c5768721711cb9b29c3a27561539c4e4
Jar:        lib/server/formats-bsd.jar     BSD Bio-Formats readers and writers  6.3.1   13 December 2019        e355a853c5768721711cb9b29c3a27561539c4e4
Jar:        lib/server/formats-gpl.jar     Bio-Formats library  6.3.1   13 December 2019        e355a853c5768721711cb9b29c3a27561539c4e4
Jar:        lib/server/ome-codecs.jar      OME Codecs   0.2.5   13 August 2019  1a8b147d5673b975e14f33d78a2be886fbaf0e20
Jar:        lib/server/ome-common.jar      OME Common Java      6.0.4   21 October 2019 650939cfa026e33d2f38c1f56c74715dfb44b974
Jar:        lib/server/ome-jai.jar         OME JAI      0.1.0   28 June 2017    96ed34bf59f5ba3b51e3d60e342f30962a46c292
Jar:        lib/server/ome-mdbtools.jar    MDB Tools (Java port)        5.3.2   7 August 2018   68ffca2a95750cbb96f0d11785851aa4a554c0a4
Jar:        lib/server/ome-poi.jar         OME POI      5.3.3   6 August 2018   3887f4b2b21e195fa76ec4378858f6278aed5dcd
Jar:        lib/server/ome-xml.jar         OME XML library      6.0.1   9 May 2019      4d5b2e68d178de967d53100a1726b447726282cd
Jar:        lib/server/omero-blitz.jar     jar  5.5.6
Jar:        lib/server/omero-common.jar    jar  5.5.5
Jar:        lib/server/omero-gateway.jar   jar  5.6.3
Jar:        lib/server/omero-model.jar     jar  5.5.5
Jar:        lib/server/omero-renderer.jar  jar  5.5.5
Jar:        lib/server/omero-romio.jar     jar  5.5.5
Jar:        lib/server/omero-server.jar    jar  5.5.6

I will also attach the omero log files for your reference. Here is the result of the omero start command:

omero@OMERO:/opt/omero/server$ omero admin start
WARNING: Your server has not been configured for production use.
See https://docs.openmicroscopy.org/omero/latest/sysadmins/server-performance.html?highlight=poolsize
for more information.
Creating /opt/omero/server/OMERO.server/var/master
Initializing /opt/omero/server/OMERO.server/var/log
Creating /opt/omero/server/OMERO.server/var/registry
No descriptor given. Using etc/grid/default.xml
Waiting on startup. Use CTRL-C to exit
.............................
Failed to startup some components after 300 seconds
Calling "stop" on remaining components
Waiting on shutdown. Use CTRL-C to exit

I’m relatively new to OMERO so any assistance that you all can provide would be greatly appreciated. Thanks.

Alex

Blitz-0.txt (26.9 KB) Indexer-0.txt (21.4 KB)

Looks like your /OMERO data repo directory is not writable by the “omero” user (the one that runs omero.
Cheers,
Damir

2 Likes

Hi Damir,

Thanks for the insight, that did change a few things but when I try to start up the OMERO service with the command “omero admin start” I get the following:
omero@OMERO:/$ omero admin start
Traceback (most recent call last):
File “/opt/omero/web/venv3/bin/omero”, line 118, in
rv = omero.cli.argv()
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/cli.py”, line 1750, in argv
cli.invoke(args[1:])
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/cli.py”, line 1188, in invoke
stop = self.onecmd(line, previous_args)
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/cli.py”, line 1265, in onecmd
self.execute(line, previous_args)
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/cli.py”, line 1347, in execute
args.func(args)
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/plugins/prefs.py”, line 79, in open_and_close_config
return func(*args, **kwargs)
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/plugins/admin.py”, line 822, in start
self.startasync(args, config)
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/plugins/prefs.py”, line 79, in open_and_close_config
return func(*args, **kwargs)
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/plugins/admin.py”, line 768, in startasync
self.rewrite(args, config, force=True)
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/plugins/prefs.py”, line 79, in open_and_close_config
return func(*args, **kwargs)
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/plugins/admin.py”, line 1124, in rewrite
config_props = self._get_omero_properties()
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/plugins/admin.py”, line 1088, in _get_omero_properties
(p.key, p.val) for p in pp.parse_file(omero_props_file))
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/install/config_parser.py”, line 247, in parse_file
self.parse_lines(fileinput.input(argv))
File “/opt/omero/web/venv3/lib/python3.6/site-packages/omero/install/config_parser.py”, line 254, in parse_lines
for line in lines:
File “/usr/lib/python3.6/fileinput.py”, line 250, in next
line = self._readline()
File “/usr/lib/python3.6/fileinput.py”, line 362, in _readline
self._file = open(self._filename, self._mode)
FileNotFoundError: [Errno 2] No such file or directory: path(’/opt/omero/web/omero-web/etc/omero.properties’)

I was looking at the install steps and I was not able to find the command to create that file. Here are the results of the omero diagnostics:
omero@OMERO:/$ omero admin diagnostics

================================================================================
OMERO Diagnostics (admin) 5.7.1

Commands: java -version 11.0.7 (/usr/bin/java)
Commands: python -V 3.6.9 (/opt/omero/web/venv3/bin/python)
Commands: icegridnode --version 3.6.5 (/opt/ice-3.6.5-0.3.0/bin/icegridnode)
Commands: icegridadmin --version 3.6.5 (/opt/ice-3.6.5-0.3.0/bin/icegridadmin)
Commands: psql --version 11.8 (/usr/bin/psql)
Commands: openssl version 1.1.111 (/usr/local/bin/openssl – 2 others)

Server: icegridnode not started

Log dir: /opt/omero/web/omero-web/var/log exists
Log files: Blitz-0.log n/a
Log files: DropBox.log n/a
Log files: FileServer.log n/a
Log files: Indexer-0.log n/a
Log files: MonitorServer.log n/a
Log files: OMEROweb.lock empty
Log files: OMEROweb.log 294 B
Log files: Processor-0.log n/a
Log files: Tables-0.log n/a
Log files: TestDropBox.log n/a
Log files: Total size 0.00 MB

Error while parsing logs

Environment:OMERO_HOME=(unset)
Environment:OMERODIR=/opt/omero/web/omero-web
Environment:OMERO_NODE=(unset)
Environment:OMERO_MASTER=(unset)
Environment:OMERO_USERDIR=(unset)
Environment:OMERO_TMPDIR=(unset)
Environment:PATH=/opt/omero/web/venv3/bin:/opt/ice-3.6.5-0.3.0/bin:/opt/omero/server/venv3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/ssl/bin:/snap/bin
Environment:PYTHONPATH=(unset)
Environment:ICE_HOME=/opt/ice-3.6.5-0.3.0
Environment:LD_LIBRARY_PATH=(unset)
Environment:DYLD_LIBRARY_PATH=(unset)

Cannot list deployed applications.
OMERO data dir:’/OMERO’ Exists? True Is writable? False
OMERO temp dir:’/home/omero/omero/tmp’ Exists? True Is writable? True (Size: 0)

omero@OMERO:/$

Any insight would be greatly appreciated, thanks.

Alex

Hi Alex,

The diagnostics dump still shows that your /OMERO directory is not writable by the “omero” user but I think your main problem is the message: “Server: icegridnode not started”. That means none of the omero services are running either. That is not likely caused by the “not-writable” /OMERO but I would definitely chmod or chown that directory to be writable by the omero user.

I do see one other big anomaly: the diagnostics reports that you have the OMERODIR environment variable set to /opt/omero/web/omero-web. That is definitely incorrect. You need to run the omero server with the OMERODIR variable set to something similar to: /opt/omero/server/OMERO.server (check the documentation steps you were following). Also, you have a mixture of server installation and web installation in your paths which will likely cause all kinds of trouble. Since OMERO 5.6.0 it is important to separate the server and web installation as @manics explains here: What is the point of installing OMERO.server and OMERO.web separately?.
But the biggest problem is the OMERODIR setting, I think. That probably causes the server not to find your config.xml file and as a result has no settings. The missing omero.properties file is probably related to that.

Good luck,
Damir

1 Like

Hi Damir,

Thanks for the insight on the server and the web components. I was able to update the OMERODIR variable to /opt/omero/server/OMERO.server and that did move us toward the right direction. I’m still running into the issue where the OMERO server will not start.

What is the best way to start to read and comb through the OMERO error logs, specifically the Blitz-0.log? I have found it challenging trying to read those logs and from them narrowing down what errors are being given. I have attached the latest log for reference after I have updated the OMERODIR variable.

As a side note, I was looking through the documentation and for the OMERO.web component install for 5.6.1 it sets the OMERODIR variable to the following:

omero_user_web_dir=/opt/omero/web export OMERODIR=${omero_user_web_dir}/omero-web

Thanks for all your assistance so far, it is greatly appreciated.

Regards,
Alex

Blitz-0 (2).txt (53.7 KB)

Hi Alex,

Looking at your Blitz log, it still appears that the /OMERO directory is not writable. Here’s the first few lines from my Blitz.log (also on Ubuntu 18.04):

2020-07-07 11:45:14,911 INFO  [                ome.services.blitz.Entry] (      main) Creating OMERO.blitz. Please wait...
2020-07-07 11:45:17,192 INFO  [        ome.services.util.ReadOnlyStatus] (      main) read-only status: db=false, repo=false
2020-07-07 11:45:17,225 WARN  [                          omero.security] (      main) trustStore property is empty, not setting
2020-07-07 11:45:17,225 WARN  [                          omero.security] (      main) trustStorePassword property is empty, not setting
2020-07-07 11:45:17,352 INFO  [          ome.services.util.DBPatchCheck] (      main) Verified database patch: OMERO5.4__0
2020-07-07 11:45:17,386 INFO  [           ome.services.util.DBUserCheck] (      main) User root.id = 0
2020-07-07 11:45:17,386 INFO  [           ome.services.util.DBUserCheck] (      main) User guest.id = 1
2020-07-07 11:45:17,386 INFO  [           ome.services.util.DBUserCheck] (      main) Group system.id = 0
2020-07-07 11:45:17,386 INFO  [           ome.services.util.DBUserCheck] (      main) Group user.id = 1
2020-07-07 11:45:17,387 INFO  [           ome.services.util.DBUserCheck] (      main) Group guest.id = 2
2020-07-07 11:45:17,886 INFO  [  ome.services.fulltext.FullTextAnalyzer] (      main) Initialized FullTextAnalyzer
2020-07-07 11:45:21,747 INFO  [       ome.services.scheduler.ThreadPool] (      main) ThreadPool: normal=(#50, 5000ms), background=(#10, 3600000ms)
2020-07-07 11:45:21,933 INFO  [         ome.services.util.TimeoutSetter] (      main) Query timeout set to 1000s for all users.
2020-07-07 11:45:22,287 INFO  [        ome.services.db.DatabaseIdentity] (      main) Using LSID format: urn:lsid:export.openmicroscopy.org:%s:a004e954-27cb-4570-90de-7c6c520ede06_%s%s
2020-07-07 11:45:22,747 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147522397] time[349] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:22,920 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147522747] time[172] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:23,066 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147522920] time[145] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:23,198 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147523066] time[131] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:23,328 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147523198] time[129] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:23,422 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147523328] time[93] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:23,513 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147523422] time[90] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:23,591 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147523513] time[78] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:23,661 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147523592] time[69] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:23,727 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147523661] time[65] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:23,792 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147523728] time[64] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:23,859 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147523792] time[66] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:23,926 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147523859] time[66] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:23,992 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147523926] time[66] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:24,120 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147523992] time[127] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:24,164 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147524120] time[43] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:24,201 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147524164] time[37] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:24,239 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147524202] time[37] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:24,277 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147524239] time[38] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:24,387 INFO  [                 org.perf4j.TimingLogger] (      main) start[1594147524278] time[108] tag[ome.io.nio.SimpleBackOff.256X256]
2020-07-07 11:45:24,400 INFO  [                ome.io.nio.PixelsService] (      main) Using Bio-Formats Cache: /data/OMERO/BioFormatsCache
2020-07-07 11:45:24,404 INFO  [                ome.io.nio.PixelsService] (      main) PixelsService(path=/data/OMERO, resolver=ome.services.OmeroFilePathResolver@1db5de29, backoff=ome.io.nio.SimpleBackOff(factor=65.2), sizes=ome.io.nio.ConfiguredTileSizes(w=256,h=256,W=3192,H=3192))
2020-07-07 11:45:24,585 INFO  [               ome.logic.LutProviderImpl] (      main) Successfully added 39 LUTs
2020-07-07 11:45:24,607 INFO  [    ome.services.fulltext.FullTextThread] (      main) Initializing Full-Text Indexer
2020-07-07 11:45:24,623 INFO  [  ome.services.pixeldata.PixelDataThread] (      main) Initializing PixelDataThread (create events only)
2020-07-07 11:45:24,713 INFO  [    ome.services.util.ServerVersionCheck] (      main) -------------------------------------------------
2020-07-07 11:45:24,715 INFO  [    ome.services.util.ServerVersionCheck] (      main) OMERO Version: 5.6.1-ice36-b225 Ready.
2020-07-07 11:45:24,722 INFO  [    ome.services.util.ServerVersionCheck] (      main) -------------------------------------------------
2020-07-07 11:45:26,341 INFO  [                 ome.system.UpgradeCheck] (      main) no update needed
2020-07-07 11:45:27,087 INFO  [    ome.tools.hibernate.ExtendedMetadata] (      main) Calculating ExtendedMetadata...
...etc...

Yours starts with all kinds of complaining about the repository being read-only so the first thing to do might be something like (as root and assuming your omero user that runs omero is called omero-server):
chown -R omero-server /OMERO

As to the OMERODIR variable: you will indeed have 2 different OMERODIR variables, one for the omero-server user and another different one for the omero-web user. So when you log in (or sudo to) the omero-server user your OMERODIR should be /opt/omero/server/OMERO.server and when you log in (or sudo to) the omero-web user, OMERODIR is /opt/omero/web/omero-web (all assuming you followed the instructions on: https://docs.openmicroscopy.org/omero/5.6.1/sysadmins/unix/server-ubuntu1804-ice36.html and https://docs.openmicroscopy.org/omero/5.6.1/sysadmins/unix/install-web/walkthrough/omeroweb-install-ubuntu1804-ice3.6.html

So it’s quite important not to mix settings between those 2 different omero accounts.

Cheers,
Damir

2 Likes

Hi Damir,

Thanks for the information, that got me on the right track. I was able to install the OMERO.server and the OMERO.web services on separate instances. I was able to get the OMERO.server running but now I’m having issues with the OMERO.web portion of the install. I feel that we are getting close to the final issues, here is the result of the “omero web start” command while logged in as the “omero-web” user:

omero-web@OMERO:~$ omero web start
Post-processed ‘omeroweb.viewer.min.css’ as ‘omeroweb.viewer.min.css’
Post-processed ‘omeroweb.viewer.min.js’ as ‘omeroweb.viewer.min.js’

0 static files copied to ‘/opt/omero/web/omero-web/var/static’, 606 unmodified, 2 post-processed.
Clearing expired sessions. This may take some time… [OK]
Starting OMERO.web… [ERROR] OMERO.web workers (PID 1062) - no such process. Use ps aux | grep /opt/omero/web/omero-web/var/django.pid and kill stale processes by hand.
WARNING: Removed stale /opt/omero/web/omero-web/var/django.pid
[OK]
omero-web@OMERO:~$ omero web diagnostics

================================================================================
OMERO Diagnostics (web) 5.7.1

OMERO.web status… [RUNNING] (PID 2208)
Django version: 1.11.29

Log dir: /opt/omero/web/omero-web/var/log exists
Log file : OMEROweb.log 1.5 KB
omero-web@OMERO:~$

I have also attached the log file for reference, thanks.

Alex

OMEROweb.txt (1.2 KB)

As an update I was able to get a rough login page for OMERO and login, but all the formatting is not being applied.

I also ran a diagnostic of the OMERO web service and it has not changed since my last post. We are almost there, thanks.

Alex

Hi Alex,
Good that things are on the right track. Yes, I’ve seen that issue with OMERO.web as well. It’s typically related to nginx not having access to the static media files.
In your nginx’s omero-web.conf file (probably in /etc/nginx/conf.d) there’s a line saying:

    # weblitz django apps serve media from here
    location /static {
        alias /home/omero-web/var/static;
    }

That path refers to the place in your omero-web area where those static files should be and they should be readable. On my instance they look like this:

omero-web@myserver:~/var/static$ ls -la
total 968
drwxr-xr-x  9 omero-web omero-web   4096 Jul  7 11:45 .
drwxr-xr-x  4 omero-web omero-web   4096 Jul  7 11:45 ..
drwxr-xr-x 14 omero-web omero-web   4096 Mar 25 12:17 3rdparty
drwxr-xr-x  3 omero-web omero-web   4096 Mar 23 22:39 feedback
drwxr-xr-x  5 omero-web omero-web   4096 Mar 23 22:39 gallery
drwxr-xr-x  3 omero-web omero-web   4096 Mar 23 22:39 omero_iviewer
-rw-r--r--  1 omero-web omero-web  77580 Jul  7 11:45 omeroweb.viewer.min.css
-rw-r--r--  1 omero-web omero-web 874532 Jul  7 11:45 omeroweb.viewer.min.js
drwxr-xr-x  5 omero-web omero-web   4096 Mar 23 22:39 webadmin
drwxr-xr-x  5 omero-web omero-web   4096 Mar 23 22:39 webclient
drwxr-xr-x  5 omero-web omero-web   4096 Mar 23 22:39 webgateway

Everything here should be world-readable.
As you can see, I have iviewer and other plugins installed. The static files for those plugins will end up in here as well.

So check all the paths and permissions and with every change, restart or reload nginx. You’ll probably resolve this very quickly.

Cheers,
Damir

Hi Damir,

Thanks for the suggestions, I did update the permissions for the omero-web user to access those resources. I restarted the omero web service and it still seems that there is a permissions issue as the site has not updated to read the static web files.

Here is the file permissions and the contents of the omeroweb.conf file.

omero-web@OMERO:/opt/omero/web/omero-web/var/log$ omero web restart
Stopping OMERO.web… [ERROR] OMERO.web workers (PID 14413) - no such process. Use ps aux | grep /opt/omero/web/omero-web/var/django.pid and kill stale processes by hand.
Removed stale /opt/omero/web/omero-web/var/django.pid
Post-processed ‘omeroweb.viewer.min.css’ as ‘omeroweb.viewer.min.css’
Post-processed ‘omeroweb.viewer.min.js’ as ‘omeroweb.viewer.min.js’

0 static files copied to ‘/opt/omero/web/omero-web/var/static’, 606 unmodified, 2 post-processed.
Clearing expired sessions. This may take some time… [OK]
Starting OMERO.web… [OK]

omero-web@OMERO:/opt/omero/web/omero-web/var/log$ ls -la /opt/omero/web/omero-web/var/static
total 960
drwxrwxr-x 7 omero-web omero-web 4096 Jul 10 14:20 .
drwxrwxrwx 4 omero-web omero-web 4096 Jul 10 14:20 …
drwxrwxr-x 14 omero-web omero-web 4096 Jul 6 13:27 3rdparty
drwxrwxr-x 3 omero-web omero-web 4096 Jul 6 13:27 feedback
-rw-rw-r-- 1 omero-web omero-web 77580 Jul 10 14:20 omeroweb.viewer.min.css
-rw-rw-r-- 1 omero-web omero-web 874532 Jul 10 14:20 omeroweb.viewer.min.js
drwxrwxr-x 5 omero-web omero-web 4096 Jul 6 13:27 webadmin
drwxrwxr-x 5 omero-web omero-web 4096 Jul 6 13:27 webclient
drwxrwxr-x 5 omero-web omero-web 4096 Jul 6 13:27 webgateway
omero-web@OMERO:/opt/omero/web/omero-web/var/log$ cd /etc/nginx/conf.d

omero-web@OMERO:/etc/nginx/conf.d$ ls
get-pip.py omero.conf omeroweb.conf

omero-web@OMERO:/etc/nginx/conf.d$ vim omeroweb.conf
location @maintenance {
root /home/omero/OMERO.server/etc/templates/error;
try_files $uri /maintainance.html =502;
}

location /static {
alias /home/omero/OMERO.server/lib/python/omeroweb/static;
alias /opt/omero/web/omero-web/var/static;
alias /home/omero-web/var/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://127.0.0.1:4080;

}

location / {

error_page 502 @maintenance;
# checks for static file, if not found proxy to app
try_files $uri @proxy_to_app;

}

~
~

Again, thanks for all the guidance on this.

Regards,
Alex

Looks like your /opt/omero/web/omero-web/var/static area is in good shape so let’s focus on the nginx config stuff:

  1. you have both a omero.conf and a omeroweb.conf in /etc/nginx/conf.d. And there’s that weird get-pip.py file? Can you remove that one? And what is in that omero.conf? With a proper omeroweb.conf, you shouldn’t need that file.
  2. in the omeroweb.conf, there are some lines that may be a source of trouble: would it be possible to re-create this file by following the instructions here: https://docs.openmicroscopy.org/omero/5.6.1/sysadmins/unix/install-web/walkthrough/omeroweb-install-ubuntu1804-ice3.6.html#configuring-omero-web
    and
    https://docs.openmicroscopy.org/omero/5.6.1/sysadmins/unix/install-web/walkthrough/omeroweb-install-ubuntu1804-ice3.6.html#configuring-nginx

Hopefully that will give you a proper omeroweb.conf.

DS

Hi Damir,

I removed the pip.py file, and there was nothing in the omero.conf file so I removed that as well.

I recreated the omeroweb.conf file per the instructins that you provided and all the commands were successfully executed and here are the contents of the omeroweb.conf file:

omero-web@OMERO:/etc/nginx/conf.d$ ls
omeroweb.conf

omero-web@OMERO:/etc/nginx/conf.d$ vim omeroweb.conf

upstream omeroweb {
server 127.0.0.1:4080 fail_timeout=0;
}

server {
listen 80;
server_name localhost;

sendfile on;
client_max_body_size 0;



# maintenance page serve from here
location @maintenance {
    root /opt/omero/web/omero-web/etc/templates/error;
    try_files $uri /maintainance.html =502;
}

# weblitz django apps serve media from here
location /static {
    alias /opt/omero/web/omero-web/var/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;
}

}

I restarted the omero web service and I’m still getting the same issue of the service not reading from the static web files.

Alex

Your omeroweb.conf looks good (same as mine in fact). Did you restart nginx as well?
As root:
service nginx reload

Damir

Hi Damir,

Looks like the nginx service is not able to start, here is the status of the service:

root@OMERO:/etc/nginx/conf.d# systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2020-07-13 12:10:43 MDT; 7min ago
Docs: man:nginx(8)
Process: 31009 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=ex
Process: 31002 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s reload (code=exited, status=1/FAI
Process: 31010 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILU
Main PID: 32604 (code=exited, status=0/SUCCESS)

Jul 13 12:10:43 OMERO systemd[1]: Starting A high performance web server and a reverse proxy server…
Jul 13 12:10:43 OMERO nginx[31010]: nginx: [emerg] duplicate upstream “omeroweb” in /etc/nginx/sites-enabled/omer
Jul 13 12:10:43 OMERO nginx[31010]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jul 13 12:10:43 OMERO systemd[1]: nginx.service: Control process exited, code=exited status=1
Jul 13 12:10:43 OMERO systemd[1]: nginx.service: Failed with result ‘exit-code’.
Jul 13 12:10:43 OMERO systemd[1]: Failed to start A high performance web server and a reverse proxy server.
lines 1-15/15 (END)

I have attached the ngnix log from /var/log/nginx/error.log

Not sure where to go from here, I reviewed the install steps for nginx and all the steps from the OMERO site were successful.

error.txt (448.1 KB)

Thanks,
Alex

Ah, looks like you have another errant and badly constructed config file in /etc/nginx/sites-enabled. Is that called “omer”? Anyway, unless you have something important in it, just delete it and you can try testing the nginx config first with:
nginx -t

That will give you some diagnostics about your nginx setup. Once it shows all is well, start nginx with:
sudo service nginx start

Damir

1 Like

My guess is that you had an earlier version of omero on this machine and that old install was using /etc/nginx/sites-enabled for its *.conf file. Was that old install in /home/omero/?
Damir

Yes that is correct, I did have an earlier version of OMERO installed (5.4).

I was able to delete the config file from the /etc/nginx/sites-enabled/ folder and restarted the nginx service. After that the service started successfully and now the web page looks good.

Thanks for all your help it is really appreciated! My next step would be to install OMERO.figure and OMERO.iviewer for this version of OMERO. Any suggestions or tips on installing these two components that might be different from the online documentation?

Thanks,
Alex

Great. Glad I could help. The documentation for iviewer and figure on their respective PyPI pages is good to go. Just make sure you are in the virtual environment for the OMERO-web account when you do the pip installs.
Cheers,
Damir