1

The service starts and attemps to listen to port # 443, I get errno=99 which is EADDRNOTAVAIL and std::strerror(errno) reports "Cannot assign requested address".

If I run sudo getcap /path/to/binary I get this: /usr/local/binary_file = cap_net_bind_service+ep

This seems to mean that it has the capability, yet I can not bind to the port, anyone can help me with this issue?

Bamaco
  • 131
  • 8
  • can we assume you verified that there's not another process already bound to the port(s) in question? if so, how? – steeldriver Sep 12 '20 at 19:19
  • @steeldriver I used $sudo netstat -plan --protocol=inet and got port # 22 and # 54 in LISTEN state, nothing about port # 443 or #80 – Bamaco Sep 12 '20 at 19:47

1 Answers1

1

Turns out I specified the wrong ipaddress in my bind, that came from an environment variable passed at compilation time. Setcap works great.

Bamaco
  • 131
  • 8