nextcloud / documentserver_community

Document server for onlyoffice
https://apps.nextcloud.com/apps/documentserver_community
131 stars 29 forks source link

Document server fails with "./x2t: Permission denied" #10

Open Xeyk opened 4 years ago

Xeyk commented 4 years ago

Hey, all. I have updated my Nextcloud instance from 16 to 18. I uninstalled the OnlyOffice app, then reinstalled it. After doing that, I installed the Community Document Server app. Whenever I click on a .doc or .docx file, I get the error stated in the subject.

Please let me know if you need me to pull any logs and I will gladly do so.

florian-obradovic commented 4 years ago

Same here, updated from 17>18 image

tgurr commented 4 years ago

I got the same error and for me it was a permission problem, installed the app from within Nextcloud, I had the following in the logs:

Error documentserver_community OCA\DocumentServer\Document\DocumentConversionException: sh: ./x2t: Permission denied

Which was fixed by:

$ cd /var/www/vhost.server.domain/htdocs/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/
$ chmod u+x docbuilder x2t
poVoq commented 4 years ago

Same with the official 18.0.0RC2-apache Docker image.

I also just now upgraded from 17 to 18.

HackintoshHD commented 4 years ago

Thank you, @tgurr - I had similar errors in my logs when I tried to launch a newly installed OnlyOffice Community Edition of Nextcloud 18 and I can confirm a chmod u+x docbuilder x2t in apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/ fixes that.

Xeyk commented 4 years ago

@tgurr Thank you, this got me closer to a solution.

However, when I input this, it switched from a "Permission Denied" error to an "x2t not found" error.. Strangest thing. I am running my installation through docker, which may be the difference.

florian-obradovic commented 4 years ago

cd /var/www/nextcloud/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/ chmod u+x docbuilder x2t fixes the error "OCA\DocumentServer\Document\DocumentConversionException: sh: 1: ./x2t: Permission denied" image

But it doesn't fix the main issue "Community document server is not supported for this instance, please setup and configure an external document server"

xorbital commented 4 years ago

I fixed it by:

  1. Deactivating and uninstalling OnlyOffice and the document server
  2. Reinstalling OnlyOffice
  3. Reinstalling Document Server
  4. Applying the chmod fix by @tgurr
emasty commented 4 years ago

It fixed the permission denied log-entry but not the the "not supported" issue. I also tried the solution @xorbital suggested.

I am running the official nextcloud:latest docker container behind a reverse proxy. Could that be an issue? There is a entry in the onlyoffice settings called "Service address" for the documentserver. The reverse proxy does forward that address to the docker container but I don't know if the docker image handles that correctly. On the other hand, the "permission denied" log entry shouldn't occur if the documentserver could not be accessed...

molle100 commented 4 years ago

Thanks, but how can I realize the fix if my NC is running with a Webhoster: Where do I have to go and enter this? $ cd/var/www/vhost.server.domain/htdocs/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/ $ chmod u+x docbuilder x2t

Is it likely that there will be an update vor the apps that solve the problem without manually fixing it?

autoize commented 4 years ago

Thank you, @tgurr - I had similar errors in my logs when I tried to launch a newly installed OnlyOffice Community Edition of Nextcloud 18 and I can confirm a chmod u+x docbuilder x2t in apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/ fixes that.

Same, after changing the permissions of the x2t file based on @tgurr and @xorbital 's advice, OnlyOffice hangs at with spinning wheel with "document loading" and there's a Cloudn't create temp folder message in the NextCloud log.

OCA\DocumentServer\Document\DocumentConversionException: Couldn't create temp folder

OCP\AutoloadNotAllowedException: Autoload path not allowed: /var/www/nextcloud/apps/onlyoffice/lib/appconfig.php
Marcwa19197 commented 4 years ago

I got exactly the same issue. I updated manually (Downloading ZIP, copying old config.php and run occ upgrade) from NC 17 (latest patchlevel) to NC 18.

I installed the Community Document Server App (which i did not found in any officlal documentation) and installed ONLYOFFICE-App.

