Warning message when I try to post a request

Hi,
Please I stuck, when I try to post a request I keep getting this warning message

image

java.net.SocketException: Address family not supported by protocol family: connect
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.co

The post request works okay in “Postman”

Hi @akan_antia,
There can be many reasons for your issue. They may be:

  • Anti-virus blocking the connection. If you have an anti-virus running on that computer, try disabling it for a test.

  • Java is trying to use IPv6 to connect. Please put the argument -Djava.net.preferIPv4Stack=true in the file katalon.ini in Katalon Studio installation package.

I agree about adding that argument in the katalon.ini file:
Djava.net.preferIPv4Stack=true

I also had to add a similar argument in the com.kms.katalon.execution.properties file (project settings):
execution.launch.vmArgs="-Djava.net.preferIPv4Stack\=true"

In my case both changes were necessary for API tests to work with a VPN tunnel which carries only IPv4 traffic (not IPv6).