invalid memory address or nil pointer dereference
mweinelt opened this issue · comments
Happened directly at startup:
Sep 08 10:05:45 elsa systemd[1]: Started CptHook Webhook Gateway.
Sep 08 10:05:45 elsa CptHook[24920]: 2018/09/08 10:05:45 Status module disabled of not configured
Sep 08 10:05:45 elsa CptHook[24920]: 2018/09/08 10:05:45 Prometheus module is active
Sep 08 10:05:45 elsa CptHook[24920]: 2018/09/08 10:05:45 ChannelReceiver started
Sep 08 10:05:46 elsa CptHook[24920]: 2018/09/08 10:05:46 Got http event for /prometheus
Sep 08 10:05:46 elsa CptHook[24920]: Took IRC event out of channel.
Sep 08 10:05:46 elsa CptHook[24920]: Need to join new channel #ffda-mon
Sep 08 10:05:46 elsa CptHook[24920]: panic: runtime error: invalid memory address or nil pointer dereference
Sep 08 10:05:46 elsa systemd[1]: cpthook.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Sep 08 10:05:46 elsa systemd[1]: cpthook.service: Unit entered failed state.
Sep 08 10:05:46 elsa systemd[1]: cpthook.service: Failed with result 'exit-code'.
Config for reference:
http:
listen: ":8086"
irc:
host: "irc.hackint.eu"
port: 6697
ssl:
enabled: true
cafile: "/etc/ssl/certs/hackint.crt"
nickname: "ffda-prom"
modules:
status:
enabled: false
prometheus:
enabled: true
channel: "#ffda-mon"
hostname_filter: "(\\w*)\\.darmstadt.freifunk.net:\\d{4}"
gitlab:
enabled: false
So likely it's in the irc or prometheus module.
This is fixed in v0.3.0