I even tried the permission fix by @tgurr without success. I'm still getting the errormessage "Community document server is not supported for this instance, please setup and configure an external document server"

Edit: Using Ubuntu 16.04 here.

OnyxSky commented 4 years ago

$ cd /var/www/vhost.server.domain/htdocs/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/ $ chmod u+x docbuilder x2t

For CentOS, RedHat & selinux distro do as root in addition to above

setsebool -P httpd_unified 1 ausearch -c 'x2t' --raw | audit2allow -M my-x2t semodule -i my-x2t.pp

NiTRoeSE commented 4 years ago

Same problem here.. the "chmod fix" fixes only the error message but not the"Community document server is not supported for this instance, please setup and configure an external document server" message.

I also deleted and reinstalled both apps, but it didnt help. Same config runs fine in NC18 RC2..thats strange. I also have done a manual upgrade from NC18 RC2 to NC18.

OS: Centos7 x64

edwardscaleb9 commented 4 years ago

Same issue here. I manually upgraded from 17.0.1 to 18.0.0, installed ONLYOFFICE then Community Document Server, ran the chmod fix. I'm running NextCloud on Ubuntu 18.04 behind a Citrix Netscaler doing SSL offloading.

xthursdayx commented 4 years ago

I'm having this same problem, and unfortunately the solution posted by @tgurr didn't work for me.

icewind1991 commented 4 years ago

0.1.2 should fix most of the "permission denied" errors.

For the sake of keeping the overview, if you're getting "Community document server not supported" errors with different causes in the log, please open a separate issue.

Marcwa19197 commented 4 years ago

0.1.2 should fix most of the "permission denied" errors.

For the sake of keeping the overview, if you're getting "Community document server not supported" errors with different causes in the log, please open a separate issue.

It also fixed the "Community document server is not supported for this instance, please setup and configure an external document server" error for me! Nice!

Edit: Now if i click on an Office-Document in the Webinterface its showing just an white page an nothing else happens. If i do an manual refresh of the page, "Onlyoffice" is loading and i can edit/view the file!

Edit2: My issue seems to be: https://github.com/nextcloud/documentserver_community/issues/13

Everything working now, thanks!

NiTRoeSE commented 4 years ago

0.1.2 should fix most of the "permission denied" errors.

For the sake of keeping the overview, if you're getting "Community document server not supported" errors with different causes in the log, please open a separate issue.

confirmed, version 0.1.2 works for me. :) thanks!

xthursdayx commented 4 years ago

Unfortunately I'm still getting the "Community document server is not supported for this instance, please setup and configure an external document server" error, but there are not any entires in my log, even with debug enabled. Any ideas where I should start trouble shooting?

NiTRoeSE commented 4 years ago

Unfortunately I'm still getting the "Community document server is not supported for this instance, please setup and configure an external document server" error, but there are not any entires in my log, even with debug enabled. Any ideas where I should start trouble shooting?

Was the same for me... upgrading document server to version 0.1.2 fixed it for me. Maybe its useful to restart webserver and deleting your browser cache... and/or deactivate and delete onlyoffice app and reinstall it after you have upgraded document-server app.

poVoq commented 4 years ago

You might also have to click the save button in the OO connector app at least once even if not changing anything?

florian-obradovic commented 4 years ago

Fixed with current version for me as well. Thx a lot for the fast fix!

polandy commented 4 years ago

For me the Community Document Server upgrade to 0.1.2 fixed it! Awesome, thx a lot!

ostasevych commented 4 years ago

I fixed my issues by upgrading glibc to 2.14+, what is normally required by the document server, so, please, check.

Xeyk commented 4 years ago

Unfortunately, upgrading to glibc 2.30 didn't work for me. I actually had to install it since I am running the Linuxserver.io version of Nextcloud which uses Alpine linux's musl libc. I think the installation worked as I got a new error stating

./x2t: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

I installed libstdc++6 which worked successfully, now I am back to the same message ""Community document server is not supported for this instance" However, no new error messages in the log are coming up.

xthursdayx commented 4 years ago

Unfortunately, upgrading to glibc 2.30 didn't work for me. I actually had to install it since I am running the Linuxserver.io version of Nextcloud which uses Alpine linux's musl libc. I think the installation worked as I got a new error stating

./x2t: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

I installed libstdc++6 which worked successfully, now I am back to the same message ""Community document server is not supported for this instance" However, no new error messages in the log are coming up.

I'm also running the Linuxserver Nextcloud container, so perhaps that has something to do with it? Anyway, please do update here if you find a solution.

I just reinstalled both apps, applied the chmod fix @tgurr described and am still getting the ./x2t not found error.

For anyone else running the Linuxserver Nextclouder Docker container, here is the related issue: https://github.com/linuxserver/docker-nextcloud/issues/128

[documentserver_community] Error: OCA\DocumentServer\Document\DocumentConversionException: sh: ./x2t: not found
 at <<closure>>

0. /config/www/nextcloud/apps/documentserver_community/lib/Document/ConverterBinary.php line 64
   OCA\DocumentServer\Document\ConverterBinary->run("")
1. /config/www/nextcloud/apps/documentserver_community/lib/Controller/StaticController.php line 90
   OCA\DocumentServer\Document\ConverterBinary->test()
2. /config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
   OCA\DocumentServer\Controller\StaticController->webApps("apps/api/documents/api.js")
3. /config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
   OC\AppFramework\Http\Dispatcher->executeController(OCA\DocumentServ ... {}, "webApps")
4. /config/www/nextcloud/lib/private/AppFramework/App.php line 125
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\DocumentServ ... {}, "webApps")
5. /config/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
   OC\AppFramework\App::main("OCA\\DocumentSe ... r", "webApps", OC\AppFramework\ ... {}, {path: "apps/api ... "})
6. <<closure>>
   OC\AppFramework\Routing\RouteActionHandler->__invoke({path: "apps/api ... "})
7. /config/www/nextcloud/lib/private/Route/Router.php line 299
   call_user_func(OC\AppFramework\ ... {}, {path: "apps/api ... "})
8. /config/www/nextcloud/lib/base.php line 1008
   OC\Route\Router->match("/apps/documents ... s")
9. /config/www/nextcloud/index.php line 38
   OC::handleRequest()

GET /apps/documentserver_community/web-apps/apps/api/documents/api.js
from 172.19.0.1 by xthursdayx at 2020-01-21T17:06:57+00:00
GreySyntax commented 4 years ago

Summarising the issue on: linuxserver/docker-nextcloud#128 Looking at the build process for this plugin it is currently extracting large parts of the onlyoffice/documentserver image. The version being extracted seems to only be x86-64 (won’t work on arm,ppc,etc). And the image itself is based on Ubuntu and installs the relevant deb package. This issue will likely be faced with any native binaries in the plugin.

It would probably be best if nextcloud shipped fat versions of native binaries to support multiple platforms and statically linked any dependencies to ensure they are portable across distros.

thelamer commented 4 years ago

Linuxserver team member here , you cannot just grab dynamically linked bins and distribute them . They are not portable.

You can however pass static flags at compile time to embed all needed libs and c toolchain to make them portable. Actually programming in a message about the binary not being compatible with the platform it is being run on shows to me that you have a large disconnect between your infra/build people and your front end people.

Please let me know if you have any questions , I am glad to help.

GreySyntax commented 4 years ago

Looking into onlyoffice it seems they only officially target x86-64 (some old success stories of cross compiling to other archs). I’ll try and work out the build system and see how easy it is to create a statically linked binary sometime over the next few days.

asteinmetzler commented 4 years ago

Just to add to the discussion - the document server is x86-64 only - interesting enough those binaries get also installed on the ARM platform. Below the output from a rPI4 running latest Nextcloud Docker image with activated the community document server app.

