Try the fastest and simplest way to install ONLYOFFICE

Document server download failed due to Error: connect EHOSTU

Issues during installation, usage and configuring

Document server download failed due to Error: connect EHOSTU

Postby Leboudin » Tue Jan 23, 2018 7:32 am

Hi there, I installed document server using docker following your instruction and the api.js is able to load. For the document storage service, I used someting I wrote in Go or Python, it simply responses GET request and serves a file back, for example:

Code: Select all
// GetFile, returns a file
// url: GET http://ip:port/files/<fileId>
func GetFile(w http.ResponseWriter, r *http.Request, p httprouter.Params) {
   // Set some headers
   w.Header().Set("Content-Type", "application/doc")
   w.Header().Set("Content-Disposition", "attachment;filename=\"test.docx\"")

   // Serve the file and send response back
   http.ServeFile(w, r, "./test.docx")
}


Visiting the url in browser just works fine and I could download the file. Then I give the document.url to "http://ip:port/files/<fileId>" in the docEditor configuration, set the editorConfig.mode to "view". However I kept getting error "Download failed", and log says
Code: Select all
[ERROR] nodeJS - error downloadFile:url=http://192.168.2.168:8030/files/1/;attempt=3;code:EHOSTUNREACH;connect:undefined;(id=Khirz6zTPdfd7)
Error: connect EHOSTUNREACH 192.168.2.168:8030
    at Object.exports._errnoException (util.js:1020:11)
    at exports._exceptionWithHostPort (util.js:1043:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)


I just dont get it why the storage service is unreachable, could you help me please? Or am I missing something in the GetFile, eg. responsing POST?

Thank you.
Leboudin
 
Posts: 9
Joined: Tue Jan 23, 2018 7:13 am

Re: Document server download failed due to Error: connect EH

Postby Leboudin » Tue Jan 23, 2018 8:15 am

Well the problem is solved, I placed document server and storage service on two different server and they are not connected, that is the reason.
Leboudin
 
Posts: 9
Joined: Tue Jan 23, 2018 7:13 am

Re: Document server download failed due to Error: connect EH

Postby Maxim » Tue Jan 23, 2018 10:42 am

Hello Leboudin!
Great! :D
Maxim
 
Posts: 1747
Joined: Tue Oct 11, 2016 2:34 pm


Return to ownCloud/Nextcloud ONLYOFFICE integration app

Who is online

Users browsing this forum: No registered users and 2 guests