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

Download Failed error when opening document #33

Closed
firlevapz opened this issue Jul 15, 2016 · 11 comments
Closed

Download Failed error when opening document #33

firlevapz opened this issue Jul 15, 2016 · 11 comments

Comments

@firlevapz
Copy link

I installed the current mailserver, document-server and community-server with HTTPS via docker bash installation script.
From time to time i get this error when I upload a new document or when I share an existing:

"Download Failed. Press OK to return to ..."

Then when i restart the document-server docker container, it usually works again...

I figured out that there is an exception thrown by nodejs an logged in /app/onlyoffice/DocumentServer/logs/documentserver/converter/out.log

[2016-07-15 08:03:56.280] [ERROR] nodeJS - error downloadFile:url=https://docs.example.com/products/files/httphandlers/filehandler.ashx?action=stream&fileid=37&version=5&stream_auth=206265832982.IJEPMN945PZVF9OO5MPLLIPP2HNDRDEQ2MAUV8KEA;attempt=2;(id=7DAuoz7BW5OqJXh1B4Q_)
Error: Parse Error
    at Error (native)
    at TLSSocket.socketOnData (_http_client.js:320:20)
    at emitOne (events.js:77:13)
    at TLSSocket.emit (events.js:169:7)
    at readableAddChunk (_stream_readable.js:153:18)
    at TLSSocket.Readable.push (_stream_readable.js:111:10)
    at TLSWrap.onread (net.js:531:20)

We would also pay around $50 if someone could help us fixing this issue and have onlyoffice running stable...

Thanks!!

@Dean13
Copy link

Dean13 commented Jul 19, 2016

Hello,

Practically the error was fixed on 10th of March.
request/request#1884
nodejs/http-parser#284

Please check the version of Node.js you have.

Please add at the same place in your code: https://github.com/ONLYOFFICE/server/blob/6816bb407c3851b4329f2cebd52d053b54575c5a/FileConverter/sources/converter.js#L176

the following code: logger.error('error downloadFile:url=%s;attempt=%d;(id=%s);(code=%s)\r\n%s', uri, downloadAttemptCount, docId, err.code, err.stack);

@Dean13 Dean13 closed this as completed Jul 19, 2016
@Dean13 Dean13 reopened this Jul 19, 2016
@firlevapz
Copy link
Author

Hi Dean, thanks for your reply.
I'm using the current docker-version of onlyoffice, thus node.js version is 4.4.5 in onlyoffice-document-server container.
I changed the line 176 in converter.js as you mentioned and here is the new output with the error code:

error downloadFile:url=https://docs.example.com/products/files/httphandlers/filehandler.ashx?action=stream&fileid=65&version=1&stream_auth=206789175723.OMRTKC8JOKAH7UPGAMHTRAHEDRMFBIXUQQDEGJI;attempt=3;(id=kfb6czjVh64Bd009f3s_);(code=HPE_INVALID_CONSTANT)

Do you have any idea, how to fix that problem?

@Dean13
Copy link

Dean13 commented Jul 21, 2016

Would you please send us an SSH access details to the ONLYOFFICE server? You may send the details to the [email protected]

@firlevapz
Copy link
Author

It is just a regular docker instance running with SSL on an Ubuntu 16.04 machine... ssh is behind a proxy, so I cannot give you access to.
Any other ideas?

@trofim24
Copy link
Contributor

Please specify the version of the mailserver, document-server and community-server

@firlevapz
Copy link
Author

these are the docker images i have installed:

REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
onlyoffice/communityserver   8.9.0.150           fc518029bb99        9 days ago          1.609 GB
onlyoffice/documentserver    4.0.0.9             6f793c91ae65        3 weeks ago         1.416 GB
onlyoffice/mailserver        1.6.10              cb5d6453dfef        4 weeks ago         1.29 GB

@Dean13
Copy link

Dean13 commented Jul 25, 2016

  1. Please specify the exact command you use for restarting Document Server.
  2. Please describe the exact scenario, if the issue appears on one file or on the different ones.
  3. Please perform the command "df -h" inside the document server container after the problem appears once again and send us the results to [email protected]

@firlevapz
Copy link
Author

Hi!
Thanks for your replies:

  1. sudo docker restart a4d390394021 (onlyoffice/documentserver container)
  2. The problem usually occurs randomly, but nearly always, when a new file is uploaded. It appears on different files, but i can send you a file to [email protected] which then fails to be uploaded.
  3. the output of df-h is following:
