Inputs.socket_listener bind: The requested address is not valid in its context

Hi folks,

I’m trying to use a socket_listener plugin to listen to an external TCP address and port, replacing some legacy python scripts that have been than reliable.

Using the socket_listener on a local port seems to work just fine, but I keep hitting the following error when I try to connect to an address on another machine “bind: The requested address is not valid in its context.”

Should I be able to do this with telegraf or is there some firewall issue I need to track down?

Hi,

To confirm, you are using an external address and port on the system running telegraf? Or of the remote system?

The socket listener will attempt to create a listener on the local system using the service address you provide, not reach out to that address.

That’s correct, I’m attempting to reach an external address and port from the system running telegraf.

As a long-shot, I don’t suppose there’s an alternate method to accomplish this using the existing plugins?

Not currently for connecting to a remote socket.