1

I installed and run OnlyOffice docker image on my local windows machine with this command:

docker run -i -t -d -p 9950:80 --restart=always -v C:/work/only_office/logs:/var/log/onlyoffice onlyoffice/documentserver-de

Then run commands described on this page - http://localhost:9950/welcome/ for testing OnlyOffilce:

docker exec 2a9aa47c18a2 sudo supervisorctl start ds:example
docker exec 2a9aa47c18a2 sudo sed "s,autostart=false,autostart=true," -i /etc/supervisor/conf.d/ds-example.conf

This page - http://localhost:9950/example/ starts working. But when I try to create, open or upload document I am getting this error:
enter image description here And errors in the log files:

[2020-07-07T12:30:24.892] [ERROR] nodeJS - error downloadFile:url=http://127.0.0.1:9950/example/files/172.17.0.1/new%20(2).docx;attempt=1;code:ECONNREFUSED;connect:null;(id=172.17.0.1http___127.0.0.1_9950_example_files_172.17.0.1_new_20_2_.docx1594125018845)
Error: connect ECONNREFUSED 127.0.0.1:9950
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
[2020-07-07T12:30:25.894] [ERROR] nodeJS - error downloadFile:url=http://127.0.0.1:9950/example/files/172.17.0.1/new%20(2).docx;attempt=2;code:ECONNREFUSED;connect:null;(id=172.17.0.1http___127.0.0.1_9950_example_files_172.17.0.1_new_20_2_.docx1594125018845)
Error: connect ECONNREFUSED 127.0.0.1:9950
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)
[2020-07-07T12:30:26.897] [ERROR] nodeJS - error downloadFile:url=http://127.0.0.1:9950/example/files/172.17.0.1/new%20(2).docx;attempt=3;code:ECONNREFUSED;connect:null;(id=172.17.0.1http___127.0.0.1_9950_example_files_172.17.0.1_new_20_2_.docx1594125018845)
Error: connect ECONNREFUSED 127.0.0.1:9950
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)

[2020-07-07T12:30:24.881] [ERROR] nodeJS - postData error: docId = 172.17.0.1http___127.0.0.1_9950_example_files_172.17.0.1_new_20_2_.docx1594125018845;url = http://127.0.0.1:9950/example/track?filename=new%20(2).docx&useraddress=172.17.0.1;data = {"key":"172.17.0.1http___127.0.0.1_9950_example_files_172.17.0.1_new_20_2_.docx1594125018845","status":1,"users":["uid-1"],"actions":[{"type":1,"userid":"uid-1"}]}
Error: connect ECONNREFUSED 127.0.0.1:9950
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14)

I tried to switch off firewall and test it on another Windows PC but the issue is the same. Any ideas how to fix it?

Maksym
  • 2,650
  • 3
  • 32
  • 50

3 Answers3

1

Check this one out. Seems like some process is running on the port you are using. Try switching your ports.

References:

"The ECONNREFUSED Connection refused by the server error, is a common error returned by the Filezilla FTP client. This error indicates that the user is trying to connect to your server and is unable to connect to the port."

https://community.progress.com/s/article/Connection-Error-ECONNREFUSED-Connection-refused-by-the-server

ECONNREFUSED on running localhost server from NodeJS

Node.js Error: connect ECONNREFUSED

pr0cz
  • 509
  • 7
  • 22
1

I had the same problem and after trying for a while I just try following the documentation and it worked, you have to run the docker image in port 80, that will solve the error.

docker run -i -t -d -p 80:80 --restart=always -v C:/work/only_office/logs:/var/log/onlyoffice onlyoffice/documentserver-de

I'm searching for change the port in a proper way. Let me know if you find out.

Juan Salcedo
  • 1,598
  • 1
  • 16
  • 28
0

According to support's answer the current last version (5.5.3) of OnlyOffice is not working on Windows docker:

Unfortunately, at the moment we do not recommend using this method of installing Document Server. If you would like to use a docker installation, please use this Document Server installation guide on *NIX systems.

I run docker image on CentOs server. Now everything is working as expected.

Maksym
  • 2,650
  • 3
  • 32
  • 50