root@48cf63bfbeb2:/var/www/html/custom_apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin# file docbuilder 
docbuilder: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=d21e8e3e2bbc9ee69bed5dd4680f972424fecb4f, stripped
root@48cf63bfbeb2:/var/www/html/custom_apps/documentserver_community/3rdparty/onlyoffice/documentserver/server
root@48cf63bfbeb2:/var/www/html/custom_apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin# file x2t 
x2t: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=702ce357ba48aa06b820eba41081d1a5a83ff39b, stripped
root@48cf63bfbeb2:/var/www/html/custom_apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin#

This app should be disabled on other architecture ...

Nevarro commented 4 years ago

I'm still getting the "Community document server is not supported for this instance, please setup and configure an external document server" error on my Synology NAS. It's a x86-64 CPU, I installed the latest version of the documentserver and I changed the permissions as described above. The error is shown, if I try to open a document, however there's nothing coming up in the Nextcloud logs.

Edit: I get the same error when I deactivate the community server. Could there be a problem concerning the linking of both Onlyoffice and the document server?

buzter commented 4 years ago

I'm still getting the "Community document server is not supported for this instance, please setup and configure an external document server" error on my Synology NAS. It's a x86-64 CPU, I installed the latest version of the documentserver and I changed the permissions as described above. The error is shown, if I try to open a document, however there's nothing coming up in the Nextcloud logs.

Edit: I get the same error when I deactivate the community server. Could there be a problem concerning the linking of both Onlyoffice and the document server?

Same here on a Synology NAS. I have no more idea at this moment.

dasunsrule32 commented 4 years ago

So after stumbling around a lot and finally getting it installed, I also found out this is my issue as well. I'm doing webhosting and the host is CentOS with the following GLIBC installed.

rpm -qa|grep -i glibc
glibc-devel-2.12-1.212.el6_10.3.x86_64
glibc-headers-2.12-1.212.el6_10.3.x86_64
glibc-static-2.12-1.212.el6_10.3.x86_64
glibc-2.12-1.212.el6_10.3.i686
glibc-2.12-1.212.el6_10.3.x86_64
glibc-common-2.12-1.212.el6_10.3.x86_64

CentOS Version:

rpm -qa centos-release
centos-release-6-10.el6.centos.12.3.x86_64

Kernel Version:

uname -a
Linux host.domain.com 4.14.121-197.ELK.el6.x86_64 #1 SMP Tue May 21 13:24:40 CDT 2019 x86_64 x86_64 x86_64 GNU/Linux

It would be nice if this could be made more portable in the next version. It's really the only thing left that isn't working for me and I'd really like to free my self from Google, O365, etc.

Anyway, here is the log as well:

{"reqId":"XiqVo7U97HhU8tMciyjfEwAAABk","level":3,"time":"2020-01-24T06:58:44+00:00","remoteAddr":"XXX.XXX.XXX.XXX","user":"user","app":"documentserver_community","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":
{"Exception":"OCA\\DocumentServer\\Document\\DocumentConversionException","Message":"
  ./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by
  ./x2t)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by 
  ./libkernel.so)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by 
  ./libkernel.so)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by 
  ./libgraphics.so)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by 
  ./libPdfWriter.so)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by 
  ./libdoctrenderer.so)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by 
  ./libdoctrenderer.so)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by 
  ./libHtmlRenderer.so)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by 
  ./libPdfReader.so)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by 
  ./libDjVuFile.so)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by 
  ./libXpsFile.so)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by 
  ./libHtmlFile.so)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by 
  ./libUnicodeConverter.so)\n./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by 
  ./libicuuc.so.58)\n","Code":0,"Trace":[
{"file":"/home1/user/cloud.domain.co/apps/documentserver_community/lib/Document/ConverterBinary.php","line":64,"function":"run","class":"OCA\\DocumentServer\\Document\\ConverterBinary","type":"->","args":[""]},
{"file":"/home1/user/cloud.domain.co/apps/documentserver_community/lib/Controller/StaticController.php","line":90,"function":"test","class":"OCA\\DocumentServer\\Document\\ConverterBinary","type":"->","args":[]},
{"file":"/home1/user/cloud.domain.co/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"webApps","class":"OCA\\DocumentServer\\Controller\\StaticController","type":"->","args":["apps/api/documents/api.js"]},
{"file":"/home1/user/cloud.domain.co/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},
{"file":"/home1/user/cloud.domain.co/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},
{"file":"/home1/user/cloud.domain.co/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DocumentServer\\Controller\\StaticController","webApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},
{"file":"/home1/user/cloud.domain.co/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},
{"file":"/home1/user/cloud.domain.co/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/documentserver_community/web-apps/apps/api/documents/api.js"]},
{"file":"/home1/user/cloud.domain.co/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/home1/user/cloud.domain.co/apps/documentserver_community/lib/Document/ConverterBinary.php","Line":56,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36","version":"18.0.0.10"}

Dependency outputs:

ldd x2t
./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./x2t)
./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libkernel.so)
./x2t: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by ./libkernel.so)
./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libgraphics.so)
./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libPdfWriter.so)
./x2t: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by ./libdoctrenderer.so)
./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libdoctrenderer.so)
./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libHtmlRenderer.so)
./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libPdfReader.so)
./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libDjVuFile.so)
./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libXpsFile.so)
./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libHtmlFile.so)
./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libUnicodeConverter.so)
./x2t: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libicuuc.so.58)
        linux-vdso.so.1 =>  (0x00007fff4b747000)
        libkernel.so => ./libkernel.so (0x00007fee95365000)
        libgraphics.so => ./libgraphics.so (0x00007fee94b57000)
        libPdfWriter.so => ./libPdfWriter.so (0x00007fee945f3000)
        libdoctrenderer.so => ./libdoctrenderer.so (0x00007fee933f7000)
        libHtmlRenderer.so => ./libHtmlRenderer.so (0x00007fee931c2000)
        libPdfReader.so => ./libPdfReader.so (0x00007fee92b6a000)
        libDjVuFile.so => ./libDjVuFile.so (0x00007fee9282f000)
        libXpsFile.so => ./libXpsFile.so (0x00007fee925f5000)
        libHtmlFile.so => ./libHtmlFile.so (0x00007fee923d8000)
        libUnicodeConverter.so => ./libUnicodeConverter.so (0x00007fee9218c000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fee91f6f000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fee91ceb000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fee91957000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fee95786000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fee91651000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fee9143b000)
        libicuuc.so.58 => ./libicuuc.so.58 (0x00007fee91075000)
        libicudata.so.58 => ./libicudata.so.58 (0x00007fee8f575000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fee8f371000)
ldd docbuilder
./docbuilder: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./docbuilder)
./docbuilder: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libkernel.so)
./docbuilder: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by ./libkernel.so)
./docbuilder: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by ./libdoctrenderer.so)
./docbuilder: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libdoctrenderer.so)
./docbuilder: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libUnicodeConverter.so)
./docbuilder: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libgraphics.so)
./docbuilder: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./libicuuc.so.58)
        linux-vdso.so.1 =>  (0x00007fff6d7f6000)
        libkernel.so => ./libkernel.so (0x00007f0a523b4000)
        libdoctrenderer.so => ./libdoctrenderer.so (0x00007f0a511b8000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f0a50e24000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0a50c07000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f0a50983000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0a527d5000)
        libUnicodeConverter.so => ./libUnicodeConverter.so (0x00007f0a50737000)
        libgraphics.so => ./libgraphics.so (0x00007f0a4ff29000)
        libicuuc.so.58 => ./libicuuc.so.58 (0x00007f0a4fb63000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f0a4f85d000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0a4f647000)
        libicudata.so.58 => ./libicudata.so.58 (0x00007f0a4db47000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f0a4d943000)
icewind1991 commented 4 years ago

0.1.3 includes a number of checks to show more detailed error messages for known limitations

xthursdayx commented 4 years ago

I just tried reinstalling both OnlyOffice and the Community Document server, but I am still unable to open documents. I am now also getting these error, which seems to be related:

