Can't start kapacitor

I try to install kapacitor , after follow instruction try to run below commands, but error appear:

kapacitor  -config  -skipVerify

flag provided but not defined: -config
Usage of main:
        Disable SSL verification (note, this is insecure). Defaults to the KAPACITOR_UNSAFE_SSL environment variable or false if not set.
  -url string
        The URL http(s)://host:port of the kapacitord server. Defaults to the KAPACITOR_URL environment variable or http://localhost:9092 if not set.

also try this one:

/usr/bin/kapacitord -config /etc/kapacitor/kapacitor.conf

lvl=error msg="failed to connect to InfluxDB, retrying..." service=influxdb cluster=default err="Get http://localhost:8086/ping: net/http: HTTP/1.x transport connection broken: malformed HTTP response \"\\x15\\x03\\x01\\x00\\x02\\x02\""

config file same as this

Any idea?


Hi ,

I assume Influxdb is up and running ? :slight_smile:

If you can get Kapacitor started you might get no data because the subscription-mode =“cluster” in your config file … as described here :

The cluster subscription-mode is planned for future versions of Kapacitor and Kapacitor Enterprise. If used currently, subscription data will not be received

best regards

Yes influxdb, telegraf and cholonograf already installed and running.

I don’t use cluster mode and all subscriptions are disabled.

Any other idea?

can you try : /usr/bin/kapacitord ( without any arguments )
do you have more info in /var/log/kapacitor/kapacitor.log ?

yes without arguments produce same result!

more info in log file
lvl=info msg=“go version” service=run version=go1.10.2
lvl=info msg=“listing Kapacitor hostname” source=srv hostname=localhost
lvl=info msg=“listing ClusterID and ServerID” source=srv cluster_id=760c2d
lvl=info msg=“opened task master” service=kapacitor task_master=main
lvl=error msg=“encountered error” service=run err=“open server: open service *influxdb.Service: failed to link subscription on startup: canceled”

Can you show the output of
show subscriptions

These may help also :

here is subscriptions section of my config file:

disable-subscriptions = false
subscription-protocol = “http”
subscription-mode = “cluster”
kapacitor-hostname = “”

Thanks ,
Can you also logon to Influxdb and execute the command :
show subscriptions

here it is:
[root@vinfluxdb kapacitor]# influx -ssl -unsafeSsl
Connected to https://localhost:8086 version 1.4.2
InfluxDB shell version: 1.4.2

show subscriptions
name: my_db
retention_policy name                                           mode destinations
---------------- ----                                           ---- ------------
autogen          kapacitor-9332c ANY  				[http://localhost:9092]

name: telegraf
retention_policy name                                           mode destinations
---------------- ----                                           ---- ------------
autogen          kapacitor-9332c ANY  				[http://localhost:9092]

name: alert
retention_policy name                  				mode destinations
---------------- ----                                           ---- ------------
autogen          kapacitor-9332c ANY  				[http://localhost:9092]

getting close -)
Looks that you have secured the influx database …

I guess the mode destination should show https in the show subscriptions output …
You may have to change some configuration in the kapacitor.conf file …
for example : subscription-protocol = “https”

Please check out following document …

best regards ,

Are you using a self signed certificate? the malformed http response looks similar to one i’ve had in the past regarding self signed certificates. If so, you need to tell Kapacitor to skip verifying the SSL certificate and also update the URL. As in, change it from http://hostname:8086 to https

  # Connect to an InfluxDB cluster
  # Kapacitor can subscribe, query and write to this cluster.
  # Using InfluxDB is not required and can be disabled.
  enabled = true
  default = true
  name = "localhost"
  urls = ["https://localhost:8086"]
  username = ""
  password = ""
  timeout = 0
  # Absolute path to pem encoded CA file.
  # A CA can be provided without a key/cert pair
  #   ssl-ca = "/etc/kapacitor/ca.pem"
  # Absolutes paths to pem encoded key and cert files.
  #   ssl-cert = "/etc/kapacitor/cert.pem"
  #   ssl-key = "/etc/kapacitor/key.pem"

  # Do not verify the TLS/SSL certificate.
  # This is insecure.
insecure-skip-verify = true

Changing the HTTP sections in Kapacitor config (near the top) won’t help. I’ve been there and tried.

I know that it is very late to answer :slight_smile: But for others like me - try to disable system proxy (check by env command).