Closed pwalczysko closed 2 years ago
JVM settings: Blitz-${index} -Xmx1234m -XX:MaxPermSize=1g -XX:+IgnoreUnrecognizedVMOptions
JVM settings: Indexer-${index} -Xmx823m -XX:MaxPermSize=1g -XX:+IgnoreUnrecognizedVMOptions
JVM settings: PixelData-${index} -Xmx1234m -XX:MaxPermSize=1g -XX:+IgnoreUnrecognizedVMOptions
JVM settings: Repository-${index} -Xmx823m -XX:MaxPermSize=1g -XX:+IgnoreUnrecognizedVMOptions
I'm going to guess that your Docker isn't configured with enough memory.
After boosting memory on my Docker settings...
I still see no server... and no logs...
$ docker exec -it docker-example-omero_omeroserver_1 bash
bash-4.2$ cd /opt/omero/server/OMERO.server
bash-4.2$ ls var/log
ls: cannot access var/log: No such file or directory
bash-4.2$ bin/omero admin diagnostics
================================================================================
OMERO Diagnostics (admin) 5.11.2
================================================================================
Traceback (most recent call last):
File "/opt/omero/server/venv3/bin/omero", line 8, in <module>
sys.exit(main())
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/main.py", line 125, in main
rv = omero.cli.argv()
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/cli.py", line 1784, in argv
cli.invoke(args[1:])
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/cli.py", line 1222, in invoke
stop = self.onecmd(line, previous_args)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/cli.py", line 1299, in onecmd
self.execute(line, previous_args)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/cli.py", line 1381, in execute
args.func(args)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/install/windows_warning.py", line 26, in wrapper
return func(self, *args, **kwargs)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/plugins/prefs.py", line 79, in open_and_close_config
return func(*args, **kwargs)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/plugins/admin.py", line 1235, in diagnostics
template_xml = XML(templates.text())
File "/usr/lib64/python3.6/xml/etree/ElementTree.py", line 1315, in XML
return parser.close()
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
But I do, so the boosting did it for me, thanks @joshmoore - I guess @will-moore must have a different setup somehow. My docker is
docker --version
Docker version 20.10.17, build 100c701
(sorry, edited mine, the previous one was from the older Mac - now it is correct)
$ docker --version
Docker version 20.10.16, build aa7e414
After trying again with docker compose down
then docker-compose up -d
and docker-compose logs -f
again, it worked - I can log into webclient and connect via cli to localhost:4064!
Unfortunately I am back to seeing the xml.etree.ElementTree.ParseError: no element found: line 1, column 0
error above now. 😭
Tried again - same error on bin/omero admin diagnostics
To start from scratch...
docker compose down
docker system prune
Total reclaimed space: 0B
$ docker-compose pull
$ docker-compose up -d
$ docker-compose logs -f
Web failed login again... In another terminal...
$ docker exec -it docker-example-omero_omeroserver_1 bash
$ cd /opt/omero/server/OMERO.server
$ bin/omero admin diagnostics
================================================================================
OMERO Diagnostics (admin) 5.11.2
================================================================================
Traceback (most recent call last):
File "/opt/omero/server/venv3/bin/omero", line 8, in <module>
sys.exit(main())
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/main.py", line 125, in main
rv = omero.cli.argv()
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/cli.py", line 1784, in argv
cli.invoke(args[1:])
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/cli.py", line 1222, in invoke
stop = self.onecmd(line, previous_args)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/cli.py", line 1299, in onecmd
self.execute(line, previous_args)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/cli.py", line 1381, in execute
args.func(args)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/install/windows_warning.py", line 26, in wrapper
return func(self, *args, **kwargs)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/plugins/prefs.py", line 79, in open_and_close_config
return func(*args, **kwargs)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/plugins/admin.py", line 1235, in diagnostics
template_xml = XML(templates.text())
File "/usr/lib64/python3.6/xml/etree/ElementTree.py", line 1315, in XML
return parser.close()
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
That failure at https://github.com/ome/omero-py/blob/7f979ce44b1fcbebfceb92cf51bf7c354a28ec57/src/omero/plugins/admin.py#L1235
seems to be because templates.xml
is not being read...
bash-4.2$ ls -alh etc/grid/
total 20K
drwxr-xr-x 1 omero-server omero-server 4.0K Sep 27 12:24 .
drwxr-xr-x 1 omero-server omero-server 4.0K Jun 29 08:56 ..
-rw-r--r-- 1 omero-server omero-server 2.4K Sep 27 12:24 config.xml
-rw-r--r-- 1 omero-server omero-server 0 Sep 27 12:22 templates.xml
-rw-r--r-- 1 omero-server omero-server 0 Sep 27 12:22 templates.xml.lock
It exists but seems empty:
bash-4.2$ cat etc/grid/templates.xml
bash-4.2$
Is this what's causing the server not to start?
Is this what's causing the server not to start?
Almost definitely since it's a vital file.
So where does it come from? How could it be that it's empty for me? Could I copy one from somewhere else?
Also, at one point above, the server did start for me, so it must have been there at some point (after the first time I saw the error for it being empty!)
You shouldn't need to do anything; in other words, something is going very wrong (disk space?).
I would have thought that 80 GB was enough for an empty server, but I boosted it to 120 GB and a few other settings too:
Then did a full stop, prune and restart as before... It worked, and I could log in to the webclient...
So, now I wanted to run without the webclient (since it interferes with running my dev web server).
docker compose down
then I commented -out the web section from compose.yml
and started everything up.
$ docker-compose pull
Pulling database ... done
Pulling omeroserver ... done
$ docker-compose up -d
Creating network "docker-example-omero_omero" with the default driver
Creating docker-example-omero_omeroserver_1 ... done
Creating docker-example-omero_database_1 ... done
$ docker-compose logs -f
But I can't seem to log in via the CLI or my dev omero-web.
$ omero login
Previously logged in to localhost:4064 as root
Server: [localhost:4064]
Username: [root]
Password:
internal server error
I don't see anything in the server var/log/Blitz-0.log while this is happening. $ omero admin diagnostics
nothing obvious...
2022-09-28 15:06:22,343 INFO [ ome.services.util.DBUserCheck] ( main) Group guest.id = 2
2022-09-28 15:06:26,848 INFO [ ome.services.fulltext.FullTextAnalyzer] ( main) Initialized FullTextAnalyzer
tail: inotify cannot be used, reverting to polling: Function not implemented
Tried docker compose down
and up again...
Now I see the xml.etree.ElementTree.ParseError: no element found: line 1, column 0
from empty templates.xml
again!
I wonder if docker compose down
is part of the problem. That's the only thing I'm doing that's not in the docs..?
You could try "docker-compose down -v" in order to remove the volumes. Changing your docker disk image size clobbers everything.
Maybe slightly brutish idea @will-moore : If I understand correctly, you are able to start all components successfully after some sequence of commands ? The only thing which is not according to your needs is the interference of the by-default-included omero-web with your development omero-web server ? If so, why not to run everything (postgres, server, web-server) and stop the interference by doing an exec
into the web docker and stopping the web manually, which will stop it interfering with your development web-server ?
After the last change of docker disk image size, it started OK then after docker compose down
and start again I go the templates.xml
error, so that doesn't seem to be caused by the settings change.
I tried docker compose down -v
just now...
This gives me...
Trying to login...
(omeroweb) Williams-MBP:docker-example-omero wmoore$ omero login
Previously logged in to localhost:4064 as root
Server: [localhost:4064]
Username: [root]
Password:
internal server error
Which gives this in the Blitz log
Tried to manually restart server... but this ended up stopping the docker container
docker exec -it docker-example-omero_omeroserver_1 bash
cd /opt/omero/server/OMERO.server
bin/omero admin restart
Waiting on shutdown. Use CTRL-C to exit
........
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2512db4fd335 postgres:11 "docker-entrypoint.s…" 6 days ago Up 6 days 5432/tcp docker-example-omero_database_1
Tried again...
$ docker compose down -v
$ docker compose up
$ omero login
Previously logged in to localhost:4064 as root
Server: [localhost:4064]
Username: [root]
Password:
InternalException: Failed to connect: Ice.ConnectionLostException:
recv() returned zero
$ bin/omero admin diagnostics
================================================================================
OMERO Diagnostics (admin) 5.11.2
================================================================================
Traceback (most recent call last):
File "/opt/omero/server/venv3/bin/omero", line 8, in <module>
sys.exit(main())
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/main.py", line 125, in main
rv = omero.cli.argv()
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/cli.py", line 1784, in argv
cli.invoke(args[1:])
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/cli.py", line 1222, in invoke
stop = self.onecmd(line, previous_args)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/cli.py", line 1299, in onecmd
self.execute(line, previous_args)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/cli.py", line 1381, in execute
args.func(args)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/install/windows_warning.py", line 26, in wrapper
return func(self, *args, **kwargs)
File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/plugins/prefs.py", line 79, in open_and_close_config
return func(*args, **kwargs)
File "/opt/omero/server/venv3/lib/python3.6/site-packages/omero/plugins/admin.py", line 1235, in diagnostics
template_xml = XML(templates.text())
File "/usr/lib64/python3.6/xml/etree/ElementTree.py", line 1315, in XML
return parser.close()
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
So, I think it's time to give up with Docker and try VirtualBox or something similar. Unless there's other Docker options to try..? I just want to have OMERO running on my laptop somehow!
Oh, VirtualBox isn't supported for M1 Mac (Monterey) 😢
I just want to have OMERO running on my laptop somehow!
@sbesson : did you have Ice working on M1 natively? If so, @will-moore, you could omero admin start
against the database that's running in docker.
@sbesson : did you have Ice working on M1 natively?
Pretty sure I had installed the zeroc-ice 3.6.5
package from conda-forge as they have arm64
builds in an environment. That was allowing me to use omero-py
i.e. client-side operations at minimum. I have not spent extra time on getting a native M1 server environment.
So it looks like we're back to Docker....
Any idea why bin/omero admin restart
seemed to kill the docker container (https://github.com/ome/docker-example-omero/issues/12#issuecomment-1268274965)?
Yeah, in docker you always need some process that remains running. (In fact, usually there should be exactly one.) When you enter a container, you've added an extra process but when you exit, the main process keeps going. Running restart
ran stop
and therefore the main process of the docker was gone and so things got cleaned up.
@will-moore Do you want to maybe try this https://github.com/ome/ansible-example-omero-onenode/issues/13#issue-1352041067 workflow ? It seems a bit more commands to run on the first look, but it works fine in my hands, and technically it is less complicated (you will get everything in only one container, not 3 (which you do not need)). It will take a bit of time, but not more than 15 minutes. I cannot see what could go wrong there... (maybe that is the problem :))
After following the README, I have a working OMERO.web but cannot log in to OMERO.server as it reports server not responding.
My admin diagnostics say
My master.err
My Blitz log is very short
This works perfectly fine on Mac Book Pro , but on M1 I have probs as above. Any ideas please @joshmoore @sbesson ?