panic: close of closed channel
I have a Windows Service reading data from some sensors every second, aggregating this data every ten minutes and inserting it on InfluxDB.
It's a single node instance of InfluxDB v.0.9.6.1 (tsm1) compiled with Go v.1.4.3 running on a machine with Windows Server 2012 R2 and 32GB of RAM.
@ikrush Was the server under query load at the time of the crash? What was the volume of write load?
I was inserting about 10.000 points every 5 seconds. I was inserting new points with the service, there was no queries running on the server at that time.
https://github.com/influxdb/influxdb/pull/5265 may address this issue.
As referenced from #5433, removing Windows from the title as this affects Linux as well. This issue also seems to occur with the 0.10.0 beta releases, and is not 0.9.6 specific.
I have the same problem under Ubuntu 14.04.
My influx version is:
version 0.10.0, branch 0.10.0, commit b8bb32ecad9808ef00219e7d2469514890a0987a, built 2016-02-04T17:06:04.850564
I can provide a log file if needed.
@markusr Thanks, could you send us the logs as well?
I think I hit another bug / problem. After going through the log file I found:
[retention] 2016/02/08 13:01:17 retention policy shard deletion check commencing
[retention] 2016/02/08 13:01:18 failed to delete shard ID 556 from database _internal, retention policy monitor: remove /var/lib/influxdb/data/_internal/monitor/556/000000001-000000001.tsm: permission denied
I converted the shards yesterday from v0.9 format to the new tsm. I could resolve the panic by running:
sudo chown influxdb:influxdb -R /var/lib/influxdb/data
Here is however the full log: influxd_2016-02-08.txt
Now the system is running fine. I'll report if the error occurs again.
@markusr Thank you for the update. I ran into this issue as well, which ended up being a permissions issue.
@ikrush Looking at the pasted logs from before I found:
[retention] 2016/01/23 08:06:41 failed to delete shard ID 42 from database _internal, retention policy monitor: remove /var/lib/influxdb/data/_internal/monitor/42/000000001-000000001.tsm: permission denied
So this may just be a permissions issue.
I just want to add that this bug did not run occur again. So from my side the issue can be closed.
@markusr Thanks for the update. Closing as a permissions issue for now.