NGINX, connection refused for WEBDAV requests from OSX client app


#1

My OSX client app is constantly making request to my webserver (NGINX). But it is always returning errors in the log file. Owncloud is however working just fine and I don’t understand why the client app is making those requests ? How can I fix this ?

2018/12/22 16:38:37 [error] 1874#0: *14970 connect() failed (111: Connection refused) while connecting to upstream, client: 84.192.170.138, server: owncloud.mydomain.be, request: “PROPFIND /remote.php/dav/files/maarten/test HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “owncloud.mydomain.be”

Maby important to note that I can connect without any problems in OSX with “connect to server” :

https://owncloud.mydomain.be/remote.php/dav/files/maarten/


#2

Hey,

this doesn’t look like an issue with the desktop client or ownCloud itself. To me the message seems to be related to some web server / nginx configuration issue. Have you tried to search the meaning of this message outside of the ownCloud scope (e.g. nginx tutorials) on how to solve these?


#3

Yes of course … the desktop client is probably working correctly. But my question is :

A) What are those webdav request good for exactly? Why would I need to handle them by my webserver, while everything seems to work ?

B) How can I fix my nginx server to handle those requests properly ?

Maarten


#4

Hey,

A) from what i know WebDAV requests are used by the sync client for normal operations like discovering existing files, uploading new files and similar.

B) i think you first need to research (as pointed out previously) whats the meaning of the log messages in your nginx logs before thinking on how to fix these.


#5

Tom,

The thing is that everything works! I’m not noticing any functional issues when using owncloud.
But I still get the errors in nginx error log. So I was hoping someone with good knowledge of NGINX + OWNCLOUD, could point me in the right direction. I’m using the nginx configuration exactly as published in the owncloud documentation.

https://doc.owncloud.org/server/10.0/admin_manual/installation/nginx_configuration.html


#6

Hey,

i think this is indeed strange. If you want to understand the reason for this message i would still suggest to search a little bit around. I just have used a search like e.g.: https://www.google.com/search?q=4970+connect()+failed+(111%3A+Connection+refused)+while+connecting+to+upstream

and immediately found several topics discussing this message like e.g. https://serverfault.com/questions/317393/connect-failed-111-connection-refused-while-connecting-to-upstream or https://www.digitalocean.com/community/questions/nginx-error-111-connection-refused

Maybe you can wait a few days/weeks more to see if you get some additional answers of other users. If not (which i think could happen :slightly_frowning_face: as i don’t think that the message is related to ownCloud at all) you could try to look for users with knowledge on nginx at:

https://nginx.org/en/support.html


#7

Tom, I really find it incorrect that you just say it has nothing to do with Owncloud. Owncloud depends on a webserver (Apache or Nginx), PHP and a DB. Specific configuration of the webserver, PHP or MYSQL is important in order for Owncloud to function properly. So each of those components can break Owncloud functionality. You can’t see them separate and say it has nothing to do with Owncloud. That’s just too easy … And if I could find the answer on Google, I wouldn’t be posting my question here.

Anyway, I’ve found a solution by myself. It seems like a SOCKET connection with PHP-FPM does not work very well with Owncloud + NGINX. I fixed it by configuring a TCP connection instead. Check instructions here


#8

Hey,

i think its correct what i’m trying to say. :slightly_smiling_face: That the solution is to correct the nginx configuration to solve this malfunction within nginx causing the errors seems to confirm this.

From what i know this forums is mainly used to give support for ownCloud. PHP, nginx and similar are only components which are used by ownCloud. While you can ask question for those components here i think you can find users more familiar with these components at e.g. https://nginx.org/en/support.html or similar support channels.

Such channels have way more experienced users for the components then here, these probably have easily pointing you to the solution on how to fix your nginx web server like you have found out. :slightly_smiling_face: