Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash at startup due to connexion error #75

Open
Aegdesil opened this issue Dec 6, 2024 · 6 comments
Open

Crash at startup due to connexion error #75

Aegdesil opened this issue Dec 6, 2024 · 6 comments

Comments

@Aegdesil
Copy link

Aegdesil commented Dec 6, 2024

When starting the container, I sometimes have this log:

2024-12-06T11:51:53.206046650Z using: LibreOffice 7.6.7.2 60(Build:2)
2024-12-06T11:51:53.206302472Z Running unoserver-docker in non-interactive.
2024-12-06T11:51:53.206362697Z For interactive mode use '-it', e.g. 'docker run -v /tmp:/data -it unoserver/unoserver-docker'.
2024-12-06T11:51:54.967482521Z INFO:unoserver:Starting unoserver 3.0.1.
2024-12-06T11:51:54.967893786Z INFO:unoserver:Command: /usr/bin/soffice --headless --invisible --nocrashreport --nodefault --nologo --nofirststartwizard --norestore -env:UserInstallation=file:///tmp/tmpudpx_gho --accept=socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ComponentContext
2024-12-06T11:52:05.040349865Z INFO:unoserver:Starting UnoConverter.
2024-12-06T11:52:05.060533225Z Exception in thread Thread-1 (serve):
2024-12-06T11:52:05.060587570Z Traceback (most recent call last):
2024-12-06T11:52:05.060596136Z   File "/usr/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
2024-12-06T11:52:05.061627199Z     self.run()
2024-12-06T11:52:05.061786897Z   File "/usr/lib/python3.12/threading.py", line 1012, in run
2024-12-06T11:52:05.062492710Z     self._target(*self._args, **self._kwargs)
2024-12-06T11:52:05.062716960Z   File "/usr/lib/python3.12/site-packages/unoserver/server.py", line 131, in serve
2024-12-06T11:52:05.064504401Z     self.conv = converter.UnoConverter(
2024-12-06T11:52:05.064532172Z                 ^^^^^^^^^^^^^^^^^^^^^^^
2024-12-06T11:52:05.064539967Z   File "/usr/lib/python3.12/site-packages/unoserver/converter.py", line 77, in __init__
2024-12-06T11:52:05.066046191Z     self.context = self.resolver.resolve(
2024-12-06T11:52:05.066073684Z                    ^^^^^^^^^^^^^^^^^^^^^^
2024-12-06T11:52:05.066168577Z unoserver.converter.com.sun.star.connection.NoConnectException: Connector : couldn't connect to socket (Connection refused) at /home/buildozer/aports/community/libreoffice/src/libreoffice-7.6.7.2/io/source/connector/connector.cxx:118
2024-12-06T11:52:06.974740268Z INFO:unoserver:Failed to start servers

This does not happen systematically, I suspect some race condition, maybe when the host is too slow to start the server ?
Restarting the container fixes the problem, but it is annoying to do regularly.

Is there a way to add a retry / longer timeout ?

@Aegdesil
Copy link
Author

Aegdesil commented Dec 6, 2024

Here is another similar log

using: LibreOffice 7.6.7.2 60(Build:2)
Running unoserver-docker in non-interactive.
For interactive mode use '-it', e.g. 'docker run -v /tmp:/data -it unoserver/unoserver-docker'.
INFO:unoserver:Starting unoserver 3.0.1.
INFO:unoserver:Command: /usr/bin/soffice --headless --invisible --nocrashreport --nodefault --nologo --nofirststartwizard --norestore -env:UserInstallation=file:///tmp/tmpxnz56_15 --accept=socket,host=127.0.0.1,port=2002,tcpNoDelay=1;urp;StarOffice.ComponentContext
INFO:unoserver:Starting UnoConverter.
INFO:unoserver:Starting UnoComparer.
Exception in thread Thread-1 (serve):
Traceback (most recent call last):
  File "/usr/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1012, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.12/site-packages/unoserver/server.py", line 134, in serve
    self.comp = comparer.UnoComparer(
                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/unoserver/comparer.py", line 69, in __init__
    self.context = self.resolver.resolve(
                   ^^^^^^^^^^^^^^^^^^^^^^
unoserver.comparer.com.sun.star.lang.DisposedException: Binary URP bridge disposed during call at /home/buildozer/aports/community/libreoffice/src/libreoffice-7.6.7.2/binaryurp/source/bridge.cxx:615
INFO:unoserver:Failed to start servers

@jimisola
Copy link
Member

jimisola commented Dec 7, 2024

@regebro Do you have any input here? The main change in the docker is an upgrade of unoserver.

@regebro
Copy link
Member

regebro commented Dec 7, 2024

It could be that it's slow to start, and that the code that improves the handling of what happens when LibreOffice isn't started then errors out.

"Binary URP bridge disposed" is strange, that sounds like Libreoffice crashed during the call. But the first error could be a timeout.

I'll look into if I can handle that better.

@jimisola
Copy link
Member

@regebro Thanks. Any updates?

@jimisola
Copy link
Member

@regebro Any updates? Not sure if there is anything that I can change in the container image.

@regebro
Copy link
Member

regebro commented Dec 26, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants