Thanks Aleks for all your help. Let me try to help you with the answers for all your questions:
1: This error is actually coming from haproxy and NOT FROM spring boot candidate service. there is no any java exception while running the candidate service 2: out put for command : curl -v --max-time 5 127.0.0.1:8099 [root@ip-172-31-25-224 ~]# curl -v --max-time 5 127.0.0.1:8099 * About to connect() to 127.0.0.1 port 8099 (#0) * Trying 127.0.0.1... * Connected to 127.0.0.1 (127.0.0.1) port 8099 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.29.0 > Host: 127.0.0.1:8099 > Accept: */* > < HTTP/1.1 404 < Content-Length: 0 < Date: Thu, 15 Feb 2018 14:27:28 GMT < * Connection #0 to host 127.0.0.1 left intact [root@ip-172-31-25-224 ~]# 3: output for command : haproxy -vv [root@ip-172-31-25-224 ~]# haproxy -vv HA-Proxy version 1.5.18 2016/05/10 Copyright 2000-2016 Willy Tarreau <[email protected]> Build options : TARGET = linux2628 CPU = generic CC = gcc CFLAGS = -O2 -g -fno-strict-aliasing -DTCP_USER_TIMEOUT=18 OPTIONS = USE_LINUX_TPROXY=1 USE_ZLIB=1 USE_REGPARM=1 USE_OPENSSL=1 USE_PCRE=1 Default settings : maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200 Encrypted password support via crypt(3): yes Built with zlib version : 1.2.7 Compression algorithms supported : identity, deflate, gzip Built with OpenSSL version : OpenSSL 1.0.1e-fips 11 Feb 2013 Running on OpenSSL version : OpenSSL 1.0.1e-fips 11 Feb 2013 OpenSSL library supports TLS extensions : yes OpenSSL library supports SNI : yes OpenSSL library supports prefer-server-ciphers : yes Built with PCRE version : 8.32 2012-11-30 PCRE library supports JIT : no (USE_PCRE_JIT not set) Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT IP_FREEBIND Available polling systems : epoll : pref=300, test result OK poll : pref=200, test result OK select : pref=150, test result OK Total: 3 (3 usable), will use epoll. Please suggest Regards, Irfan On Thu, Feb 15, 2018 at 3:17 PM, Aleksandar Lazic <[email protected]> wrote: > Hi Ifran. > Am 15.02.2018 um 14:17 schrieb Irfan Sayed: > > Hello, > > I m newbie to the HAproxy and trying to set that as API gateway for the > > micro-services. > > following is the haproxy.cfg > > > > ################################## > > > > global > > log 127.0.0.1 local2 > > chroot /var/lib/haproxy > > Do you have also the error When you comment this in? > Just a test. > > > pidfile /var/run/haproxy.pid > > maxconn 4000 > > user root > > group root > > daemon > > [snipp] > > > haproxy service is up and running. however, fronend is not able to > > communicate with backend candidate service ... in the haproxy stats , it > > says following error : > > > > _ > > Layer4 connection problem: General socket error (Permission denied) > > _ > > This is the error from haproxy or from spring boot? > Please can you also show us the output of haproxy -vv , thanks, > > > Indeed the candidate is a springboot micro-service and is running on > > tomcat port 8099 , but still front end and backend communication is not > > happening . i m not sure , whetaher the haproxy configuration is the > > problem OR anywhere else ... > > > > please help. i m stuck up like anything > > What's the output of > > curl -v --max-time 5 127.0.0.1:8099 > > > Regards, > > irfan > > Regards > Aleks >