> Filesystem                    Size  Used Avail Use% Mounted on
> none                           27G   11G   16G  40% /
> tmpfs                         2.0G     0  2.0G   0% /dev
> tmpfs                         2.0G     0  2.0G   0% /sys/fs/cgroup
> /dev/mapper/srv--80--vg-root   27G   11G   16G  40% /etc/onlyoffice
> shm                            64M     0   64M   0% /dev/shm

maybe you can also need the ps aux output from the container:

root@a4d390394021:/# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   4448    24 ?        Ss   02:00   0:00 /bin/sh -c bash -C '/app/onlyoffice/run-document-server.sh';'bash'
root        65  0.0  0.0   4448     4 ?        S    02:00   0:00 /bin/sh /usr/bin/mysqld_safe
mysql      414  0.0  0.6 632340 26232 ?        Sl   02:00   0:08 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid -
redis      532  0.0  0.1  38572  5660 ?        Ssl  02:00   0:07 /usr/bin/redis-server 127.0.0.1:6379
rabbitmq   596  0.0  0.0   7500     0 ?        S    02:00   0:00 /usr/lib/erlang/erts-5.10.4/bin/epmd -daemon
rabbitmq   670  0.0  0.0   4448     0 ?        S    02:00   0:00 /bin/sh /usr/sbin/rabbitmq-server
rabbitmq   706  0.1  1.0 732176 42040 ?        Sl   02:00   0:25 /usr/lib/erlang/erts-5.10.4/bin/beam -W w -K true -A30 -P 1048576 -- -root /usr/lib/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa /usr/lib/rabbitmq/lib/rabbitmq_server-3.2.
root       801  0.0  0.0 133332   108 ?        Ss   02:00   0:00 nginx: master process /usr/sbin/nginx
www-data   802  0.0  0.7 543232 29204 ?        S    02:00   0:00 nginx: worker process
www-data   803  0.0  0.0 133504   168 ?        S    02:00   0:00 nginx: cache manager process
rabbitmq   817  0.0  0.0   7464    84 ?        Ss   02:00   0:00 inet_gethost 4
rabbitmq   818  0.0  0.0   9556   124 ?        S    02:00   0:00 inet_gethost 4
root       821  0.0  0.2  62148 10160 ?        Ss   02:00   0:03 /usr/bin/python /usr/bin/supervisord -c /etc/supervisor/supervisord.conf
onlyoff+   827  0.0  0.2 936412 10804 ?        Sl   02:00   0:00 statsd
onlyoff+   828  0.0  0.2 904748 11340 ?        Sl   02:00   0:00 node --harmony /var/www/onlyoffice/documentserver/server/SpellChecker/sources/server.js
onlyoff+   832  0.0  0.6 1088556 25780 ?       Sl   02:00   0:01 node /var/www/onlyoffice/documentserver/server/DocService/sources/gc.js
onlyoff+   860  0.0 19.5 1813352 791200 ?      Sl   02:00   0:03 /usr/bin/nodejs --harmony /var/www/onlyoffice/documentserver/server/SpellChecker/sources/server.js
onlyoff+   899  0.0  0.3 937596 16056 ?        Sl   02:00   0:00 node /var/www/onlyoffice/documentserver/server/DocService/sources/server.js
onlyoff+   904  0.0  1.1 1225952 47692 ?       Sl   02:00   0:01 /usr/bin/nodejs /var/www/onlyoffice/documentserver/server/DocService/sources/server.js
onlyoff+   919  0.0  0.3 937584 12952 ?        Sl   02:01   0:00 node /var/www/onlyoffice/documentserver/server/FileConverter/sources/convertermaster.js
onlyoff+   925  0.0  1.2 1231700 50580 ?       Sl   02:01   0:00 /usr/bin/nodejs /var/www/onlyoffice/documentserver/server/FileConverter/sources/convertermaster.js
root       935  0.0  0.0  19772   324 ?        S+   02:01   0:00 bash
root      4244  0.1  0.0  19776  3576 ?        Ss   06:34   0:00 bash
root      4259  0.0  0.0  17168  2452 ?        R+   06:34   0:00 ps aux

@firlevapz
Copy link
Author

Could it be related to this issue: request/request#2034
Which could be, that our server is too slow for the software to respond in time - could you set a timeout somewhere where this problem takes place??

@firlevapz
Copy link
Author

I fixed it by migrating to a faster server, with the required specs!! 👍
Thanks a lot for you help!!! Now everything works blazing fast and very beautiful!!!
Really great software you created there!!!

@regevbr
Copy link

regevbr commented May 10, 2017

https://github.com/creationix/http-parser-js fixed the issue for me

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

4 participants