Proxy to External App Broken?

#1
Under one Virtual host, I have created an 'External App', like so:

Name: yap
Address: 192.168.1.200:80

Then under 'Rewrite', I have:

Enable Rewrite: yes
Log Level: 9

Rewrite Rules:
RewriteRule ^/(.*)$ http://yap/$1 [P]

-----------------------------------------

But when I try to request anything from this virtual host, the request hangs indefinitely!

error.log says:
015-11-23 16:06:42.804 [INFO] [192.168.1.52:58821] [REWRITE] Rule: Match '/hello.png' with pattern '^/(.*)$', result: 2
2015-11-23 16:06:42.804 [INFO] [192.168.1.52:58821] [REWRITE] Source URI: '/hello.png' => Result URI: 'http://yap/hello.png'
2015-11-23 16:06:42.804 [INFO] [192.168.1.52:58821] [REWRITE] Last Rule, stop!

I use wget to test, and the request looks like this:

$ wget -S "http://litespeed-test.com/hello.png"
--2015-11-23 16:06:42-- http://litespeed-test.com/hello.png
Resolving litespeed-test.com (litespeed-test.com)... 192.168.1.205
Connecting to litespeed-test.com (litespeed-test.com)|192.168.1.205|:80... connected.
HTTP request sent, awaiting response...

And that's it. Will stay like that indefinitely. Needless to say there is another webserver listening on 192.168.1.200:80, and there are no firewalls involved.

Why would Litespeed do this?
 
#3
Certainly, here is that wget cmd:

$ wget -S http://192.168.1.200/hello.png
--2015-11-23 20:11:50-- http://192.168.1.200/hello.png
Connecting to 192.168.1.200:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: nginx/1.6.2 (Ubuntu)
Date: Tue, 24 Nov 2015 04:11:50 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 670
Connection: keep-alive
Vary: Accept-Encoding
Vary: Accept-Encoding
Length: 670 [text/html]
Saving to: ‘hello.png’

hello.png 100%[============================================================================================================================================================>] 670 --.-KB/s in 0s

2015-11-23 20:11:51 (213 MB/s) - ‘hello.png’ saved [670/670]

--------------------

Thanks for looking at my problem!

EDIT:

The above is on another server on the private network. The below is on 192.168.1.205 specifically, as you can see in the following wget cmd:

$ wget --bind-address 192.168.1.205 -S http://192.168.1.200/hello.png
--2015-11-23 20:14:44-- http://192.168.1.200/hello.png
Connecting to 192.168.1.200:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: nginx/1.6.2 (Ubuntu)
Date: Tue, 24 Nov 2015 04:14:44 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 670
Connection: keep-alive
Vary: Accept-Encoding
Vary: Accept-Encoding
Length: 670 [text/html]
Saving to: ‘hello.png.2’

hello.png.2 100%[============================================================================================================================================================>] 670 --.-KB/s in 0s

2015-11-23 20:14:44 (244 MB/s) - ‘hello.png.2’ saved [670/670]
 
#5
Here is 'yap':



And if I turn rewrite off:

$ curl -I "http://litespeed-test.com/"
HTTP/1.1 200 OK
Etag: "752-56536150-622660"
Last-Modified: Mon, 23 Nov 2015 18:56:16 GMT
Content-Type: text/html
Content-Length: 1874
Accept-Ranges: bytes
Date: Tue, 24 Nov 2015 04:36:29 GMT
Server: LiteSpeed

EDIT:

ps: litespeed-test.com is pointed to 192.168.1.205 in my hosts)
$ ping litespeed-test.com
PING litespeed-test.com (192.168.1.205)
 

NiteWave

Administrator
#8

mistwang

LiteSpeed Staff
#10
Please try change your configuration to
Name: yap
address: 192.168.1.200:80
notes: not set
max connections: 100
connection keep-alive timeout: 20
environment: not set
initial req timeout: 100
retry timeout: 1
response buffering: no

turn on server debug logging, send us the full debug log of the failed request.
 
#11
Ok, set the yap config exactly as you suggest above, and I set server Log Level: Debug and Debug Level: High.

This is what the log says now, as I make the request:

2015-11-24 09:37:21.129 [DEBUG] [192.168.1.52:49776#Example] New request:
Method=[GET], URI=[/hello.png],
QueryString=[]
Content Length=0
2015-11-24 09:37:21.129 [DEBUG] [192.168.1.52:49776#Example] NtwkIOLink::suspendRead()...
2015-11-24 09:37:21.129 [INFO] [192.168.1.52:49776#Example] [REWRITE] Rule: Match '/hello.png' with pattern '^/(.*)$', result: 2
2015-11-24 09:37:21.129 [INFO] [192.168.1.52:49776#Example] [REWRITE] Source URI: '/hello.png' => Result URI: 'http://yap/hello.png'
2015-11-24 09:37:21.129 [INFO] [192.168.1.52:49776#Example] [REWRITE] Last Rule, stop!
2015-11-24 09:37:21.129 [DEBUG] [192.168.1.52:49776#Example] processRuleSet() returned -2.

--- this is where its hung, and the next entries happen after I stop wget / curl from trying to get /hello.png ---

2015-11-24 09:37:32.132 [DEBUG] [192.168.1.52:49776#Example] Peer close connection detected!
2015-11-24 09:37:32.132 [DEBUG] [192.168.1.52:49776#Example] Shutting down out-bound socket ...
2015-11-24 09:37:32.132 [DEBUG] [192.168.1.52:49776#Example] HttpSession::recycle()
2015-11-24 09:37:32.132 [DEBUG] [192.168.1.52:49776#Example] Close socket ...
2015-11-24 09:37:32.132 [DEBUG] [192.168.1.52:49776#Example] Available Connections: 1999, concurrent conn: 1
2015-11-24 09:37:32.132 [DEBUG] [192.168.1.52:49776#Example] Recycle NtwkIoLink
 
Top