AppNeta C50 Docker Instance Not Connecting to APM via Proxy
search cancel

AppNeta C50 Docker Instance Not Connecting to APM via Proxy

book

Article ID: 256028

calendar_today

Updated On:

Products

AppNeta

Issue/Introduction


The c50 docker container has been configured to use a proxy server in order to connect to the AppNeta APM instance. The container
  fails to connect and the monitoring point never comes online.


mp-compose.yaml

 

 

 

Environment

Release : HW

Cause


The container is configured to use port 80 and then 8080 in that order by default. The proxy server did not allow the connection to
   pass to port 80 and when the container attempted the second port (8080) it did not respect the proxy setting and attempted to make a
   direct connection to the apm-xx instance which failed.


06:13:11.907241 NisConnector::attemptConnections) attempt connection via proxy http://http.proxy.XXXX.net:8000/
06:13:11.921618 NisConnector[0]::connectToProxy) Proxy host=http.proxy.XXXX.net Proxy address=10.20.20.80:8000 Connection address=app-xx.pm.appneta.com NIS address=app-xx.pm.appneta.com:80
06:13:12.334499 Seq2NisConnectionHandler::close) closing. Owner is null
06:13:12.334587 ConnectionHandler::shutdown) Shutting down this 0x7f1460017ad0
06:13:12.334720 HostInfoMonitor::removeClient) Sink does not match, skipping removal
06:13:12.334740 Seq2NisConnectionHandler::~Seq2NisConnectionHandler) Deleting handler. Owner is null
06:13:12.334869 NisConnector[0]::connectToProxy) Port 80 failed. connect: Unknown error 336462231
06:13:12.334905 NisConnector::attemptConnections) connection to proxy http://http.proxy.XXXX.net:8000/ failed.

06:13:17.335385 NisConnector[0]::connectToNis) Connection address: app-xx.pm.appneta.com, NIS address: app-xx.pm.appneta.com, Port: 8080
06:13:47.357266 Seq2NisConnectionHandler::close) closing. Owner is null
06:13:47.357472 ConnectionHandler::shutdown) Shutting down this 0x7f1460017ad0
06:13:47.357662 HostInfoMonitor::removeClient) Sink does not match, skipping removal
06:13:47.357720 Seq2NisConnectionHandler::~Seq2NisConnectionHandler) Deleting handler. Owner is null
06:13:52.358220 NisConnector[0]::onFailedIteration) Could not connect to NIS at app-xx.pm.appneta.com.
06:13:52.358282 NisConnector[0]::backOff) Waiting 1800 seconds before connection attempt 860 (backoffIndex_ = 4, attemptCount_ = 783)

Resolution


The EMP 13.10.x versions do not seem to respect the proxy setting for the second port (if the connection to AppNeta using the first port fails the second is tried).

Defect (MP-6980) has been raised to address this in a future EMP release.


The current workaround is to change the order of ports in the .env file so that when the container starts it uses 8080 first (which was allowed through the proxy as port 80 was not)

.env
APPNETA_SERVER_PORTS=80,8080

Change to

APPNETA_SERVER_PORTS=8080,80


Additional Information

Useful Docker Commands

# Container Logs - generate and collect logs
   sudo docker exec <CONTAINER ID> /sbin/logs.sh > /tmp/c50_logs_verbose.tar.gz

# Container up
   sudo docker-compose -f mp-compose.yaml up -d
   
# Container stop
   sudo docker-compose -f mp-compose.yaml stop