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!
Hello @mx5gr
Please point me to the guide which you used for Document Server installation. Does DS work? Please go to DS domain name and enable integrated example to check it out.
A few more things:
- please let us know your connector app version;
- please go to connector app page > click Save button > make a screenshot of entire page with output result. Additionally, please send us whole Document server logs folder when this test is finished.
- check out mutual availability between server. Go to ownCloud server and run wget https://DS_domain_name. And vice versa, from DS server run wget https://ownCloud_domain_name. Please show us the results.
Hi Alexandre,
The DS Server’s example application works fine, when the onlyoffice container is contacted directly (not through a proxy).
In our case, we use Traefik in front of the DS server, in order to add an additional control layer and provide SSL connectivity.
Our Traefik v2 config within docker-compose (amended for security) is:
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.onlyoffice-headers.headers.customrequestheaders.accessControlAllowOriginList=*"
- "traefik.http.middlewares.onlyoffice-headers.headers.customrequestheaders.X-Forwarded-Proto=https"
#- "traefik.http.middlewares.onlyoffice-headers.headers.customrequestheaders.X-Forwarded-Host=hostregexp(`{host:.+}`) && PathPrefix(`/onlyoffice/`)"
#- "traefik.http.middlewares.onlyoffice-stripprefix.stripprefix.prefixes=/onlyoffice"
- "traefik.http.routers.onlyoffice.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.onlyoffice.entrypoints=onlyoffice-sec"
- "traefik.http.routers.onlyoffice.middlewares=onlyoffice-headers"
- "traefik.http.routers.onlyoffice.service=onlyoffice"
- "traefik.http.routers.onlyoffice.tls=true"
- "traefik.http.services.onlyoffice.loadbalancer.server.port=80"
- "traefik.http.services.onlyoffice.loadbalancer.passhostheader=true"
networks:
- intnet
- traefik
Note the two commented lines. We tried to setup onlyoffice DS as https://myserver.mydomain.com/onlyoffice/ . In that case, the example application (which normally works) was not operational, as it tries to load editor JS files from the root (/) and not through the desired subpath (/onlyoffice/). [any suggestion on that? is that a bug of the example application?]
Thus, we decided to go forward with the integration by hosting owncloud (v10.13.1.3) and onlyoffice in two different ports.
Intnet is the name of the internal network, whereas traefik is the name of the Traefik network.
The respective owncloud Trafik setup is:
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.oc-rep.redirectregex.regex=https://(.*)/.well-known/(card|cal)dav"
- "traefik.http.middlewares.oc-rep.redirectregex.replacement=https://$$1/remote.php/dav/"
- "traefik.http.middlewares.oc-rep.redirectregex.permanent=true"
- "traefik.http.middlewares.oc-header.headers.referrerPolicy=no-referrer"
- "traefik.http.middlewares.oc-header.headers.stsSeconds=31536000"
- "traefik.http.middlewares.oc-header.headers.forceSTSHeader=true"
- "traefik.http.middlewares.oc-header.headers.stsPreload=true"
- "traefik.http.middlewares.oc-header.headers.stsIncludeSubdomains=true"
- "traefik.http.middlewares.oc-header.headers.browserXssFilter=true"
- "traefik.http.middlewares.oc-header.headers.customRequestHeaders.X-Forwarded-Proto=https"
- "traefik.http.middlewares.oc-header.headers.customRequestHeaders.X-XSS-Protection=0"
- "traefik.http.routers.owncloud.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.owncloud.entrypoints=websecure"
- "traefik.http.routers.owncloud.service=owncloud"
- "traefik.http.routers.owncloud.middlewares=oc-rep,oc-header"
- "traefik.http.routers.owncloud.tls=true"
- "traefik.http.services.owncloud.loadbalancer.server.port=8080"
networks:
- intnet
- traefik
The relevant IP information (two networks) are:
172.18.0.7/172.22.0.4 → Traefik proxy server
172.18.0.8/172.22.0.2 → Onlyoffice document server
172.18.0.3/172.22.0.3 → Owncloud server
Those said, when we enter all the above into the integration’s (v8.2.1) parameters, we get an OK as a response at the top of the screen when clicking Save.
Within Owncloud’s logs, we get:
172.18.0.7 - - [17/Sep/2023:12:15:51 +0000] "GET /apps/onlyoffice/ajax/template HTTP/1.1" 200 631 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0"
172.22.0.2 - - [17/Sep/2023:12:16:04 +0000] "GET /apps/onlyoffice/empty?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJlbXB0eSJ9.WY9Jfdw2rlPpFrU9fyOAbuH5CWedrSP5hbkb1tHRMpI HTTP/1.1" 200 8063 "-" "Node.js/6.13"
172.18.0.7 - - [17/Sep/2023:12:16:04 +0000] "PUT /apps/onlyoffice/ajax/settings/address HTTP/1.1" 200 923 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0"
Checking internal connectivity, we get as cURL headers response from onlyoffice (internal) → Owncloud (internal):
HTTP/1.1 302 Found
Date: Sun, 17 Sep 2023 12:06:02 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=2ggos09088l3g6dvg3kbb068rc; path=/; HttpOnly; SameSite=lax
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: oc_sessionPassphrase=M%2FKRQ%2Bur6elbuvOkgmF0Dh7XD0T8IUDfcMLPH9B1tfxj3shobAubp97ohnfVyzI8olQK2ID8XN26UJqUUJRrcuPeceKpdzh0hc5zCikIw7zfNsj20X6RIMu1xce2Gk09; expires=Sun, 17-Sep-2023 12:26:02 GMT; Max-Age=1200; path=/; HttpOnly; SameSite=lax
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *
Location: http://owncloud_server:8080/login
Content-Type: text/html; charset=UTF-8
and from Owncloud (internal) → Onlyoffice (internal):
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Sun, 17 Sep 2023 12:07:07 GMT
Content-Type: text/html
Content-Length: 138
Connection: keep-alive
Location: http://onlyoffice-documentserver
… thus connectivity exists.
Now, when we try to open/preview a document from within Owncloud, we get within the Onlyoffice’s converter/out.log multiple entries of the type:
[2023-09-17T12:00:06.234] [ERROR] [localhost] [conv_2107323555_jpeg] [userId] nodeJS - error downloadFile:url=http://owncloud_server:8080/apps/onlyoffice/download?doc=eyJ0eXAivsdo90ffWWDvsdvsGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJkb3dubG9hZCIsImZpbGVJZCI6OTQwMSwidXNlcklkIjoiQWRtaW5pc3RyYXRvciJ9._OF2D38QUlbV4hvsdse3r32rfed-pGNltiYWUHBrzhqIVI;attempt=2;code:undefined;connect:undefined Error: Error response: statusCode:404; headers:{"date":"Sun, 17 Sep 2023 12:00:06 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=2a2u6pc0e5121ji1h0reh0rm6i; path=/; HttpOnly; SameSite=lax","oc_sessionPassphrase=w8b1rMM%2BiBztIaagsbsafasfa2us1vZ1j6Dst2RCsvHw7DmPHy%2BPRHaXGax5fHu8JoZ4DnWFdDrW8PYXyk6ssX0QzKG%2B4capiW31W0QmAaEoaflSDUWz2JTCUVo1t2bc; expires=Sun, 17-Sep-2023 12:20:06 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)
Meanwhile, from Owncloud’s logs:
172.22.0.2 - - [17/Sep/2023:12:01:20 +0000] "GET /apps/onlyoffice/download?doc=eyJ0eXAivsdo90ffWWDvsdvsGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJkb3dubG9hZCIsImZpbGVJZCI6OTQwMSwidXNlcklkIjoiQWRtaW5pc3RyYXRvciJ9._OF2D38QUlbV4hvsdse3r32rfed-pGNltiYWUHBrzhqIVI HTTP/1.1" 404 1063 "-" "Node.js/6.13"
I sent you via PM a WeTransfer link regarding the logs from the documentserver.
Any help is greatly appreciated!
Hello @mx5gr
Thank you for the logs. I’ve found a lot of ‘404’ errors entries when Document server tried downloading a file from http://owncloud_server:8080 address. It seems as DNS\proxy issue. Have you compared your traefik config files with our samples? Using ONLYOFFICE Docs behind the proxy - ONLYOFFICE
Also, please try to remove internal addresses from the connector page app (http://owncloud_server:8080 and http://onlyoffice_documentserver). Will the situation change?
The file that is indicated multiple times within the logs is the same one.
When I tried to download it manually via cURL from within the containers, I got a 403 message (normal, I thought, because I did not pass a token).
I tried the same URL from my browser, while I was already logged in to owncloud. In this situation, the file downloaded perfectly… that means (to my mind) that the URL is not malformed but it might have something to do with another issue.
Regarding the Traefik settings, the ones you have released as settings for various scenarios refer to Traefik v1 not v2. The ones we are using, however, are fully compatible with the released ones.
I removed the internal URLs, as you mention, to no avail however…
It seems that the issue has to do with files on external storage, despite being available through webdav and the web interface.
For a local file, we get in owncloud logs:
172.18.0.7 [Traefik Proxy] - - [19/Sep/2023:08:06:20 +0000] "GET /ocs/v2.php/apps/onlyoffice/api/v1/config/9741?filePath=%2FDocument.docx&inframe=true HTTP/1.1" 200 3729 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0"
172.22.0.5 [Document Server] - - [19/Sep/2023:08:06:21 +0000] "POST /apps/onlyoffice/track?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJBZG1pbmlzdHJhdG9yIiwib3duZXJJZCI6IkFkbWluaXN0cmF0b3IiLCJmaWxlSWQiOjk3NDEsImZpbGVQYXRoIjoiL0RvY3VtZW50LmRvY3giLCJzaGFyZVRva2VuIjpudWxsLCJhY3Rpb24iOiJ0cmFjayJ9.pMPC6yMHgwCHHnFOKj1yYy1FtBPstPjWepfBywJbjow HTTP/1.1" 200 1042 "-" "Node.js/6.13"
172.22.0.5 [Document Server] - - [19/Sep/2023:08:06:21 +0000] "GET /apps/onlyoffice/download?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJkb3dubG9hZCIsImZpbGVJZCI6OTc0MSwidXNlcklkIjoiQWRtaW5pc3RyYXRvciJ9.FqDELL0m19jA8mmQ-DsnZFPkQQeiI_L3eLCUa7zgz_o HTTP/1.1" 200 8064 "-" "Node.js/6.13"
172.18.0.7 [Traefik Proxy] - - [19/Sep/2023:08:06:19 +0000] "GET /remote.php/dav/files/Administrator/Document.docx?c=647ba1930955271c7c6c890a5e2b093b&x=32&y=32&forceIcon=0&preview=1 HTTP/1.1" 200 1003 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0"
… and onlyoffice opens fine!
For an external document now, we get:
172.22.0.5 - - [19/Sep/2023:08:43:00 +0000] "GET /apps/onlyoffice/download?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJkb3dubG9hZCIsImZpbGVJZCI6OTc3NywidXNlcklkIjoiQWRtaW5pc3RyYXRvciJ9.z_yTXewGqq6IlEpyttt_2ETNMjXaMBlUtI0j1kaUDb8 HTTP/1.1" 404 1063 "-" "Node.js/6.13"
172.22.0.5 - - [19/Sep/2023:08:43:01 +0000] "GET /apps/onlyoffice/download?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY3Rpb24iOiJkb3dubG9hZCIsImZpbGVJZCI6OTc3NywidXNlcklkIjoiQWRtaW5pc3RyYXRvciJ9.z_yTXewGqq6IlEpyttt_2ETNMjXaMBlUtI0j1kaUDb8 HTTP/1.1" 404 1061 "-" "Node.js/6.13"
… and we get the Download error within onlyoffice, probably because owncloud refused to serve the request.
IF now the same URL that got the 404 above is accessed through a browser from a client that is already logged into owncloud (where we are trying to edit the document, for example), the document is served perfectly by owncloud and it is downloaded locally.