Skip to content
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

Closed
Ra-fiki opened this issue Feb 19, 2019 · 9 comments · Fixed by #5541
Closed

inputs.socket_listener TCP + TLS #5448

Ra-fiki opened this issue Feb 19, 2019 · 9 comments · Fixed by #5541
Assignees
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@Ra-fiki
Copy link

Ra-fiki commented Feb 19, 2019

Relevant telegraf.conf:

[global_tags]
 
[agent]
  interval = "10s"
  round_interval = true

  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"

  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""

  debug = false
  quiet = false
  logfile = ""

  hostname = ""
  omit_hostname = false

[[outputs.influxdb]]
   urls = ["http://127.0.0.1:8086"]

   database = "serwery"

   username = "user"
   password = "pass"

[[inputs.cpu]]
  percpu = true
  totalcpu = true
  collect_cpu_time = false
  report_active = false

[[inputs.disk]]
  ignore_fs = ["tmpfs", "devtmpfs", "devfs", "overlay", "aufs", "squashfs"]

[[inputs.diskio]]

[[inputs.kernel]]

[[inputs.mem]]

[[inputs.processes]]

[[inputs.swap]]

[[inputs.system]]

 [[inputs.socket_listener]]
    service_address = "tcp://:8094"
    max_connections = 1024
    read_timeout = "30s"
    tls_cert = "/etc/pki/server-cert.pem"
    tls_key  = "/etc/pki/server-key.pem"
    tls_allowed_cacerts = ["/etc/pki/ca.pem"]
    data_format = "influx"

System info:

Telegraf 1.9.0
4.9.0-3-amd64 Debian 4.9.30-2+deb9u5

Steps to reproduce:

  1. Put in /etc/pki/ files: ca.pem , cert.pem , key.pem (self signed certificate)
  2. Set input.socket_listener section in telegraf.conf
  3. Restart telegraf

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

@Ra-fiki Ra-fiki changed the title input.socker_listener TCP + TLS input.socket_listener TCP + TLS Feb 19, 2019
@Ra-fiki Ra-fiki changed the title input.socket_listener TCP + TLS inputs.socket_listener TCP + TLS Feb 19, 2019
@danielnelson
Copy link
Contributor

@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:

openssl s_client -connect localhost:8094 -CAfile /home/dbn/.ssl/ca/cacert.pem -cert /home/dbn/.ssl/client/cert.pem -key /home/dbn/.ssl/client/key.pem

Can you test with this build of the pull request and show the output:

@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Feb 20, 2019
@Ra-fiki
Copy link
Author

Ra-fiki commented Feb 20, 2019

after install and set telegraf.conf:
● telegraf.service - The plugin-driven server agent for reporting metrics into InfluxDB
Loaded: loaded (/lib/systemd/system/telegraf.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-02-20 07:02:42 CET; 7s ago
Docs: https://github.com/influxdata/telegraf
Main PID: 4793 (telegraf)
Tasks: 16 (limit: 4915)
CGroup: /system.slice/telegraf.service
└─4793 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d

lut 20 07:02:42 log systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
lut 20 07:02:42 log telegraf[4793]: 2019-02-20T06:02:42Z I! Starting Telegraf
lut 20 07:02:42 log telegraf[4793]: 2019-02-20T06:02:42Z I! Loaded inputs: inputs.diskio inputs.kernel inputs.processes inputs.socket_listener inputs.cpu inputs.disk inputs.mem inputs.swap inputs.system inputs.apache inputs.system in
lut 20 07:02:42 log telegraf[4793]: 2019-02-20T06:02:42Z I! Loaded aggregators:
lut 20 07:02:42 log telegraf[4793]: 2019-02-20T06:02:42Z I! Loaded processors:
lut 20 07:02:42 log telegraf[4793]: 2019-02-20T06:02:42Z I! Loaded outputs: influxdb
lut 20 07:02:42 log telegraf[4793]: 2019-02-20T06:02:42Z I! Tags enabled: host=log
lut 20 07:02:42 log telegraf[4793]: 2019-02-20T06:02:42Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"log", Flush Interval:10s

and for sending line protocol:
root@log:/var/log# openssl s_client -connect localhost:8094 -CAfile /etc/pki/ca.pem -cert /etc/pki/cert.pem -key /etc/pki/key.pem
140431517619456:error:0200206F:system library:connect:Connection refused:../crypto/bio/b_sock2.c:108:
140431517619456:error:2008A067:BIO routines:BIO_connect:connect error:../crypto/bio/b_sock2.c:109:
140431517619456:error:0200206F:system library:connect:Connection refused:../crypto/bio/b_sock2.c:108:
140431517619456:error:2008A067:BIO routines:BIO_connect:connect error:../crypto/bio/b_sock2.c:109:
connect:errno=111

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:
● telegraf.service - The plugin-driven server agent for reporting metrics into InfluxDB
Loaded: loaded (/lib/systemd/system/telegraf.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-02-20 07:50:33 CET; 4s ago
Docs: https://github.com/influxdata/telegraf
Main PID: 6054 (telegraf)
Tasks: 12 (limit: 4915)
CGroup: /system.slice/telegraf.service
└─6054 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d

lut 20 07:50:33 log systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
lut 20 07:50:33 log telegraf[6054]: 2019-02-20T06:50:33Z I! Starting Telegraf
lut 20 07:50:33 log telegraf[6054]: 2019-02-20T06:50:33Z I! Loaded inputs: inputs.kernel inputs.mem inputs.processes inputs.socket_listener inputs.cpu inputs.diskio inputs.swap inputs.system inputs.disk inputs.apache inputs.system inputs.mem inputs.diskio inputs.net
lut 20 07:50:33 log telegraf[6054]: 2019-02-20T06:50:33Z I! Loaded aggregators:
lut 20 07:50:33 log telegraf[6054]: 2019-02-20T06:50:33Z I! Loaded processors:
lut 20 07:50:33 log telegraf[6054]: 2019-02-20T06:50:33Z I! Loaded outputs: influxdb
lut 20 07:50:33 log telegraf[6054]: 2019-02-20T06:50:33Z I! Tags enabled: host=log
lut 20 07:50:33 log telegraf[6054]: 2019-02-20T06:50:33Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"log", Flush Interval:10s
lut 20 07:50:33 log telegraf[6054]: 2019-02-20T06:50:33Z I! [inputs.socket_listener] Listening on tcp://[::]:8094

@danielnelson
Copy link
Contributor

btw there should be logs in /var/log/telegraf/ ? or not? Because I have directory but nothing inside

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 /var/log/syslog IIRC.

Are the other plugins sending data when you run with TLS configured?

@Ra-fiki
Copy link
Author

Ra-fiki commented Feb 21, 2019

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

@danielnelson
Copy link
Contributor

Can you run Telegraf with the TLS socket_listener and then send it a SIGQUIT after this log line:

I! [agent] Config: Interval:10s, Quiet:false, Hostname:"log", Flush Interval:10s

This will cause Telegraf to terminate with a stack trace, can you attach that?

@Ra-fiki
Copy link
Author

Ra-fiki commented Feb 22, 2019

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:
root@log:/etc/telegraf# telegraf
2019-02-22T05:21:58Z I! Starting Telegraf
2019-02-22T05:21:58Z I! Using config file: /etc/telegraf/telegraf.conf
2019-02-22T05:21:58Z I! Loaded inputs: inputs.mem inputs.system inputs.socket_listener inputs.disk inputs.diskio inputs.kernel inputs.processes inputs.swap inputs.cpu
2019-02-22T05:21:58Z I! Loaded aggregators:
2019-02-22T05:21:58Z I! Loaded processors:
2019-02-22T05:21:58Z I! Loaded outputs: influxdb
2019-02-22T05:21:58Z I! Tags enabled: host=log
2019-02-22T05:21:58Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"log", Flush Interval:10s
2019-02-22T05:21:58Z I! [inputs.socket_listener] Listening on tcp://[::]:8094
2019-02-22T05:22:00Z W! Unable to set read buffer on a tcp socket
2019-02-22T05:22:10Z W! Unable to set read buffer on a tcp socket

in service telegraf status there was no info about set read buffer ! (something to think about)

*EDIT:
I comment config about buffer and if I start telegraf manualy(without command service)
he show info that he is listening on port 8094 xD

this is info when I send SIGQUIT and he is start using service command:

root@log:/etc/telegraf# telegraf
2019-02-22T05:21:58Z I! Starting Telegraf
2019-02-22T05:21:58Z I! Using config file: /etc/telegraf/telegraf.conf
2019-02-22T05:21:58Z I! Loaded inputs: inputs.mem inputs.system inputs.socket_listener inputs.disk inputs.diskio inputs.kernel inputs.processes inputs.swap inputs.cpu
2019-02-22T05:21:58Z I! Loaded aggregators:
2019-02-22T05:21:58Z I! Loaded processors:
2019-02-22T05:21:58Z I! Loaded outputs: influxdb
2019-02-22T05:21:58Z I! Tags enabled: host=log
2019-02-22T05:21:58Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"log", Flush Interval:10s
2019-02-22T05:21:58Z I! [inputs.socket_listener] Listening on tcp://[::]:8094
2019-02-22T05:22:00Z W! Unable to set read buffer on a tcp socket
2019-02-22T05:22:10Z W! Unable to set read buffer on a tcp socket
^\SIGQUIT: quit
PC=0x460681 m=0 sigcode=128

goroutine 0 [idle]:
runtime.futex(0x3f26e00, 0x80, 0x0, 0x0, 0x0, 0x7ffc00000000, 0x0, 0x0, 0x7ffc77160c48, 0x40c972, ...)
/usr/local/go/src/runtime/sys_linux_amd64.s:531 +0x21
runtime.futexsleep(0x3f26e00, 0x7ffc00000000, 0xffffffffffffffff)
/usr/local/go/src/runtime/os_linux.go:46 +0x4b
runtime.notesleep(0x3f26e00)
/usr/local/go/src/runtime/lock_futex.go:151 +0xa2
runtime.stoplockedm()
/usr/local/go/src/runtime/proc.go:2165 +0x8a
runtime.schedule()
/usr/local/go/src/runtime/proc.go:2565 +0x2d9
runtime.park_m(0xc000096c00)
/usr/local/go/src/runtime/proc.go:2676 +0xae
runtime.mcall(0x0)
/usr/local/go/src/runtime/asm_amd64.s:299 +0x5b

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc0004a19d8)
/usr/local/go/src/runtime/sema.go:56 +0x39
sync.(*WaitGroup).Wait(0xc0004a19d0)
/usr/local/go/src/sync/waitgroup.go:130 +0x64
github.com/influxdata/telegraf/agent.(*Agent).Run(0xc00000e050, 0x26571c0, 0xc000090740, 0x1, 0x1)
/go/src/github.com/influxdata/telegraf/agent/agent.go:129 +0x471
main.runAgent(0x26571c0, 0xc000090740, 0x3f4a728, 0x0, 0x0, 0x3f4a728, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:190 +0x870
main.reloadLoop(0xc0002b4120, 0x3f4a728, 0x0, 0x0, 0x3f4a728, 0x0, 0x0, 0xc00002fd58, 0x0, 0x0, ...)
/go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:102 +0x267
main.main()
/go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:386 +0x4ba

goroutine 6 [syscall]:
os/signal.signal_recv(0x0)
/usr/local/go/src/runtime/sigqueue.go:139 +0x9c
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:23 +0x22
created by os/signal.init.0
/usr/local/go/src/os/signal/signal_unix.go:29 +0x41

goroutine 19 [select]:
github.com/influxdata/telegraf/vendor/go.opencensus.io/stats/view.(*worker).start(0xc000146300)
/go/src/github.com/influxdata/telegraf/vendor/go.opencensus.io/stats/view/worker.go:150 +0xdd
created by github.com/influxdata/telegraf/vendor/go.opencensus.io/stats/view.init.0
/go/src/github.com/influxdata/telegraf/vendor/go.opencensus.io/stats/view/worker.go:29 +0x57

goroutine 24 [select]:
main.reloadLoop.func1(0xc0002b4180, 0xc00016a1c0, 0xc00023e1a0, 0xc0002b4120)
/go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:89 +0xaf
created by main.reloadLoop
/go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:88 +0x201

goroutine 14 [select]:
github.com/influxdata/telegraf/agent.(*Ticker).relayTime(0xc0004548a0, 0x26571c0, 0xc000146f40)
/go/src/github.com/influxdata/telegraf/agent/tick.go:46 +0x12b
created by github.com/influxdata/telegraf/agent.NewTicker
/go/src/github.com/influxdata/telegraf/agent/tick.go:33 +0x135

goroutine 29 [IO wait]:
internal/poll.runtime_pollWait(0x7fe85d2b9e30, 0x72, 0x0)
/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc0001e6598, 0x72, 0xc0004aec00, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc0001e6598, 0xffffffffffffff00, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Accept(0xc0001e6580, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_unix.go:384 +0x1a0
net.(*netFD).accept(0xc0001e6580, 0xc000153038, 0x5, 0xc00007ee50)
/usr/local/go/src/net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc00000e110, 0x13, 0xa28fc9616f15186f, 0xc00007eeb8)
/usr/local/go/src/net/tcpsock_posix.go:139 +0x2e
net.(*TCPListener).Accept(0xc00000e110, 0xc00007ee88, 0x45bb60, 0xc00007eed0, 0xc00007eed8)
/usr/local/go/src/net/tcpsock.go:260 +0x47
crypto/tls.(*listener).Accept(0xc000186200, 0x2403570, 0xc0004aec40, 0x2663300, 0xc000500380)
/usr/local/go/src/crypto/tls/tls.go:52 +0x37
github.com/influxdata/telegraf/plugins/inputs/socket_listener.(*streamSocketListener).listen(0xc0004aec40)
/go/src/github.com/influxdata/telegraf/plugins/inputs/socket_listener/socket_listener.go:40 +0x71
created by github.com/influxdata/telegraf/plugins/inputs/socket_listener.(*SocketListener).Start
/go/src/github.com/influxdata/telegraf/plugins/inputs/socket_listener/socket_listener.go:285 +0x8e2

goroutine 27 [IO wait]:
internal/poll.runtime_pollWait(0x7fe85d2b9f00, 0x72, 0xc00007ba88)
/usr/local/go/src/runtime/netpoll.go:173 +0x66
internal/poll.(*pollDesc).wait(0xc0001e6498, 0x72, 0xffffffffffffff00, 0x263ad80, 0x3e0caa0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9a
internal/poll.(*pollDesc).waitRead(0xc0001e6498, 0xc0004ab000, 0x1000, 0x1000)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc0001e6480, 0xc0004ab000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_unix.go:169 +0x179
net.(*netFD).Read(0xc0001e6480, 0xc0004ab000, 0x1000, 0x1000, 0x0, 0x0, 0xc00015e9a0)
/usr/local/go/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc00000e080, 0xc0004ab000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go/src/net/net.go:177 +0x68
net/http.(*persistConn).Read(0xc000358ea0, 0xc0004ab000, 0x1000, 0x1000, 0xc000358c60, 0xc000358ea0, 0x0)
/usr/local/go/src/net/http/transport.go:1497 +0x75
bufio.(*Reader).fill(0xc000154480)
/usr/local/go/src/bufio/bufio.go:100 +0x10f
bufio.(*Reader).Peek(0xc000154480, 0x1, 0x2, 0x0, 0x0, 0xc00035a180, 0x0)
/usr/local/go/src/bufio/bufio.go:132 +0x3f
net/http.(*persistConn).readLoop(0xc000358ea0)
/usr/local/go/src/net/http/transport.go:1645 +0x1a2
created by net/http.(*Transport).dialConn
/usr/local/go/src/net/http/transport.go:1338 +0x941

goroutine 28 [select]:
net/http.(*persistConn).writeLoop(0xc000358ea0)
/usr/local/go/src/net/http/transport.go:1885 +0x113
created by net/http.(*Transport).dialConn
/usr/local/go/src/net/http/transport.go:1339 +0x966

goroutine 30 [semacquire]:
sync.runtime_Semacquire(0xc000152658)
/usr/local/go/src/runtime/sema.go:56 +0x39
sync.(*WaitGroup).Wait(0xc000152650)
/usr/local/go/src/sync/waitgroup.go:130 +0x64
github.com/influxdata/telegraf/agent.(*Agent).runInputs(0xc00000e050, 0x26571c0, 0xc000090740, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0xc000154660, 0xe, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:254 +0x288
github.com/influxdata/telegraf/agent.(*Agent).Run.func1(0xc0004a19d0, 0xc00000e050, 0x26571c0, 0xc000090740, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0xc000154660)
/go/src/github.com/influxdata/telegraf/agent/agent.go:69 +0xa4
created by github.com/influxdata/telegraf/agent.(*Agent).Run
/go/src/github.com/influxdata/telegraf/agent/agent.go:66 +0x3bb

goroutine 31 [chan receive]:
github.com/influxdata/telegraf/agent.(*Agent).runOutputs(0xc00000e050, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0xc000154660, 0x0, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:473 +0x2ac
github.com/influxdata/telegraf/agent.(*Agent).Run.func4(0xc0004a19d0, 0xc00000e050, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0xc000154660)
/go/src/github.com/influxdata/telegraf/agent/agent.go:123 +0x84
created by github.com/influxdata/telegraf/agent.(*Agent).Run
/go/src/github.com/influxdata/telegraf/agent/agent.go:120 +0x460

goroutine 32 [select]:
github.com/influxdata/telegraf/agent.(*Agent).flush(0xc00000e050, 0x26571c0, 0xc0004aec80, 0xc0001e6000, 0x2540be400, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:518 +0x19f
github.com/influxdata/telegraf/agent.(*Agent).runOutputs.func1(0xc0004a19e0, 0xc00000e050, 0x26571c0, 0xc0004aec80, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0x2540be400, 0x0, 0xc0001e6000)
/go/src/github.com/influxdata/telegraf/agent/agent.go:469 +0xa3
created by github.com/influxdata/telegraf/agent.(*Agent).runOutputs
/go/src/github.com/influxdata/telegraf/agent/agent.go:458 +0x1b9

goroutine 53 [select]:
github.com/influxdata/telegraf/agent.(*Agent).gatherOnInterval(0xc00000e050, 0x26571c0, 0xc000090740, 0x2665d00, 0xc00000d840, 0xc0004ae4c0, 0x2540be400, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:284 +0x1ce
github.com/influxdata/telegraf/agent.(*Agent).runInputs.func1(0xc000152650, 0xc00000e050, 0x26571c0, 0xc000090740, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0x2540be400, 0x2665d00, 0xc00000d840, ...)
/go/src/github.com/influxdata/telegraf/agent/agent.go:251 +0xc0
created by github.com/influxdata/telegraf/agent.(*Agent).runInputs
/go/src/github.com/influxdata/telegraf/agent/agent.go:240 +0x171

goroutine 54 [select]:
github.com/influxdata/telegraf/agent.(*Agent).gatherOnInterval(0xc00000e050, 0x26571c0, 0xc000090740, 0x2665d00, 0xc00000d860, 0xc0004ae540, 0x2540be400, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:284 +0x1ce
github.com/influxdata/telegraf/agent.(*Agent).runInputs.func1(0xc000152650, 0xc00000e050, 0x26571c0, 0xc000090740, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0x2540be400, 0x2665d00, 0xc00000d860, ...)
/go/src/github.com/influxdata/telegraf/agent/agent.go:251 +0xc0
created by github.com/influxdata/telegraf/agent.(*Agent).runInputs
/go/src/github.com/influxdata/telegraf/agent/agent.go:240 +0x171

goroutine 55 [select]:
github.com/influxdata/telegraf/agent.(*Agent).gatherOnInterval(0xc00000e050, 0x26571c0, 0xc000090740, 0x2665d00, 0xc00000da40, 0xc0004ae5c0, 0x2540be400, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:284 +0x1ce
github.com/influxdata/telegraf/agent.(*Agent).runInputs.func1(0xc000152650, 0xc00000e050, 0x26571c0, 0xc000090740, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0x2540be400, 0x2665d00, 0xc00000da40, ...)
/go/src/github.com/influxdata/telegraf/agent/agent.go:251 +0xc0
created by github.com/influxdata/telegraf/agent.(*Agent).runInputs
/go/src/github.com/influxdata/telegraf/agent/agent.go:240 +0x171

goroutine 56 [select]:
github.com/influxdata/telegraf/agent.(*Agent).gatherOnInterval(0xc00000e050, 0x26571c0, 0xc000090740, 0x2665d00, 0xc00000da60, 0xc0004ae640, 0x2540be400, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:284 +0x1ce
github.com/influxdata/telegraf/agent.(*Agent).runInputs.func1(0xc000152650, 0xc00000e050, 0x26571c0, 0xc000090740, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0x2540be400, 0x2665d00, 0xc00000da60, ...)
/go/src/github.com/influxdata/telegraf/agent/agent.go:251 +0xc0
created by github.com/influxdata/telegraf/agent.(*Agent).runInputs
/go/src/github.com/influxdata/telegraf/agent/agent.go:240 +0x171

goroutine 57 [select]:
github.com/influxdata/telegraf/agent.(*Agent).gatherOnInterval(0xc00000e050, 0x26571c0, 0xc000090740, 0x2665d00, 0xc00000dc20, 0xc0004ae6c0, 0x2540be400, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:284 +0x1ce
github.com/influxdata/telegraf/agent.(*Agent).runInputs.func1(0xc000152650, 0xc00000e050, 0x26571c0, 0xc000090740, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0x2540be400, 0x2665d00, 0xc00000dc20, ...)
/go/src/github.com/influxdata/telegraf/agent/agent.go:251 +0xc0
created by github.com/influxdata/telegraf/agent.(*Agent).runInputs
/go/src/github.com/influxdata/telegraf/agent/agent.go:240 +0x171

goroutine 58 [select]:
github.com/influxdata/telegraf/agent.(*Agent).gatherOnInterval(0xc00000e050, 0x26571c0, 0xc000090740, 0x2665d00, 0xc00000dc40, 0xc0004ae780, 0x2540be400, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:284 +0x1ce
github.com/influxdata/telegraf/agent.(*Agent).runInputs.func1(0xc000152650, 0xc00000e050, 0x26571c0, 0xc000090740, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0x2540be400, 0x2665d00, 0xc00000dc40, ...)
/go/src/github.com/influxdata/telegraf/agent/agent.go:251 +0xc0
created by github.com/influxdata/telegraf/agent.(*Agent).runInputs
/go/src/github.com/influxdata/telegraf/agent/agent.go:240 +0x171

goroutine 59 [select]:
github.com/influxdata/telegraf/agent.(*Agent).gatherOnInterval(0xc00000e050, 0x26571c0, 0xc000090740, 0x2665d00, 0xc00000dd80, 0xc0004ae800, 0x2540be400, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:284 +0x1ce
github.com/influxdata/telegraf/agent.(*Agent).runInputs.func1(0xc000152650, 0xc00000e050, 0x26571c0, 0xc000090740, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0x2540be400, 0x2665d00, 0xc00000dd80, ...)
/go/src/github.com/influxdata/telegraf/agent/agent.go:251 +0xc0
created by github.com/influxdata/telegraf/agent.(*Agent).runInputs
/go/src/github.com/influxdata/telegraf/agent/agent.go:240 +0x171

goroutine 60 [select]:
github.com/influxdata/telegraf/agent.(*Agent).gatherOnInterval(0xc00000e050, 0x26571c0, 0xc000090740, 0x2665d00, 0xc00000dda0, 0xc0004ae880, 0x2540be400, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:284 +0x1ce
github.com/influxdata/telegraf/agent.(*Agent).runInputs.func1(0xc000152650, 0xc00000e050, 0x26571c0, 0xc000090740, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0x2540be400, 0x2665d00, 0xc00000dda0, ...)
/go/src/github.com/influxdata/telegraf/agent/agent.go:251 +0xc0
created by github.com/influxdata/telegraf/agent.(*Agent).runInputs
/go/src/github.com/influxdata/telegraf/agent/agent.go:240 +0x171

goroutine 61 [select]:
github.com/influxdata/telegraf/agent.(*Agent).gatherOnInterval(0xc00000e050, 0x26571c0, 0xc000090740, 0x2665d00, 0xc00000dee0, 0xc0004ae900, 0x2540be400, 0x0)
/go/src/github.com/influxdata/telegraf/agent/agent.go:284 +0x1ce
github.com/influxdata/telegraf/agent.(*Agent).runInputs.func1(0xc000152650, 0xc00000e050, 0x26571c0, 0xc000090740, 0xbf13ff9db353aa35, 0x7627b76, 0x3f252a0, 0x2540be400, 0x2665d00, 0xc00000dee0, ...)
/go/src/github.com/influxdata/telegraf/agent/agent.go:251 +0xc0
created by github.com/influxdata/telegraf/agent.(*Agent).runInputs
/go/src/github.com/influxdata/telegraf/agent/agent.go:240 +0x171

rax 0xca
rbx 0x3f26cc0
rcx 0x460683
rdx 0x0
rdi 0x3f26e00
rsi 0x80
rbp 0x7ffc77160c10
rsp 0x7ffc77160bc8
r8 0x0
r9 0x0
r10 0x0
r11 0x286
r12 0xc
r13 0xff
r14 0x26115d8
r15 0x0
rip 0x460681
rflags 0x286
cs 0x33
fs 0x0
gs 0x0

@danielnelson
Copy link
Contributor

Interesting, do you have read_buffer_size set in your config?

@Ra-fiki
Copy link
Author

Ra-fiki commented Feb 25, 2019

Not anymore ;) at the beggining I had. After error with buffer I commented that.

Did you read that:
*EDIT:
I comment config about buffer and if I start telegraf manualy(in console without command service)
he show info that he is listening on port 8094 xD

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:
root@log:~$ service telegraf start <- not wortking
and
root@log:~$ telegraf <- working

@danielnelson
Copy link
Contributor

@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 telegraf user has read access to the files it should work.

@danielnelson danielnelson self-assigned this Mar 6, 2019
@danielnelson danielnelson added this to the 1.10.1 milestone Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants