gatling-0.15 on FreeBSD 12.1 Release, does not listen on IPv4, netstat shows: % netstat -na | grep LISTEN | grep 80 tcp6 0 0 *.80 *.* LISTEN and: And specifying an IPv4 address as the bind address with -i option will cause an error: % gatling -i 127.0.0.1 socket_bind6_reuse: Can't assign requested address
change the content of patch-gatling.c to the following solves the problem: --- gatling.c.orig 2021-01-22 11:07:51.264973000 +0800 +++ gatling.c 2021-01-22 11:07:51.264931000 +0800 @@ -100,7 +100,7 @@ int forksock[2]; #endif -#if defined(__OpenBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) #define __broken_itojun_v6__ #endif @@ -1863,7 +1863,7 @@ Y=sizeof(workgroup_utf16); x=workgroup; y=workgroup_utf16; -#ifdef __sun__ +#if defined(__sun__) || defined(__FreeBSD__) if (iconv(i,(const char**)&x,&X,&y,&Y)) panic("UTF-16 conversion of workgroup failed.\n"); #else if (iconv(i,&x,&X,&y,&Y)) panic("UTF-16 conversion of workgroup failed.\n"); However gatling will complain that FreeBSD does not have real IPv6 support: % gatling WARNING: We are taking heavy losses working around itojun KAME madness here. Please consider using an operating system with real IPv6 support instead! starting_up 0 :: 8000 start_ftp 0 :: 2121 And the performance is far more bad comparing with Linux version :(
Just did a little research and found that the original port will work with IPv4 if net.inet6.ip6.v6only is set to 0 (default is 1). Additional information: https://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/ipv6.html inet6(4)
A note about disabling the default dual stack behaviour is certainly worth adding to a pkg-message for the 0.16 update, which I'll submit next week. I am sorry you had to find this out on your own -- I know I had my share of hair pulling when I first ran into this :/
(In reply to Marco Steinbach from comment #3) Thanks! There are many great tools to benchmark web servers. However as far as I know gatling is the only great tool to "benchmark" web clients, makes it a valuable tool for benchmarking web-related applications like WAF, proxies, load balancers etc.