Do I understand it right that Document server and ownCloud are installed on the same server? It looks like DS tries to achieve ownCloud via 127.0.0.1:8086 address. If so, please double check that DS and ownCloud can communicate each other. Please run wget
command inside the container. For example, go to DS container (with command docker exec -it ID_of_container bash
) and run wget https://domain_name_of_owncloud
. Also run this test for ownCloud container with DS address. Please provide us with results.
Usually we recommend to use separate server for Document server installation. Itās necessary to avoid dependencies and port conflicts.
I donāt know why but after i deleted the onlyoffice connect app and install it again, the error went out. The problem is solved, thank you so much
We are glad that the issue is solved, please feel free to contact us if you face any issues.
Maybe i figured out the issue, it related to time sync between DC and OwnCloud server. I post the link here, maybe it can hepl someone
Hello @toipq Thank you for provided data.
Indeed, time difference between servers can provoke issues. Iām not sure that you faced that issue, because I didnāt find situation-related error entries in the provided logs earlier. Anyway, I believe this workaround solution will be useful for other users.
By default Document Server can receive requests with 60 seconds time difference between servers, however connector app of the Owncloud is set to reject those by default.
To configure that parameter you have to follow these steps:
- Find connector app JWT config located in /var/www/owncloud/apps/onlyoffice/3rdparty/jwt/JWT.php
- In JWT.php config file find next line āpublic static $leeway = 0;ā and set the needed value in seconds (in our case it is 60 seconds, 0 is default).
This solution solved my problem. I noticed that in my installation, instead of āAuthorizationJwtā it said āAuthorizeJwtā. I changed it to the correct way, changed the inBody to false and then executed the command proposed by @Constantine, and it worked as a charm.
Hi @Alexandre and @Constantine in my setup, I turned off jwt authorization. I got the same error message. unable to download document.
same problem here. What is weird about this is that after i try to connect nextcloud, i can no longer access test files via direct IP.
docservice out.log after i try to connect via nextcloud (before that i can load files with no issue).
[2023-07-06T17:57:59.265] [ERROR] [localhost] [docId] [userId] nodeJS - [AMQP] Error: connect ECONNREFUSED 127.0.0.1:5672
converter out.log
[2023-07-06T17:58:23.709] [ERROR] [localhost] [conv_check_762376340_docx] [userId] nodeJS - error downloadFile:url=https://drive.**.org/index.php/apps/onlyoffice/empty?doc=..;attempt=3;code:undefined;connect:undefined Error: Error response: statusCode:403; headers:{"date":"Thu, 06 Jul 2023 15:04:24 GMT","content-type":"application/json; charset=utf-8","content-length":"27","connection":"keep-alive","strict-transport-security":"max-age=15552000; includeSubDomains, max-age=63072000;includeSubDomains; preload","set-cookie":["ocfo9mt9vamc=vjm0gd8dlj0fb3thfmm9ilg8a9; path=/; secure; HttpOnly; SameSite=Lax","oc_sessionPassphrase=xqL674tk9NAod77rGkxDoiyN7uIlL6kafZyQV7jzJAc7uqLD%2BPDbPSTevrQ0%2FhNCLcr9YbVFMvXRn7YYcwQ5rVI9ss%2FoOI%2FD3kTrqx54OuBuGEchaHYMIs5TxmS84efG; path=/; secure; HttpOnly; SameSite=Lax","ocfo9mt9vamc=evnqvspqjp43n5j5td0s8dr82s; path=/; secure; HttpOnly; SameSite=Lax","ocfo9mt9vamc=evnqvspqjp43n5j5td0s8dr82s; path=/; secure; HttpOnly; SameSite=Lax","__Host-nc_sameSiteCookielax=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax","__Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=strict","ocfo9mt9vamc=evnqvspqjp43n5j5td0s8dr82s; path=/; secure; HttpOnly; SameSite=Lax"],"expires":"Thu, 19 Nov 1981 08:52:00 GMT","cache-control":"no-cache, no-store, must-revalidate","pragma":"no-cache","content-security-policy":"default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'","referrer-policy":"no-referrer","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","x-permitted-cross-domain-policies":"none","x-robots-tag":"noindex, nofollow","x-xss-protection":"1; mode=block","x-request-id":"fLkAyIj0kAaQY5ZAh4yj","feature-policy":"autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'","cf-cache-status":"DYNAMIC","report-to":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=s3xrF0c9v2cAV4kHTxWNfI7o%2FhU7%2FfZeO7xHsaMC79tNcXKD3Z9Gq0%2FR0VJI9kZasWPBXa4bortNT7j%2FUsm7yCkzW%2F1iwfV0mI5vz2RLiuNxGw8WOgKkDO261edYtoRHagCu\"}],\"group\":\"cf-nel\",\"max_age\":604800}","nel":"{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}","server":"cloudflare","cf-ray":"7e28bd714c66f180-CDG","alt-svc":"h3=\":443\"; ma=86400"};
at Request.fResponse (/snapshot/server/build/server/Common/sources/utils.js)
at Request.emit (events.js:400:28)
at Request.onRequestResponse (/snapshot/server/build/server/Common/node_modules/request/request.js:1059:10)
at ClientRequest.emit (events.js:400:28)
at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
at TLSSocket.socketOnData (_http_client.js:515:22)
at TLSSocket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:293:12)
at readableAddChunk (internal/streams/readable.js:267:9)
at TLSSocket.Readable.push (internal/streams/readable.js:206:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
I changed following properties to false in DocumentServer\config\default.json and now it is working for me.
"request-filtering-agent" : {
"allowPrivateIPAddress": false,
"allowMetaIPAddress": false
},
they are already set to false for me unfortunately
Hi @Alexandre @Constantine,
Iāve tried your code but didnāt get anything
{
"header":"AuthorizationJwt",
"inBody":false
},
"outbox": {
"header":"AuthorizationJwt",
"inBody":false
}
Iāve also tried in nexctloud
array (
'verify_peer_off' => true,
'jwt_secret' => 'code',
'jwt_header' => 'AuthorizationJwt',
),
What else can I try
Never i just saw Iām stupid and modified the wrong inbox and outbox ! it indeed works
my bad, set those properties as true.
"request-filtering-agent" : {
"allowPrivateIPAddress": false,
"allowMetaIPAddress": false
},
Hello @Harishkumar and @ArnaudT
Sorry for the late reply.
As far as I understand, you have managed situations. If I misunderstood it and issue still reproduces, please clarify it.
No i just modified too much stuff following different forum and had to reset the file to default values. but its fine now ! thanks
So I do have the same issue, I have followed this thread closely. I am running Nextcloud (v27) and Onlyoffice (latest) as docker containers. I do have certified access setup to both containers using onlyoffice.domain.io and nextcloud.domain.io (setup using pfSense and HAProxy).
I did change the nextcloud config.php to:
'onlyoffice' =>
array (
'verify_peer_off' => true,
'jwt_secret' => 'code_from_local.json',
'jwt_header' => 'AuthorizationJwt',
),
And this is my changed local.json:
{
"services": {
"CoAuthoring": {
"sql": {
"type": "postgres",
"dbHost": "localhost",
"dbPort": "5432",
"dbName": "onlyoffice",
"dbUser": "onlyoffice",
"dbPass": "onlyoffice"
},
"token": {
"enable": {
"request": {
"inbox": false,
"outbox": false
},
"browser": false
},
"inbox": {
"header": "Authorization",
"inBody": false
},
"outbox": {
"header": "Authorization",
"inBody": false
}
},
"secret": {
"inbox": {
"string": "hxPeLojmK1Ok2jmx2df"
},
"outbox": {
"string": "hxPeLojOk2jmx2df"
},
"session": {
"string": "hxPeLojmx2df"
}
}
}
},
"rabbitmq": {
"url": "amqp://guest:guest@localhost"
},
"storage": {
"fs": {
"secretString": "bHEYp32SvO"
}
}
}
This is my docker setup:
nextcloud:
image: lscr.io/linuxserver/nextcloud:latest
container_name: nextcloud
restart: unless-stopped
environment:
- PGID=1000
- PUID=1000
- TZ=${TZ}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
volumes:
- ./appdata/nextcloud:/config
- /storage/nextcloud:/data
ports:
- 8080:80
- 4443:443
depends_on:
- mariadb
onlyoffice:
container_name: onlyoffice
image: onlyoffice/documentserver:latest
restart: unless-stopped
environment:
- JWT_ENABLED=false
- JWT_HEADER=Authorization
ports:
- 8880:80
- 8843:443
volumes:
- ./appdata/onlyoffice/document_data:/var/www/onlyoffice/Data
- ./appdata/onlyoffice/document_log:/var/log/onlyoffice
The thing I failing at is to change the JWT_HEADER to AuthorizationJwt, if I change that in the docker-compose file it does not change the local.json file. If I change it inside the local.json file it doesnāt stick.
So I did try to use Authorization everywhere instead, but that failed as well.
So what easy error am I making? What have I missed?
Hello @mattias
Since there is a proxy used, please take a look at this configs that are recommened to used with Document Server and compare to the one that you are using:
https://helpcenter.onlyoffice.com/installation/docs-community-proxy.aspx
If the issue reproduces after verifying the proxy config, please share logs of Document Server for analysis.
Hello,
I have noticed different threads relating to this issue and I followed previous suggestions made here, however it still persists with us.
We are using the docker versions of owncloud (v.10.13.1.3/community) and onlyoffice-documentserver (v.7.4). Although there is a communication link established between the servers and we have configured the onlyoffice integration in owncloud, when we try to open/preview any document that lies within owncloud, we get the well-known ādocument not foundā error within onlyoffice.
Checking the logs, we get at owncloud side:
{"reqId":"YHOOoSvjZQDoS4fINkQO","level":3,"time":"2023-09-10T18:02:07+03:00","remoteAddr":"172.24.0.5","user":"Test","app":"onlyoffice","method":"GET","url":"\/apps\/onlyoffice\/download?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJkb3dubG9hZCIsImZpbGVJZCI6MjQwMCwidXNlcklkIjoiQWRtaW5pc3RyYXRvciJ9.L265ISLqDiVt1EufhXSBJI4RhmBfnYiA89c--u8BHOY","message":"Files not found: 2400"}
{"reqId":"abQcVT4t065vG8t2VEEP","level":3,"time":"2023-09-10T18:02:06+03:00","remoteAddr":"172.24.0.4","user":"Test","app":"onlyoffice","method":"GET","url":"\/remote.php\/dav\/files\/Test\/test\/test/doctest.doc?c=64fcb75af40f3&x=32&y=32&forceIcon=0&preview=1","message":"GetConvertedUri: from doc to jpeg: {\"Exception\":\"Exception\",\"Message\":\"Error occurred in the document service: Error while downloading the document file to be converted.\",\"Code\":0,\"Trace\":\"#0 \\\/mnt\\\/data\\\/apps\\\/onlyoffice\\\/lib\\\/documentservice.php(94): OCA\\\\Onlyoffice\\\\DocumentService->ProcessConvServResponceError()\\n#1 \\\/mnt\\\/data\\\/apps\\\/onlyoffice\\\/lib\\\/preview.php(271): OCA\\\\Onlyoffice\\\\DocumentService->GetConvertedUri()\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Preview.php(1119): OCA\\\\Onlyoffice\\\\Preview->getThumbnail()\\n#3 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Preview.php(738): OC\\\\Preview->generatePreview()\\n#4 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Node\\\/File.php(170): OC\\\\Preview->getPreview()\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Files\\\/PreviewPlugin.php(115): OC\\\\Files\\\\Node\\\\File->getThumbnail()\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(89): OCA\\\\DAV\\\\Files\\\\PreviewPlugin->httpGet()\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(472): Sabre\\\\DAV\\\\Server->emit()\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(253): Sabre\\\\DAV\\\\Server->invokeMethod()\\n#9 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(348): Sabre\\\\DAV\\\\Server->start()\\n#10 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#11 \\\/var\\\/www\\\/owncloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/ownclo...')\\n#12 {main}\",\"File\":\"\\\/mnt\\\/data\\\/apps\\\/onlyoffice\\\/lib\\\/documentservice.php\",\"Line\":236}"}
ā¦ and at onlyoffice side:
[2023-09-10T15:29:27.571] [ERROR] [localhost] [conv_1140260524_jpeg] [userId] nodeJS - error downloadFile:url=http://owncloud_server:8080/apps/onlyoffice/download?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJkb3dubG9hZCIsImZpbGVJZCI6NjQ2MiwidXNlcklkIjoiYXBob3RvcG8ifQ.UvbyJSJ9DoqrhO9N_gjHQulyUXPf9qaFkVMT01dXH9E;attempt=2;code:undefined;connect:undefined Error: Error response: statusCode:404; headers:{"date":"Sun, 10 Sep 2023 15:29:27 GMT","server":"Apache","x-content-type-options":"nosniff","x-xss-protection":"0","x-robots-tag":"none","x-frame-options":"SAMEORIGIN","x-download-options":"noopen","x-permitted-cross-domain-policies":"none","set-cookie":["ocyx6e1vuynu=55vpjq39no6vq3snodgssknhd2; path=/; HttpOnly; SameSite=lax","oc_sessionPassphrase=Ms3DqFHQNBxwyfYntnQeNaAxwTzfiCHIyNGUhTOqJ4z9TQFhD4VHTLZQ5Z7rFOxlYMnpXkutalLqQZJvY0ORYi1UQzUuAxpEqYqH6IUfO%2FSEVzMcDK3rEL%2F0iPxxazLc; expires=Sun, 10-Sep-2023 15:49:27 GMT; Max-Age=1200; path=/; HttpOnly; SameSite=lax"],"expires":"Thu, 19 Nov 1981 08:52:00 GMT","cache-control":"no-cache, no-store, must-revalidate","pragma":"no-cache","content-security-policy":"default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self'","content-length":"29","keep-alive":"timeout=5, max=100","connection":"Keep-Alive","content-type":"application/json; charset=utf-8"};
at Request.fResponse (/snapshot/server/build/server/Common/sources/utils.js)
at Request.emit (events.js:400:28)
at Request.onRequestResponse (/snapshot/server/build/server/Common/node_modules/request/request.js:1059:10)
at ClientRequest.emit (events.js:400:28)
at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
at Socket.socketOnData (_http_client.js:515:22)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:293:12)
at readableAddChunk (internal/streams/readable.js:267:9)
at Socket.Readable.push (internal/streams/readable.js:206:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
I assume that owncloud reports that the link requested by onlyoffice does not exist, thus onlyoffice crashes. Onlyoffice even crashes with the same message when we try to create and edit a new document through owncloud.
Any pointers towards the right direction could help us greatly!