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: Unable to connect or start own listener. Aborting #2

Open
CReimer opened this issue Feb 9, 2019 · 2 comments
Open

Error: Unable to connect or start own listener. Aborting #2

CReimer opened this issue Feb 9, 2019 · 2 comments

Comments

@CReimer
Copy link

CReimer commented Feb 9, 2019

I wanted to test how stable this is for a project of mine with a high workload
So I started 5 while true loops with curl in it to see how unoconv-server handles this.

At first everything seemed fine, but after a few minutes I started seeing these error messages

unoconv --format pdf --output /tmp/dbfa20ed-581d-4f97-8355-6477d9576716.pdf /tmp/dbfa20ed-581d-4f97-8355-6477d9576716.ods
Error: Failed to connect to /usr/lib/libreoffice/program/soffice.bin (pid=27433) in 6 seconds.
Connector : couldn't connect to socket (Connection refused)
Error: Unable to connect or start own listener. Aborting.

    at ChildProcess.handler.on (/home/christopher/Projects/node_modules/unoconv-server/lib/converter.js:148:25)
    at ChildProcess.emit (events.js:188:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
Error: Failed to connect to /usr/lib/libreoffice/program/soffice.bin (pid=27449) in 6 seconds.
Connector : couldn't connect to socket (Connection refused)
Error: Unable to connect or start own listener. Aborting.

    at ChildProcess.handler.on (/home/christopher/Projects/node_modules/unoconv-server/lib/converter.js:148:25)
    at ChildProcess.emit (events.js:188:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
Error: Failed to connect to /usr/lib/libreoffice/program/soffice.bin (pid=27450) in 6 seconds.
Connector : couldn't connect to socket (Connection refused)
Error: Unable to connect or start own listener. Aborting.

    at ChildProcess.handler.on (/home/christopher/Projects/node_modules/unoconv-server/lib/converter.js:148:25)
    at ChildProcess.emit (events.js:188:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
POST /convert/format/pdf
[ '--format', 'pdf' ] { format: 'pdf' } '/tmp/26f0beb2-fd2e-45d0-8502-beb0d2d63354.pdf'
@jonasrydenhag
Copy link

LibreOffice doesn't work well with concurrent processes, I added a simple express-queue here, https://github.com/Yaraku/unoconv-server, that handles the requests one by one. I haven't really had the time to really stress test it, but in some simple tests that I made it seems like LibreOffice becomes more stable. You could check it out.

@alphakevin
Copy link
Owner

alphakevin commented Feb 28, 2019

Sorry for replying late, it seems @jonasrydenhag 's fork would work more stable.

if you have a lot of workload, and need fast response, consider starting several docker containers, and use nginx as reverse-proxy for load balance http://nginx.org/en/docs/http/load_balancing.html.

We have production use of about 500 users, in regular OA software, single instance, and it's fine.

I will merge the fork, and find some solution better solution for this

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