Search code examples
windowsapacheapache2windows-subsystem-for-linuxgetaddrinfo

Cannot start apache2 in WSL


I'm getting the following error when I try to start apache2 from WSL:

➜  ~ sudo service apache2 start
 * Starting Apache httpd web server apache2
 *
 * The apache2 configtest failed.
Output of config test was:
apache2: ../sysdeps/posix/getaddrinfo.c:2603: getaddrinfo: Assertion `IN6_IS_ADDR_V4MAPPED (sin6->sin6_addr.s6_addr32)' failed.
Aborted (core dumped)
Action 'configtest' failed.
The Apache error log may have more information.

Apache error log is empty.

I've also set the Listen 0.0.0.0:8080 and Listen 0.0.0.0:8443 in the ports.conf and changed the virtual hosts' port to match the listen ports.

System versions:

➜  ~ uname -a
Linux yce-mac 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux
➜  ~ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

Windows OS version: 10.0.15063 (Creators Update)


Solution

  • Okay, looks like (for me at least) the issue was caused by a VPN solution called Pulse Secure.

    After I've uninstalled it, apache started working again.