FW: httpd 2.2.15-59 Reverse Proxy " proxy: Errorreading from remote server returned by /" [SOLVED-nat messing up replies]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

 

Found out what the problem is.

 

 

Printer web site (and the II server to)  has gateway address of vyos (router/firewall) which is Nating the LAN.

The traffic for my.server.IP is being NATed and of course replies get lost. I was not capturing the traffic in the correct machine.

 

Thanks for your time. I’ll have to figure out a solution, hoping not having to change the gateway address on my internal server.

 

 

 

Os melhores cumprimentos
David Alexandre M. de Carvalho
---------------------------------------
Especialista de Informática
Departamento de Informática
Universidade da Beira Interior

 

De: Alexandru Duzsardi
Enviado: 13 de abril de 2017 15:01
Para: david@xxxxxxxxx
Assunto: RE: httpd 2.2.15-59 Reverse Proxy " proxy: Error reading from remote server returned by /"

 

It looks to me that your are proxying from 10.0.0.130 to the same host

[Thu Apr 13 14:51:21 2017] [debug] proxy_util.c(2158): proxy: connecting http://10.0.0.130/ to 10.0.0.130:80

 

Also <VirtualHost my.internet.ip:80>

Is that IP address actually configured on the server ?

 

----

 

From: david@xxxxxxxxx [mailto:david@xxxxxxxxx]
Sent: Thursday, April 13, 2017 4:54 PM
To: Alexandru Duzsardi <alexandru.duzsardi@xxxxxxxxxxxxxxxxx>
Subject: RE: httpd 2.2.15-59 Reverse Proxy " proxy: Error reading from remote server returned by /"

 

In fact

 

[Thu Apr 13 14:51:21 2017] [debug] mod_proxy_http.c(56): proxy: HTTP: canonicalising URL //10.0.0.130/

[Thu Apr 13 14:51:21 2017] [debug] proxy_util.c(1525): [client my.server.IP] proxy: http: found worker http://10.0.0.130/ for http://10.0.0.130/

[Thu Apr 13 14:51:21 2017] [debug] mod_proxy.c(1026): Running scheme http handler (attempt 0)

[Thu Apr 13 14:51:21 2017] [debug] mod_proxy_http.c(2018): proxy: HTTP: serving URL http://10.0.0.130/

[Thu Apr 13 14:51:21 2017] [debug] proxy_util.c(2102): proxy: HTTP: has acquired connection for (10.0.0.130)

[Thu Apr 13 14:51:21 2017] [debug] proxy_util.c(2158): proxy: connecting http://10.0.0.130/ to 10.0.0.130:80

[Thu Apr 13 14:51:21 2017] [debug] proxy_util.c(2289): proxy: connected / to 10.0.0.130:80

[Thu Apr 13 14:51:21 2017] [debug] proxy_util.c(2540): proxy: HTTP: fam 2 socket created to connect to 10.0.0.130

[Thu Apr 13 14:51:21 2017] [debug] proxy_util.c(2672): proxy: HTTP: connection complete to 10.0.0.130:80 (10.0.0.130)

 

But then timeout

 

[Thu Apr 13 14:52:21 2017] [error] [client my.server.IP] (70007)The timeout specified has expired: proxy: error reading status line from remote server 10.0.0.130

[Thu Apr 13 14:52:21 2017] [debug] mod_proxy_http.c(1448): [client my.server.IP] proxy: read timeout

[Thu Apr 13 14:52:21 2017] [debug] mod_proxy_http.c(1499): [client my.server:IP] proxy: NOT Closing connection to client although reading from backend server 10.0.0.130 failed.

[Thu Apr 13 14:52:21 2017] [error] [client my.server.IP] proxy: Error reading from remote server returned by /

[Thu Apr 13 14:52:21 2017] [debug] proxy_util.c(2120): proxy: HTTP: has released connection for (10.0.0.130)

 

 

 

Os melhores cumprimentos
David Alexandre M. de Carvalho
---------------------------------------
Especialista de Informática
Departamento de Informática
Universidade da Beira Interior

 

De: Alexandru Duzsardi
Enviado: 13 de abril de 2017 14:35
Para: david@xxxxxxxxx
Assunto: RE: httpd 2.2.15-59 Reverse Proxy " proxy: Error reading from remote server returned by /"

 

I would recommend enabling http://httpd.apache.org/docs/current/mod/core.html#errorlog and maybe set the level to debug http://httpd.apache.org/docs/current/mod/core.html#loglevel

 

 

----

 

From: david@xxxxxxxxx [mailto:david@xxxxxxxxx]
Sent: Thursday, April 13, 2017 4:09 PM
To: Alexandru Duzsardi <alexandru.duzsardi@xxxxxxxxxxxxxxxxx>
Subject: RE: httpd 2.2.15-59 Reverse Proxy " proxy: Error reading from remote server returned by /"

 

Thanks for the reply.

From my LAN i can access with or without the trailing slash.

There are no firewall issues because, as I wrote, wireshark shows incoming and outgoing traffic from external web server to internal one.

Regards.

 

 

Os melhores cumprimentos
David Alexandre M. de Carvalho
---------------------------------------
Especialista de Informática
Departamento de Informática
Universidade da Beira Interior

 

De: Alexandru Duzsardi
Enviado: 13 de abril de 2017 13:55
Para: users@xxxxxxxxxxxxxxxx
Assunto: RE: httpd 2.2.15-59 Reverse Proxy " proxy: Error reading from remote server returned by /"

 

What happens if you try to access http://10.0.0.130/ from your dektop computer inside the LAN

Type it exactly like that with a / (slash) at the end. If you can access it , check if your proxy has access to your printer’s IP maybe a firewall or something is in the way.

 

 

From: david@xxxxxxxxx [mailto:david@xxxxxxxxx]
Sent: Thursday, April 13, 2017 2:11 PM
To: users@xxxxxxxxxxxxxxxx
Subject: httpd 2.2.15-59 Reverse Proxy " proxy: Error reading from remote server returned by /"

 

Hello all.

I want to use apache as a reverse proxy for an internel IIS site. I was unable to Setup Reverse proxy, so, for testing purposes, my internal site is a network printer web page.

My Setup:

 

Internet -> Internet Ip address ----------------------à printer web server

                               (dns website)

                               (dns website-for-internal)

 

My apache webserver is configured with 2 virtual hosts, one for the site itself, the other for the internal website.

When accessing website-for-internal, the apache logs show “proxy: Error Reading from remote server returned by/”

 

Httpd.conf

 

<VirtualHost my.internet.ip:80>

        ServerName website

        DocumentRoot /var/www/html/

        DirectoryIndex index.php

</VirtualHost>

 

<VirtualHost my.internet.ip:80>

        ServerName website-for-internal

        ProxyRequests Off

        ProxyPreserveHost on

        ProxyPass        / http://10.0.0.130/

        ProxyPassReverse / http://10.0.0.130/

</VirtualHost>

 

At this point I’ve even tried to Setup the reverse proxy without using a virtual host but I get the same result.

Also with  different settings with the Proxy configuration (retry=0, Keepalive=on, connectiontimeout=5,  timeout=30, etc,etc)

 

wireshark shows incoming and outgoing traffic for the internal Ip adress.

 

Browser error:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.

Reason: Error reading from remote server

Any ideas please?

Thanks and regards

 

 

 

 

Os melhores cumprimentos
David Alexandre M. de Carvalho
---------------------------------------
Especialista de Informática
Departamento de Informática
Universidade da Beira Interior

 

 

 

 

 


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux