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

Error when converting after installing version 2.2.2 or newer #161

Open
desplega opened this issue Jan 29, 2025 · 0 comments
Open

Error when converting after installing version 2.2.2 or newer #161

desplega opened this issue Jan 29, 2025 · 0 comments

Comments

@desplega
Copy link

desplega commented Jan 29, 2025

Failing environment

Ubuntu 22.04.5 LTS
LibreOffice 7.3.7.2 30(Build:2)
Supervisor: 4.2.1
Unoserver: 2.2.2

Description

Unoserver is configured to run under "supervisor" management. Configuration at /etc/supervisor/conf.d/dev.conf is:

[program:unoserver]
command=unoserver
user=ubuntu
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
redirect_stderr=true
stderr_logfile=/var/log/unoserver.err.log
stdout_logfile=/var/log/unoserver.out.log

When convertion is requested the following error appears:

ubuntu@dev:$ unoconvert --convert-to pdf 72350001.doc 72350001.pdf
INFO:unoserver:Connecting.
Traceback (most recent call last):
  File "/usr/local/bin/unoconvert", line 8, in <module>
    sys.exit(converter_main())
  File "/usr/local/lib/python3.10/dist-packages/unoserver/client.py", line 354, in converter_main
    result = client.convert(
  File "/usr/local/lib/python3.10/dist-packages/unoserver/client.py", line 124, in convert
    info = self._connect(proxy)
  File "/usr/local/lib/python3.10/dist-packages/unoserver/client.py", line 52, in _connect
    info = proxy.info()
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1122, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1464, in __request
    response = self.__transport.request(
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1166, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1178, in single_request
    http_conn = self.send_request(host, handler, request_body, verbose)
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1291, in send_request
    self.send_content(connection, request_body)
  File "/usr/lib/python3.10/xmlrpc/client.py", line 1321, in send_content
    connection.endheaders(request_body)
  File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/usr/lib/python3.10/http/client.py", line 942, in connect
    self.sock = self._create_connection(
  File "/usr/lib/python3.10/socket.py", line 845, in create_connection
    raise err
  File "/usr/lib/python3.10/socket.py", line 833, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

Note 1

To fix the issue I uninstall version 2.2.2 and install version 2.2.1:

$ sudo pip uninstall unoserver -y
$ sudo pip install unoserver==2.2.1
$ sudo reboot

After that, the conversion runs smoothly:

ubuntu@dev:$ unoconvert --convert-to pdf 72350001.doc 72350001.pdf
INFO:unoserver:Connecting.
INFO:unoserver:Converting.
INFO:unoserver:Saved to 72350001.pdf.
ubuntu@dev:$

Note 2

Replicating the same environment in a docker container without the supervisor works as expected. No issues with version 3.1. Hence it seems to me that the issue is related with the call to unoserver from supervisor.

Questions

What did it change in version 2.2.2 that may affect the relation between supervisor and unoserver?
Is there any supervisor configuration that solves the issue?

@desplega desplega changed the title Error when converting when updating to 2.2.2 onwards Error when converting when using version 2.2.2 onwards Jan 29, 2025
@desplega desplega changed the title Error when converting when using version 2.2.2 onwards Error when converting after installin version 2.2.2 or newer Jan 29, 2025
@desplega desplega changed the title Error when converting after installin version 2.2.2 or newer Error when converting after installing version 2.2.2 or newer Jan 29, 2025
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

1 participant