[PHP] Error: stream_get_contents(): supplied resource is not a valid stream resource at /config/www/nextcloud/apps/documentserver_community/lib/Document/FontManager.php#63

POST /settings/apps/enable
from 172.19.0.1 by xthursdayx at 2020-01-24T19:13:15+00:00

and

[PHP] Error: fclose(): supplied resource is not a valid stream resource at /config/www/nextcloud/apps/documentserver_community/lib/Document/FontManager.php#62

POST /settings/apps/enable
from 172.19.0.1 by xthurdayx at 2020-01-24T19:13:15+00:00
ghost commented 4 years ago

Similar here but not identical:

[PHP] Error: stream_get_contents(): supplied resource is not a valid stream resource at /web/nextcloud/apps/documentserver_community/lib/SetupCheck.php#76

GET /nextcloud/index.phpmentserver_community/web-apps/apps/api/documents/api.js
from 88.75.26.157 by admin at 2020-01-24T19:54:35+00:00
anatomism commented 4 years ago

$ cd /var/www/vhost.server.domain/htdocs/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/ $ chmod u+x docbuilder x2t

For CentOS, RedHat & selinux distro do as root in addition to above

setsebool -P httpd_unified 1 ausearch -c 'x2t' --raw | audit2allow -M my-x2t semodule -i my-x2t.pp

This fixed it for me running CentOS 7, DocServer 0.1.3.

Maybe the SEManage rules should be added to 0.1.4 for good measure for anyone on Cent/RHEL. It's beyond my capabilities I'm afraid. @icewind1991

wuast94 commented 4 years ago

Similar here but not identical:

[PHP] Error: stream_get_contents(): supplied resource is not a valid stream resource at /web/nextcloud/apps/documentserver_community/lib/SetupCheck.php#76

GET /nextcloud/index.phpmentserver_community/web-apps/apps/api/documents/api.js
from 88.75.26.157 by admin at 2020-01-24T19:54:35+00:00

i have the same error with "OCA\DocumentServer\Document\DocumentConversionException: sh: ./x2t: not found"

and i am using the linuxserver docker too.

will there be a fix or a workaround for that ?

TomasTokaMrazek commented 4 years ago

0.1.2 didn't resolve the issue for me, still getting OCA\DocumentServer\Document\DocumentConversionException: sh: ./x2t: not found

I'm using official Nextcloud docker image (nextcloud:fpm-alpine)

thelamer commented 4 years ago

Yeah Alpine is muslc none of these glibc bins will ever work in ours (linuxserver) or their Alpine flavor.

I get that compiling the whole codebase for document server is a large task especially considering the associative deps, qt stack, and very controlled build env ( I think they are still on Xenial ) but if you are gonna include this bin as a default plugin you have to do more than ripping it out of their docker image and hoping it works with the libs you have installed sys level .

We need a build process for this bin with stripped down source code to support it downstream.

xthursdayx commented 4 years ago

I've already mentioned this in a comment on issue https://github.com/nextcloud/documentserver_community/issues/24 , but after the most recent updates to ONLYOFFICE and the community document server I started getting a different error message ONLYOFFICE not reachable. Contact your Administrator.

I uninstalled and reinstalled both ONLYOFFICE and the community document server, clicked save in the ONLYOFFICE settings, and also did the chmod u+x docbuilder x2t fix @tgurr described, but it didn't change anything.

Here are the two most recent related logs:

