influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

panic: close of closed channel

Open sjimenezbenito opened this issue 10 years ago • 11 comments

I have a Windows Service reading data from some sensors every second, aggregating this data every ten minutes and inserting it on InfluxDB.

InfluxDB_crash_20151230.txt

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.

sjimenezbenito avatar Dec 30 '15 09:12 sjimenezbenito

@ikrush Was the server under query load at the time of the crash? What was the volume of write load?

jackzampolin avatar Dec 30 '15 17:12 jackzampolin

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.

sjimenezbenito avatar Dec 30 '15 17:12 sjimenezbenito

I got the same error today.

InfluxDB_crash_20151231.txt

sjimenezbenito avatar Dec 31 '15 08:12 sjimenezbenito

https://github.com/influxdb/influxdb/pull/5265 may address this issue.

otoolep avatar Jan 04 '16 18:01 otoolep

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.

rossmcdonald avatar Jan 25 '16 23:01 rossmcdonald

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 avatar Feb 08 '16 11:02 markusr

@markusr Thanks, could you send us the logs as well?

rossmcdonald avatar Feb 08 '16 14:02 rossmcdonald

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 avatar Feb 08 '16 15:02 markusr

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

rossmcdonald avatar Feb 11 '16 19:02 rossmcdonald

I just want to add that this bug did not run occur again. So from my side the issue can be closed.

markusr avatar Feb 12 '16 10:02 markusr

@markusr Thanks for the update. Closing as a permissions issue for now.

rossmcdonald avatar Feb 12 '16 13:02 rossmcdonald