Title: envoy exit silently if not able to bind envoy_domain_socket_0
Description:
I try to run envoy as a sidecar service, so may run several envoy processes on one server. But envoy failed to start silently, without any logs. From strace, I can see it tries to bind envoy_domain_socket_0 and failed. After specify --base-id, it starts ok.
Envoy logs to stderr, please check your docker, etc. setup to get the logs. If you don't want to use hot restart you can disable it via CLI (see docs).
I thought "I didn't see anything in stderr, and I tried with --disable-hot-restart." But I'll double check this later.
Closing as answered
the same issue , this indeed show nothingwhen run multi instanace of envoy on the same host with host mode.
show nothing, it indeed not friendly , make me very annoyed
@berlinsaint I've had the same issue. In this case, I'm running Contour, which manages Envoy in a kubernetes cluster. When running multiple Contour (and thus Envoy) containers with hostNetwork: true, envoy will exit: 1 without any logs at all (which is incredibly annoying). I managed to get an strace output and found the following:
mmap(NULL, 2654512, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0x7f707103b000
socket(AF_UNIX, SOCK_DGRAM|SOCK_NONBLOCK, 0) = 4
bind(4, {sa_family=AF_UNIX, sun_path=@"envoy_domain_socket_0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 110) = -1 EADDRINUSE (Address in use)
futex(0x11d7460, FUTEX_WAKE_PRIVATE, 2147483647) = 0
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}, NULL) = 0
rt_sigaction(SIGABRT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f7071a1fef0}, NULL, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f7071a1fef0}, NULL, 8) = 0
rt_sigaction(SIGFPE, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f7071a1fef0}, NULL, 8) = 0
rt_sigaction(SIGILL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f7071a1fef0}, NULL, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f7071a1fef0}, NULL, 8) = 0
munmap(0x7f707223d000, 24576) = 0
getpid() = 38
getpid() = 38
exit_group(1) = ?
+++ exited with 1 +++
Notable section: sun_path=@"envoy_domain_socket_0\0...\0"}, 110) = -1 EADDRINUSE (Address in use). Envoy apparently uses an anonymous unix domain socket. When launching multiple envoy containers in the same network namespace, these conflict, causing an Address In Use error. Unfortunately, unlike when TCP sockets are in use, Envoy does not bubble this up to the error logs.
I was going to open a ticket about this, but discovered the flag --base-id. Try setting this to some integer (uint32, so less than ~4 billion) and start the second instance. This should select a different socket name, thus avoiding the EADDRINUSE error.
Good luck!
Keyworks so others can find this faster: envoy exits immediately without logging, envoy exit 1
I am getting the same thing docker container for envoy proxy exits without any logs. This is super annoying.
Most helpful comment
@berlinsaint I've had the same issue. In this case, I'm running Contour, which manages Envoy in a kubernetes cluster. When running multiple Contour (and thus Envoy) containers with
hostNetwork: true, envoy will exit: 1 without any logs at all (which is incredibly annoying). I managed to get an strace output and found the following:Notable section:
sun_path=@"envoy_domain_socket_0\0...\0"}, 110) = -1 EADDRINUSE (Address in use). Envoy apparently uses an anonymous unix domain socket. When launching multiple envoy containers in the same network namespace, these conflict, causing an Address In Use error. Unfortunately, unlike when TCP sockets are in use, Envoy does not bubble this up to the error logs.I was going to open a ticket about this, but discovered the flag
--base-id. Try setting this to some integer (uint32, so less than ~4 billion) and start the second instance. This should select a different socket name, thus avoiding the EADDRINUSE error.Good luck!
Keyworks so others can find this faster: envoy exits immediately without logging, envoy exit 1