[documentserver_community] Error: OCA\DocumentServer\Document\DocumentConversionException: sh: ./x2t: not found
 at <<closure>>

 0. /config/www/nextcloud/apps/documentserver_community/lib/Document/ConverterBinary.php line 64
    OCA\DocumentServer\Document\ConverterBinary->run("")
 1. /config/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php line 34
    OCA\DocumentServer\Document\ConverterBinary->test()
 2. /config/www/nextcloud/apps/documentserver_community/lib/Controller/StaticController.php line 89
    OCA\DocumentServer\SetupCheck->check()
 3. /config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\DocumentServer\Controller\StaticController->webApps("apps/api/documents/api.js")
 4. /config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\DocumentServ ... {}, "webApps")
 5. /config/www/nextcloud/lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\DocumentServ ... {}, "webApps")
 6. /config/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\DocumentSe ... r", "webApps", OC\AppFramework\ ... {}, {path: "apps/api ... "})
 7. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({path: "apps/api ... "})
 8. /config/www/nextcloud/lib/private/Route/Router.php line 299
    call_user_func(OC\AppFramework\ ... {}, {path: "apps/api ... "})
 9. /config/www/nextcloud/lib/base.php line 1008
    OC\Route\Router->match("/apps/documents ... s")
10. /config/www/nextcloud/index.php line 38
    OC::handleRequest()

GET /apps/documentserver_community/web-apps/apps/api/documents/api.js
from 172.19.0.1 by xthursdayx at 2020-01-29T21:25:24+00:00
[index] Error: Exception: trim() expects parameter 1 to be string, bool given at <<closure>>

0. /config/www/nextcloud/lib/private/AppFramework/App.php line 125
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\DocumentServ ... {}, "webApps")
1. /config/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
   OC\AppFramework\App::main("OCA\\DocumentSe ... r", "webApps", OC\AppFramework\ ... {}, {path: "apps/api ... "})
2. <<closure>>
   OC\AppFramework\Routing\RouteActionHandler->__invoke({path: "apps/api ... "})
3. /config/www/nextcloud/lib/private/Route/Router.php line 299
   call_user_func(OC\AppFramework\ ... {}, {path: "apps/api ... "})
4. /config/www/nextcloud/lib/base.php line 1008
   OC\Route\Router->match("/apps/documents ... s")
5. /config/www/nextcloud/index.php line 38
   OC::handleRequest()

GET /apps/documentserver_community/web-apps/apps/api/documents/api.js
from 172.19.0.1 by xthursdayx at 2020-01-29T21:25:51+00:00
RaminAsgharian commented 4 years ago

Community document server "not supported for this instance" can't execute x2t binary, ensure php can execute binaries in the app folder sh: ./x2t: Permission denied

I upgraded to 18/hub today and installed the OnlyOffice and Community Document Server apps but am greeted with an error when I try to open an existing or create a new document: "Community document server is not supported for this instance, please setup and configure an external document server" I also give permission, but it returns to the previous state after the error. $ chmod u+x docbuilder x2t

marshalleq commented 4 years ago

I'm also getting the ONLYOFFICE cannot be reached. Please contact admin. I've set the permissions of x2t as per above and still no luck. It would be useful to know if this is DNS related or permissions related. I suspect it's DNS related (or reverse proxy related) based on the below.

2020/01/29 20:31:06 [error] 347#347: 192092 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 172.18.0.3, server: _, request: "GET /ocs/v2.php/core/navigation/apps?absolute=true&format=json HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.domain.com" 2020/02/06 10:25:19 [error] 347#347: 1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.18.0.3, server: , request: "PROPFIND /remote.php/dav/files/9e40bcc8-5a53-1039-9f93-d18f70623e38/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.domain.com" 2020/02/09 17:44:25 [error] 346#346: *72 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 172.18.0.3, server: , request: "GET /csrftoken HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "nextcloud.domain.com"

And the result of that is OCA\DocumentServer\Document\DocumentConversionException: sh: ./x2t: not found

Nextcloud itself DOES resolve via my set up reverse proxy correctly, so unless there's an extra line needed for onlyoffice, but I assume they both communicate via the same web server over port 443. It is only the onlyoffice instance that's not working, so there must be something basic I'm missing. Also I assume the port 9000 above is some internal port that is set up for nextcloud / onlyoffice and doesn't need to be entered into the url anywhere...

BTW I'm using the linuxserver.io container...

lalala119 commented 4 years ago

I got exactly same issue that xthursdayx has. Any hints?

xthursdayx commented 4 years ago

