Hello guys,
I am trying to run haproxy on osv but it is not successful so far.
This is what I did:
host$ git clone
http://git.1wt.eu/git/haproxy.git/
host$ cd haproxy
host$ git co -b osv v1.5-dev21
host$ make TARGET=generic CFLAGS="-fPIC -shared" LDFLAGS="-fPIC -shared" -j4
host$ cp -v haproxy /home/asias/src/cloudius-systems/osv/build/release/haproxy.so
host$ cp -v haproxy.cfg /home/asias/src/cloudius-systems/osv/build/release/haproxy.cfg
host$ cat haproxy.cfg
global
maxconn 4000
user root
defaults
mode http
timeout client 1m
timeout connect 10s
timeout server 1m
frontend main *:6000
default_backend app
backend app
balance roundrobin
server app1
ip...@192.168.122.1:6001 check
host$ cd $osv
host$ git diff origin/master
diff --git a/bootfs.manifest.skel b/bootfs.manifest.skel
index 9816e92..0a51b44 100644
--- a/bootfs.manifest.skel
+++ b/bootfs.manifest.skel
@@ -3,5 +3,7 @@
/zpool.so: zpool.so
/libzfs.so: libzfs.so
/zfs.so: zfs.so
+/haproxy.so: haproxy.so
+/haproxy.cfg: haproxy.cfg
/tools/mkfs.so: tools/mkfs/mkfs.so
/tools/cpiod.so: tools/cpiod/cpiod.so
host$ sudo ./scripts/run.py -nv -e "haproxy.so -f /haproxy.cfg -p haproxy.pid -d -V"
...
[I/31 dhcp]: Waiting for IP...
[I/322 dhcp]: Server acknowledged IP for interface eth0
[I/322 dhcp]: Configuring eth0: ip 192.168.122.89 subnet mask 255.255.255.0 gateway 192.168.122.1
Available polling systems :
poll : pref=200, test result OK
select : pref=150, test result FAILED
Total: 2 (1 usable), will use poll.
Using poll() as the polling mechanism.
[WARNING] 363/054355 (0) : Server app/app1 is DOWN, reason: Layer4 timeout, check duration: 2000ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
[ALERT] 363/054355 (0) : backend 'app' has no server available!
...
host$ python -m SimpleHTTPServer 6001
----------------------------------------
Exception happened during processing of request from ('192.168.122.89', 48428)
Traceback (most recent call last):
File "/usr/lib64/python2.7/SocketServer.py", line 295, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib64/python2.7/SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "/usr/lib64/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib64/python2.7/SocketServer.py", line 649, in __init__
self.handle()
File "/usr/lib64/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib64/python2.7/BaseHTTPServer.py", line 310, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "/usr/lib64/python2.7/socket.py", line 476, in readline
data = self._sock.recv(self._rbufsize)
error: [Errno 104] Connection reset by peer
----------------------------------------
Wireshark captured packets are attached. It seems the haproxy in osv
sends RST immediately and can not access the backend http server.
Your thoughts are highly appreciated!
--
Asias