404 or no connection when accessing Document server on local network

Post Reply
alfo
Posts: 6
Joined: Fri Dec 13, 2019 6:47 pm

404 or no connection when accessing Document server on local network

Post by alfo » Fri Dec 13, 2019 7:14 pm

I have Document Server running on its own machine (ubunutu 18.04, installed from repo - no docker), being accessed by the filerun plugin and the PHP example on another machine on the local network. Both are configured to the Document Servers IP, which when entered into a browser shows that the Document Server is running (non HTTPS).
From Filerun when i attempt to edit or create documents all i get is a blank screen, and no log entries are generated. From the PHP example I get the same result when trying to create a file, blank screen, no logs at document server but the file does get created and shows up on the PHP example's file list. When i then try to edit a file from the list it does load the Document Editor, but i get a 404 error, and the following log is generated:
Log
[2019-12-13T18:32:46.168] [ERROR] nodeJS - postData error: docId = 448942976;url = http://192.168.2.195/webeditor-ajax.php ... .2.56;data = {"key":"448942976","status":1,"users":["1"],"actions":[{"type":1,"userid":"1"}]}
Error: Error response: statusCode:404 ;body:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.29 (Ubuntu) Server at 192.168.2.195 Port 80</address>
</body></html>

at Request._callback (/var/www/onlyoffice/documentserver/server/Common/sources/utils.js:301:23)
at Request.self.callback (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1161:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/var/www/onlyoffice/documentserver/server/Common/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:139:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
More Information on the setup:
Info
Accessing server IP: 192.168.2.195
Document Server IP: 192.168.2.199
PHP Example URL: http://192.168.2.195/phptest (LAN access only, just for reference if needed)
Each server is an LXC container, if that matters.

Carl
Posts: 258
Joined: Thu Apr 12, 2018 10:00 am

Re: 404 or no connection when accessing Document server on local network

Post by Carl » Mon Dec 16, 2019 9:47 am

Hello alfo,

Please make sure you performed all the steps from the guide https://api.onlyoffice.com/editors/example/php#Linux including changing the permissions for the folder.

Also please check if both servers can reach each other using wget command:

wget 192.168.2.199 from the machine with the example;
wget 192.168.2.195 from Document Server machine.

alfo
Posts: 6
Joined: Fri Dec 13, 2019 6:47 pm

Re: 404 or no connection when accessing Document server on local network

Post by alfo » Mon Dec 16, 2019 5:26 pm

Just double checked to be sure, everything from the PHP example has been followed. Correct packages have been installed on the webserver (one discrepancy is that I'm using PHP 7.2), file ownership is set to www-data recursively in the containing folder, config.php is pointed to the document servers IP in the three specified places, and a wget from both sides has worked (both to the root of the webserver, as well as the folder that i have the php example placed in). Just to be sure I've also restarted apache, the document server service (using supervisorctl), as well as rebooting both machines for good measure. Still getting the same error.

Carl
Posts: 258
Joined: Thu Apr 12, 2018 10:00 am

Re: 404 or no connection when accessing Document server on local network

Post by Carl » Tue Dec 17, 2019 7:10 am

Hello alfo,

What Document Server version are you using? You can use apt list --installed | grep onlyoffice to find it. Also reproduce the issue with browser console open and check if there are errors in Network and Console tabs.

alfo
Posts: 6
Joined: Fri Dec 13, 2019 6:47 pm

Re: 404 or no connection when accessing Document server on local network

Post by alfo » Tue Dec 17, 2019 4:42 pm

OnlyOffice Version
onlyoffice-documentserver/squeeze,now 5.4.2-46 amd64 [installed]
Console Log - Edit Doc
An unbalanced tree was written using document.write() causing data from the network to be reparsed. For more information https://developer.mozilla.org/en/Optimi ... ve_Parsing index.html:273
Document editor ready doceditor.php:51:25
wasm streaming compile failed: TypeError: Response has unsupported MIME type fonts.js:14:55
falling back to ArrayBuffer instantiation fonts.js:14:95
Object { errorCode: -4, errorDescription: "Download failed." } doceditor.php:51:25
I get no console info from the new document creation, the above is from opening the editor on an existing file.
The only network error that shows up for either creating a new document or editing a document is a failure to load favicon.ico.

I am using Firefox, if Chrome has specific information you're looking for I'll download it and get that for you.

Carl
Posts: 258
Joined: Thu Apr 12, 2018 10:00 am

Re: 404 or no connection when accessing Document server on local network

Post by Carl » Wed Dec 18, 2019 11:45 am

Hello alfo,

Please check if there are new.docx/new.xlsx/new.pptx files in php-example-folder/app_data/

Also try to upload any file to the example, go to its folder on the server => find a folder with your IP address and check if the file is present there.

alfo
Posts: 6
Joined: Fri Dec 13, 2019 6:47 pm

Re: 404 or no connection when accessing Document server on local network

Post by alfo » Wed Dec 18, 2019 4:33 pm

Yes, in the "app_data" folder there are "new" and "demo" files for documents, spreadsheets and slideshows. Additionally, inside the folder that matches my IP address there is both a "new.docx" file that was created by the php test page, as well as the uploaded file that I uploaded.

Carl
Posts: 258
Joined: Thu Apr 12, 2018 10:00 am

Re: 404 or no connection when accessing Document server on local network

Post by Carl » Fri Dec 20, 2019 8:02 am

Hello alfo,

Please once again run wget 192.168.2.195 from the Document Server machine but this time open the downloaded index.html file. Is the downloaded page the example page?

alfo
Posts: 6
Joined: Fri Dec 13, 2019 6:47 pm

Re: 404 or no connection when accessing Document server on local network

Post by alfo » Fri Dec 20, 2019 6:13 pm

Yes, when opening the downloaded file it is the PHP example page. I wonder if the problem stems from me putting the PHP example page in a subfolder (phptest), not the root of the webserver at that address maybe? Is there some setting that i need to change to make it work with a subfolder?

alfo
Posts: 6
Joined: Fri Dec 13, 2019 6:47 pm

Re: 404 or no connection when accessing Document server on local network

Post by alfo » Wed Jan 08, 2020 9:34 pm

Is there any information that can be provided about running the PHP test from a subfolder, or some documentation i can look at? The problem does appear to also happen using things like nextcloud in a subfolder as well.

Post Reply