Welcome! Log In Create A New Profile

Advanced

Connection refused) while connecting to upstream

Posted by chev 
Connection refused) while connecting to upstream
July 11, 2014 12:16PM
Hi,
I was wondering if someone could shed some light on an issue we are having in the log files, intermittently we are getting flooded with the below error messages.
We are just using NGINX as a reverse proxy and using Glass fish for the apache server, both on separate servers. I did some searching around and see allot of people that have this issue but nobody seems to comment on how they resolve it. I did see one poster where they referenced changing the nginx config files where there is a "local host" entry to the local host IP(127.0.0.1) instead and this seemed to help for several people.
Is there anyone that has had this problem and can comment on it? I am also checking logfiles in glassfish to see if we are hitting any limits and so far I am not seeing anything major, or that I can sync up with the same time frames we get these errors in the nginx log.

connect() failed (111: Connection refused) while connecting to upstream, client: IP, server: _, request: "GET /bandwidth/ HTTP/1.1", upstream: "http://IP address", host: " "

Thanks
Re: Connection refused) while connecting to upstream
July 21, 2014 09:10AM
Hi Chev,

any luck in your quest ?
I have the same probleme except the upstream is refered as "upstream: "http://[::1]:8000/remote.php/webdav/"" which may be normal but I do not know this syntax: [::1].

By the way, this error message doesn't seem to induce problems to the users. Is it also your case ?

Regards
Re: Connection refused) while connecting to upstream
August 05, 2014 10:45AM
The error seemed to go away for a few weeks and now its back so I am back to troubleshooting it. I have not had any luck yet, but yes, the users get a "bad gateway: error messages. I am going to be implementing moving all local host to IP, 1st, as well as on our glassfish server putting on extra logging to see if I can catch the issue, I believe it to be a parameter issues(high watermark) as its only been a problem when there is high volume.
Re: Connection refused) while connecting to upstream
March 31, 2021 12:48PM
Hi Chev,

I have a very similar problem, in my case nginx as a reverse proxy runs on a different instance than glassfish, but both then on a vmware esxi server.

Ex: nginx at 192.168.1.12 and glassfish 192.168.1.7. Its network interfaces are virtual, as there is no physical connection, I believe that the network connection is not the problem.

Everything works very well for a few days, then users start to complain about the damn "Bad Gateway" message. and when that happens in the nginx logs we have several:
"[error] 578654 # 578654: * 1055921 connect () failed (111: Connection refused) while connecting to upstream, client: 177.101.119.220, server: ...."

Apparently it seems that the glassfish is refusing the connection, I just restart the glassfish and everything works again, for a few days. It looks like something you mentioned, some limit of the glassfish being reached, but I don't have a very deep knowledge to investigate this type of thing. I know that memory and CPU usage are not the main problem as VMs are over-sized.

The strange thing is that when the "Bad Gatey" problem occurs via a proxy, I try to directly access the application on glassfish through its 192.168.1.7 and everything works.

Ja tentei muitas coisa que achei na internet e nada parece resolver.

Do you have any tip?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 183
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready