This article offers valuable insights and suggestions for users to troubleshoot and resolve connectivity issues with Botium agents. It covers various potential causes of connectivity problems and provides practical solutions to ensure reliable network connections for your chatbot testing environments.
Possible Reasons
-
Company firewall rules are prohibiting access to the chatbot endpoint
-
Hostname resolution is not configured correctly or not accessible to docker containers
-
Network access is only possible by using a company HTTP(S) proxy
-
For HTTP(S) chatbot endpoints or HTTP(S) proxies, SSL certificate handling may be a problem (self-signed certificates, non-standard SSL signer, …)
-
Hostname mapping within a docker network not configured/used correctly
-
…
Hints for Connectivity Troubles
Whenever you are receiving error messages in the Botium logs like these, we suggest to verify the network connectivity:
-
ESOCKETTIMEOUT
-
ENOTCONNECTED
-
hostname not found
-
invalid SSL certificate
-
git error 128
Troubleshooting
- Identify Docker Container: Find the docker container id of the Botium Server or a Botium Agent. Run this docker command to see the running containers and find the container id in the first column of the container in question:
docker ps
Select the docker container from the second column, the image name, which points to Botium Box Server or Botium Agent.
- Connect to Docker Container with Terminal: Run this command to spawn a bash shell within the docker container in question - replace <container-id> with the container id from the previous step.
docker exec -it <container-id> /bin/bash
Check Connectivity with Linux Tools
-
Check IP Connectivity with ping: First you should try to ping the
IP-Address or
Hostname.
ping <ip-address-to-check>
-
Check Hostname Resolution with nslookup: If you connect by Hostname
instead of IP address, you can check hostname
resolution.
nslookup <hostname-to-check>
-
Check IP/Port Connectivity with nc:
netcat is a universal tool to (among others) check network
connectivity. To check if the connection to a given port on a given host is
available, run this command (obviously, replace IP-Adress and
port):
It will immediately show if connection is possible.nc -zv <ip-address-to-check> <port>
-
Check HTTP(S) Connectivity with wget: To check if HTTP(S)
connectivity is given, use wget. To do a simple HTTP(S) GET request, try
this:
wget <my-endpoint-url>
Tip: wget is an extremely versatile tool, please consult the manual or Google for more usage scenarios. -
Alternative: Check HTTP(S) Connectivity with curl: Run this command
to install
curl:
apk add curl
Note: For this step, you need access to the Alpine Linux software repository, so please make sure to open up the required network ports. If you cannot do this, you will have to add curl to the Botium Dockerfiles and build your own images (for advanced users only).To do a simple HTTP(S) GET request, try this:curl http://my-selenium-server:4444/wd/hub