-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inputs.socket_listener TCP + TLS #5448
Comments
@BrudnyHarry I am adding the logging in #5454, there should already be an error displayed if the socket cannot be listened on though, so I can't explain why its not listed in netstat. I tested locally with TLS and it seems to be working for me: [[inputs.socket_listener]]
service_address = "tcp://:8094"
tls_cert = "/home/dbn/.ssl/server/cert.pem"
tls_key = "/home/dbn/.ssl/server/key.pem"
tls_allowed_cacerts = ["/home/dbn/.ssl/ca/cacert.pem"] Tested sending line protocol with:
Can you test with this build of the pull request and show the output: |
after install and set telegraf.conf: lut 20 07:02:42 log systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB. and for sending line protocol: btw there should be logs in /var/log/telegraf/ ? or not? Because I have directory but nothing inside If there should be something maybe I have something messed up in system and it is an tip of the iceberg and this is when I comment tls sections: lut 20 07:50:33 log systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB. |
This is normal with systemd/journald, though something I'd like to clean up since it is a bit confusing. The actual logs are sent whereever journald is setup to send them, usually Are the other plugins sending data when you run with TLS configured? |
There is rsyslog with log redirection but when I try to start telegraf with TLS I stopped the service to be sure that everythng is ok. But rsyslog redirect only logs from two listening ports so internal logs shouldn't be involved in this In telegraf.conf there is nothing more than what I paste above |
Can you run Telegraf with the TLS socket_listener and then send it a SIGQUIT after this log line:
This will cause Telegraf to terminate with a stack trace, can you attach that? |
I see here one problem. I had run telegraf like: service telegraf start and next service telegraf status to show if something is wrong. Checking telegraf with service there was no information about buffer. This is info when i run telegraf from console: in service telegraf status there was no info about set read buffer ! (something to think about) *EDIT: this is info when I send SIGQUIT and he is start using service command: root@log:/etc/telegraf# telegraf goroutine 0 [idle]: goroutine 1 [semacquire]: goroutine 6 [syscall]: goroutine 19 [select]: goroutine 24 [select]: goroutine 14 [select]: goroutine 29 [IO wait]: goroutine 27 [IO wait]: goroutine 28 [select]: goroutine 30 [semacquire]: goroutine 31 [chan receive]: goroutine 32 [select]: goroutine 53 [select]: goroutine 54 [select]: goroutine 55 [select]: goroutine 56 [select]: goroutine 57 [select]: goroutine 58 [select]: goroutine 59 [select]: goroutine 60 [select]: goroutine 61 [select]: rax 0xca |
Interesting, do you have |
Not anymore ;) at the beggining I had. After error with buffer I commented that. Did you read that: Then there is one problem but it is with certificate during connection on that port -> "it doesn't contain any IP SANs'". It was created without IP SAN. But main question is: Why running program with: |
@BrudnyHarry I looked into this more closely and I believe that the problem is caused by not having the correct permissions on the file, along with a bug in Telegraf's handling of errors opening the files. I'm still working on the fix for the missing error message, but if make sure that the |
Relevant telegraf.conf:
System info:
Telegraf 1.9.0
4.9.0-3-amd64 Debian 4.9.30-2+deb9u5
Steps to reproduce:
Expected behavior:
Information that listening on tcp:8094 is set or if not a error message why
Actual behavior:
There will be no information that something is listening on port 8094 and if checked with netstat -tpl nothing with that port will be presented
###Additional info
When I set socket_listener without tls options it work and is presented in netstat -tpl
The text was updated successfully, but these errors were encountered: