Altinity / clicktail

Apache License 2.0
283 stars 57 forks source link

Service not starting after reboot #12

Open ghost opened 4 years ago

ghost commented 4 years ago

I've installed clicktail on Ubuntu 18.04 with forcing os=ubuntu dist=xenial because there is no package for bionic and everything works fine when manually starting the service with service clicktail start. I've enabled autostart of the service with systemctl enable clicktail, and on status it says it is enabled but when I reboot the server the status is:

● clicktail.service - ClickHouse log tailer clicktail by Altinity
   Loaded: loaded (/lib/systemd/system/clicktail.service; enabled; vendor preset: enabled)
   Active: inactive (dead)

So, the service is not loading on startup. When I see the logs: journalctl -u clicktail -f I get:

-- Logs begin at Mon 2020-03-09 08:46:19 UTC. --
Sep 29 08:17:35 mysql clicktail[2032]: time="2020-09-29T08:17:35Z" level=info msg="Summary of sent events" avg_duration=4.649744ms count=20 count_per_status=map[0:20] errors=map[EOF:20] fastest=1.175617ms lifetime_count=324 response_bodies=map[:20] slowest=10.036351ms
Sep 29 08:17:35 mysql clicktail[2032]: time="2020-09-29T08:17:35Z" level=info msg="Last parsed event" event=map[name:Connect connection_id:192 os_login: host: ip:127.0.0.1 record:93942595_2020-09-29T07:58:24 status:0 user:perica priv_user:perica proxy_user: db:] event_timestamp=2020-09-29 08:17:24 +0000 UTC
Sep 29 08:18:04 mysql clicktail[2032]: Aborting! Caught signal "terminated"
Sep 29 08:18:04 mysql clicktail[2032]: Cleaning up...
Sep 29 08:18:04 mysql clicktail[2032]: time="2020-09-29T08:18:04Z" level=info msg="Summary of sent events" avg_duration=58.286373ms count=10 count_per_status=map[0:10] errors=map[EOF:10] fastest=7.790836ms lifetime_count=334 response_bodies=map[:10] slowest=146.346937ms
Sep 29 08:18:04 mysql clicktail[2032]: time="2020-09-29T08:18:04Z" level=info msg="Last parsed event" event=map[connection_id:190 status:0 user:perica priv_user:perica os_login: name:Quit record:93942605_2020-09-29T07:58:24 ip:127.0.0.1 db: proxy_user: host:] event_timestamp=2020-09-29 08:18:04 +0000 UTC
Sep 29 08:18:04 mysql clicktail[2032]: time="2020-09-29T08:18:04Z" level=info msg="Total number of events sent" number sent by response status code=map[0:334] total attempted sends=334
Sep 29 08:18:04 mysql clicktail[2032]: time="2020-09-29T08:18:04Z" level=info msg="Clicktail is all done, goodbye!"
Sep 29 08:18:04 mysql systemd[1]: Stopping ClickHouse log tailer clicktail by Altinity...
Sep 29 08:18:04 mysql systemd[1]: Stopped ClickHouse log tailer clicktail by Altinity.

So, it start and than it catches a signal to terminate ? Please resolve this and make packages for ubuntu 18.04 and 20.04.