Community document Server

I have installed Nextcloud on Ubuntu and installed the OnlyOffice application on it, along with the Community Document Server. Now, the issue is that locally we can access and work with Excel and Word, but when we try to open them after accessing Nextcloud through the internet, an error occurs, and OnlyOffice doesn’t work. Please help me resolve this issue

hi @ahmad :wave:

  • Is the document server accessible from the internet
  1. Type of installation of Document Server (exe, docker, deb/rpm).
  2. How you performed installation, send me also the link to the guide you used.( Have there been any changes to the instructions?)
  3. How did you install NextCloud?
  4. Provide a screenshot of the error.
  5. Version of Nextcloud + Version connector ONLYOFFICE
  6. Version of ONLYOFFICE Docs.

i have installed Nextcloud on Ubuntu and added the Community Document Server to it. After that, installed OnlyOffice. When accessing Nextcloud within your local network, files open successfully using the Document Server. However, when try to access Nextcloud from the internet, you encounter an error stating "document loading failed.i have also attached a screenshot. my


current Nextcloud version is 27.1.3.

Firstly, you need our official connector.

image

If you want documents to be opened not only within the local network, you need to specify the address of the document server accessible from the internet.

Installing ONLYOFFICE Docs

You will need an instance of ONLYOFFICE Docs (Document Server) that is resolvable and connectable both from Nextcloud and any end clients. If that is not the case, use the official ONLYOFFICE Docs documentation page. ONLYOFFICE Docs must also be able to POST to Nextcloud directly.

I have installed the OnlyOffice server. Now, when I try to connect it with Nextcloud, I am encountering this error.

the scenario is that I have configured the local OnlyOffice server at 192.168.100.128:81, and I have entered the corresponding secret key from local.json. However, it is not accepting it and is giving an error.

Furthermore, I have added the following details in the configuration file of Nextcloud:
),
‘onlyoffice’ =>
array (
“jwt_secret” => “mz8n3ntB3sTd15XgTQcHJaHE5S2LGa90”,
“jwt_header” => “AuthorizationJwt”
),
);

  • Please attach a screenshot of the “Advanced Server Settings” page (feel free to send it in a private message)

  • also provide the local.json file for a more thorough analysis.

There is no need for this.

@Nikolas Hi
I join this problem.
I installed a document server, tried to integrate it with my nexcloud, but it gave me a converter error.

log /var/log/onlyoffice/documentserver/converter/out.log

[2024-12-24T15:34:33.883] [ERROR] [localhost] [10.100.11.63new.docx1735043670297] [uid-1] nodeJS - error downloadFile:url=https://onlyoffice.nmg.corp/example/download?fileName=new.docx&useraddress=10.100.11.63;attempt=3;code:null;connect:null Error: Error response: statusCode:403; headers:{"server":"nginx","date":"Tue, 24 Dec 2024 12:34:33 GMT","content-type":"text/plain; charset=utf-8","content-length":"9","connection":"keep-alive","access-control-allow-origin":"*","etag":"W/\"9-PatfYBLj4Um1qTm5zrukoLhNyPU\""};
    at Request.fResponse (/snapshot/server/Common/sources/utils.js)
    at Request.emit (node:events:527:28)
    at Request.onRequestResponse (/snapshot/server/Common/node_modules/request/request.js:1066:10)
    at ClientRequest.emit (node:events:527:28)
    at HTTPParser.parserOnIncomingClient (node:_http_client:631:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
    at TLSSocket.socketOnData (node:_http_client:494:22)
    at TLSSocket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)
[2024-12-24T15:34:57.639] [WARN] [localhost] [docId] [userId] nodeJS - num of CPUs: 2; availableParallelism: undefined
[2024-12-24T15:34:57.642] [WARN] [localhost] [docId] [userId] nodeJS - update cluster with 1 workers
[2024-12-24T15:34:57.674] [WARN] [localhost] [docId] [userId] nodeJS - worker 12875 started.
[2024-12-24T15:34:57.675] [WARN] [localhost] [docId] [userId] nodeJS - num of CPUs: 2; availableParallelism: undefined
[2024-12-24T15:34:57.678] [WARN] [localhost] [docId] [userId] nodeJS - update cluster with 1 workers

log /var/log/onlyoffice/documentserver/docservice/out.log

root@nmg-srnexoffice:~# tail -20 /var/log/onlyoffice/documentserver/docservice/out.log 
[2024-12-24T14:49:35.980] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.2.2. Build: 22
[2024-12-24T14:49:37.010] [WARN] [localhost] [10.100.11.63new.pdf21735033151243] [uid-1] nodeJS - error description: errorId = Other error
[2024-12-24T14:50:19.830] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2024-12-24T14:50:19.838] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2024-12-24T14:50:19.838] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2024-12-24T14:50:20.084] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.2.2. Build: 22
[2024-12-24T14:50:20.430] [WARN] [localhost] [10.100.11.63new.pdf21735033151243] [userId] nodeJS - checkJwt error: name = JsonWebTokenError message = jwt must be provided token = undefined
[2024-12-24T14:55:42.441] [WARN] [localhost] [10.100.11.63new.pdf21735033151243] [uid-12] nodeJS - sendServerRequest returned an error: data = {"error":1, "message":"file is not exist"}
[2024-12-24T14:55:42.443] [WARN] [localhost] [10.100.11.63new.pdf21735033151243] [uid-12] nodeJS - storeForgotten
[2024-12-24T15:00:50.914] [WARN] [localhost] [10.100.11.63new.docx1735040947578] [uid-14] nodeJS - sendServerRequest returned an error: data = {"error":1, "message":"file is not exist"}
[2024-12-24T15:00:50.917] [WARN] [localhost] [10.100.11.63new.docx1735040947578] [uid-14] nodeJS - storeForgotten
[2024-12-24T15:34:16.038] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2024-12-24T15:34:16.049] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2024-12-24T15:34:16.049] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2024-12-24T15:34:16.220] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.2.2. Build: 22
[2024-12-24T15:34:58.336] [WARN] [localhost] [docId] [userId] nodeJS - Express server starting...
[2024-12-24T15:34:58.346] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2024-12-24T15:34:58.347] [WARN] [localhost] [docId] [userId] nodeJS - notifyLicenseExpiration(): expiration date is not defined
[2024-12-24T15:34:58.538] [WARN] [localhost] [docId] [userId] nodeJS - Express server listening on port 8000 in production-linux mode. Version: 8.2.2. Build: 22
[2024-12-24T15:34:58.571] [WARN] [localhost] [10.100.11.63new.docx1735043670297] [uid-1] nodeJS - error description: errorId = Other error

log /var/log/onlyoffice/documentserver/metrics/out.log

 counters: {
    'statsd.bad_lines_seen': 0,
    'statsd.packets_received': 0,
    'statsd.metrics_received': 0
  },
  timers: {},
  gauges: { 'statsd.timestamp_lag': 0 },
  timer_data: {},
  counter_rates: {
    'statsd.bad_lines_seen': 0,
    'statsd.packets_received': 0,
    'statsd.metrics_received': 0
  },
  sets: {},
  pctThreshold: [ 90 ]
}
24 Dec 15:34:14 - [12732] reading config file: ./config/config.js
24 Dec 15:34:14 - server is up INFO
24 Dec 15:34:56 - [12846] reading config file: ./config/config.js
24 Dec 15:34:56 - server is up INFO

log /var/log/onlyoffice/documentserver/nginx.error.log

2024/12/24 11:02:25 [error] 39519#39519: *5 open() "/var/www/onlyoffice/documentserver/web-apps/vendor/socketio/socket.io.min.js.map" failed (2: No such file or directory), client: 10.100.11.63, server: , request: "GET /8.2.2-9588304f0603deecc33c67935c

8b892d/web-apps/vendor/socketio/socket.io.min.js.map HTTP/1.1", host: "onlyoffice.nmg.corp"

2024/12/24 11:02:26 [error] 39519#39519: *5 open() "/var/www/onlyoffice/documentserver/web-apps/vendor/socketio/socket.io.min.js.map" failed (2: No such file or directory), client: 10.100.11.63, server: , request: "GET /8.2.2-9588304f0603deecc33c67935c

8b892d/web-apps/vendor/socketio/socket.io.min.js.map HTTP/1.1", host: "onlyoffice.nmg.corp"

2024/12/24 11:10:40 [error] 39519#39519: *219 open() "/var/www/onlyoffice/documentserver/web-apps/vendor/socketio/socket.io.min.js.map" failed (2: No such file or directory), client: 10.100.11.63, server: , request: "GET /8.2.2-9588304f0603deecc33c6793

5c8b892d/web-apps/vendor/socketio/socket.io.min.js.map HTTP/1.1", host: "onlyoffice.nmg.corp"

2024/12/24 11:11:10 [error] 39519#39519: *216 open() "/var/www/onlyoffice/documentserver/web-apps/vendor/socketio/socket.io.min.js.map" failed (2: No such file or directory), client: 10.100.11.63, server: , request: "GET /8.2.2-9588304f0603deecc33c6793

5c8b892d/web-apps/vendor/socketio/socket.io.min.js.map HTTP/1.1", host: "onlyoffice.nmg.corp"

2024/12/24 11:14:38 [error] 1133#1133: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.100.11.63, server: , request: "GET /8.2.2-9588304f0603deecc33c67935c8b892d/doc/10.100.11.63new.docx1735026652173/c/?shardkey=1

0.100.11.63new.docx1735026652173&EIO=4&transport=websocket HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/10.100.11.63new.docx1735026652173/c/?shardkey=10.100.11.63new.docx1735026652173&EIO=4&transport=websocket", host: "onlyoffice.nmg.corp"

2024/12/24 11:14:41 [error] 1134#1134: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 10.100.11.63, server: , request: "GET /8.2.2-9588304f0603deecc33c67935c8b892d/doc/10.100.11.63new.docx1735026652173/c/?shardkey=1

0.100.11.63new.docx1735026652173&EIO=4&transport=websocket HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/10.100.11.63new.docx1735026652173/c/?shardkey=10.100.11.63new.docx1735026652173&EIO=4&transport=websocket", host: "onlyoffice.nmg.corp"

2024/12/24 11:14:44 [error] 1133#1133: *5 connect() failed (111: Connection refused) while connecting to upstream, client: 10.100.11.63, server: , request: "GET /8.2.2-9588304f0603deecc33c67935c8b892d/doc/10.100.11.63new.docx1735026652173/c/?shardkey=1

0.100.11.63new.docx1735026652173&EIO=4&transport=websocket HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/10.100.11.63new.docx1735026652173/c/?shardkey=10.100.11.63new.docx1735026652173&EIO=4&transport=websocket", host: "onlyoffice.nmg.corp"

2024/12/24 11:14:47 [error] 1133#1133: *7 connect() failed (111: Connection refused) while connecting to upstream, client: 10.100.11.63, server: , request: "GET /8.2.2-9588304f0603deecc33c67935c8b892d/doc/10.100.11.63new.docx1735026652173/c/?shardkey=1

0.100.11.63new.docx1735026652173&EIO=4&transport=websocket HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/10.100.11.63new.docx1735026652173/c/?shardkey=10.100.11.63new.docx1735026652173&EIO=4&transport=websocket", host: "onlyoffice.nmg.corp"

2024/12/24 11:14:50 [error] 1133#1133: *11 connect() failed (111: Connection refused) while connecting to upstream, client: 10.100.35.88, server: , request: "POST /example/track?filename=new.docx&useraddress=10.100.11.63 HTTP/1.1", upstream: "http://12

7.0.0.1:3000/track?filename=new.docx&useraddress=10.100.11.63", host: "onlyoffice.nmg.corp"

2024/12/24 11:15:46 [error] 1133#1133: *13 connect() failed (111: Connection refused) while connecting to upstream, client: 10.100.11.63, server: , request: "GET /example/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "onlyoffice.nmg.corp", refe

rrer: "https://onlyoffice.nmg.corp/8.2.2-9588304f0603deecc33c67935c8b892d/web-apps/apps/documenteditor/main/index.html?_dc=8.2.2-22&lang=en&customer=ONLYOFFICE&type=desktop&frameEditorId=iframeEditor&isForm=false&parentOrigin=https://onlyoffice.nmg.cor

p&fileType=docx"

2024/12/24 14:49:35 [error] 2190#2190: *694 connect() failed (111: Connection refused) while connecting to upstream, client: 10.100.11.63, server: , request: "GET /8.2.2-9588304f0603deecc33c67935c8b892d/doc/10.100.11.63new.docx1735040947578/c/?shardkey

=10.100.11.63new.docx1735040947578&EIO=4&transport=websocket HTTP/1.1", upstream: "http://127.0.0.1:8000/doc/10.100.11.63new.docx1735040947578/c/?shardkey=10.100.11.63new.docx1735040947578&EIO=4&transport=websocket", host: "onlyoffice.nmg.corp"

2024/12/24 14:55:49 [error] 2191#2191: *776 open() "/var/www/onlyoffice/documentserver/web-apps/vendor/socketio/socket.io.min.js.map" failed (2: No such file or directory), client: 10.100.11.63, server: , request: "GET /web-apps/vendor/socketio/socket.

io.min.js.map HTTP/1.1", host: "onlyoffice.nmg.corp"

Nexcloud log

  Error     onlyoffice          Exception:There was an error in the document service: Error while downloading the document file to be converted. at apps/onlyoffice/lib/DocumentService.php line 257          2024-12-24T12:33:23+00:00  
                                                                                                                                                                                                                                   
                                0. apps/onlyoffice/lib/DocumentService.php line 104                                                                                                                                                
                                   OCA\Onlyoffice\DocumentService->processConvServResponceError(                                                                                                                                   
                                                                                                                                                                                                                                   
                                   )                                                                                                                                                                                               
                                1. apps/onlyoffice/lib/DocumentService.php line 452                                                                                                                                                
                                   OCA\Onlyoffice\DocumentService->getConvertedUri(                                                                                                                                                
                                                                                                                                                                                                                                   
                                   )                                                                                                                                                                                               
                                2. apps/onlyoffice/lib/Controller/SettingsController.php line 192                                                                                                                                  
                                   OCA\Onlyoffice\DocumentService->checkDocServiceUrl(                                                                                                                                             
                                                                                                                                                                                                                                   
                                   )                                                                                                                                                                                               
                                3. lib/private/AppFramework/Http/Dispatcher.php line 208                                                                                                                                           
                                   OCA\Onlyoffice\Controller\SettingsController->saveAddress(                                                                                                                                      
                                                                                                                                                                                                                                   
                                   )                                                                                                                                                                                               
                                4. lib/private/AppFramework/Http/Dispatcher.php line 114                                                                                                                                           
                                   OC\AppFramework\Http\Dispatcher->executeController(                                                                                                                                             
                                                                                                                                                                                                                                   
                                   )                                                                                                                                                                                               
                                5. lib/private/AppFramework/App.php line 161                                                                                                                                                       
                                   OC\AppFramework\Http\Dispatcher->dispatch(                                                                                                                                                      
                                                                                                                                                                                                                                   
                                   )                                                                                                                                                                                               
                                6. lib/private/Route/Router.php line 302                                                                                                                                                           
                                   OC\AppFramework\App::main(                                                                                                                                                                      
                                                                                                                                                                                                                                   
                                   )                                                                                                                                                                                               
                                7. lib/base.php line 1001                                                                                                                                                                          
                                   OC\Route\Router->match(                                                                                                                                                                         
                                                                                                                                                                                                                                   
                                   )                                                                                                                                                                                               
                                8. index.php line 24                                                                                                                                                                               
                                   OC::handleRequest(                                                                                                                                                                              
                                                                                                                                                                                                                                   
                                   )

@Nikolas
It worked.
When adding a document server to nextcloud, you do not need to specify the ONLYOFFICE Docs Address for internal server requests and the Server Address for internal ONLYOFFICE Docs requests.
I added a secret key and an Authorization entry wherever possible.
It is required to fill in the document server address and secret key fields.

2 Likes