I got exactly same issue that xthursdayx has. Any hints?

To my knowledge, this hasn’t been fixed. Or at least nothing I’ve done has fixed the issue.

sean-sullivan1 commented 4 years ago

I'll throw my error into the party too hopefully someone can provide a fix. I did run the chmod command that @tgurr posted previously. I am also running this in docker.

[documentserver_community] Error: OCA\DocumentServer\Document\DocumentConversionException: sh: ./x2t: not found
 at <<closure>>

 0. /config/www/nextcloud/apps/documentserver_community/lib/Document/ConverterBinary.php line 72
    OCA\DocumentServer\Document\ConverterBinary->run("")
 1. /config/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php line 34
    OCA\DocumentServer\Document\ConverterBinary->test()
 2. /config/www/nextcloud/apps/documentserver_community/lib/Controller/StaticController.php line 89
    OCA\DocumentServer\SetupCheck->check()
 3. /config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\DocumentServer\Controller\StaticController->webApps("apps/api/documents/api.js")
 4. /config/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\DocumentServ ... {}, "webApps")
 5. /config/www/nextcloud/lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\DocumentServ ... {}, "webApps")
 6. /config/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\DocumentSe ... r", "webApps", OC\AppFramework\ ... {}, {path: "apps/api ... "})
 7. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({path: "apps/api ... "})
 8. /config/www/nextcloud/lib/private/Route/Router.php line 299
    call_user_func(OC\AppFramework\ ... {}, {path: "apps/api ... "})
 9. /config/www/nextcloud/lib/base.php line 1008
    OC\Route\Router->match("/apps/documents ... s")
10. /config/www/nextcloud/index.php line 38
    OC::handleRequest()

GET /apps/documentserver_community/web-apps/apps/api/documents/api.js
from 40.142.6.210 by sean at 2020-02-14T15:15:21+00:00
kesselb commented 4 years ago

https://autoize.com/building-onlyoffice-document-server-from-source/ is a guide how to compile document server from source. Could someone try to recompile with muslc?

wuast94 commented 4 years ago

I am using the actual nextcloud apache 18.xx version.. Onlyoffice working fine..the move to this container is a bit tricky but worked for me.

But for someone how don't know that much about sysadmin should stay on Linux server version and wait for a working onlyoffice version I think

xthursdayx commented 4 years ago

I just updated to nc18.0.1, reinstalled both the Community Document Server and OnlyOffice, and applied @tgurr 's fix and am still getting the ./x2t: not found error. However, I'm also getting a new linked error: Exception: trim() expects parameter 1 to be string, bool given. See the log below.

[index] Error: Exception: trim() expects parameter 1 to be string, bool given at <<closure>>

0. /config/www/nextcloud/lib/private/AppFramework/App.php line 125
   OC\AppFramework\Http\Dispatcher->dispatch(OCA\DocumentServ ... {}, "webApps")
1. /config/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
   OC\AppFramework\App::main("OCA\\DocumentSe ... r", "webApps", OC\AppFramework\ ... {}, {path: "apps/api ... "})
2. <<closure>>
   OC\AppFramework\Routing\RouteActionHandler->__invoke({path: "apps/api ... "})
3. /config/www/nextcloud/lib/private/Route/Router.php line 299
   call_user_func(OC\AppFramework\ ... {}, {path: "apps/api ... "})
4. /config/www/nextcloud/lib/base.php line 1008
   OC\Route\Router->match("/apps/documents ... s")
5. /config/www/nextcloud/index.php line 38
   OC::handleRequest()

GET /apps/documentserver_community/web-apps/apps/api/documents/api.js
from 172.19.0.1 by xthursdayx at 2020-02-16T20:49:08+00:00
Disco1 commented 4 years ago

For those on CentOS 7 / SELinux, do this first: https://github.com/nextcloud/documentserver_community/issues/10#issuecomment-575935715

... then, in nextcloud/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin/

chcon --type httpd_sys_script_exec_t *.so.58 chcon --type httpd_sys_script_exec_t *.so