influxdata / influxdata/influxdb

too many "error opening new segment file for wal (1)"

Open
#19,620 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

too many errors occured, as the following messages, but my server is OK, and there is a lot available disk space, and all is ok when I restart the influxdb server.

#### influxdb error message:

```
Sep 23 16:01:28 db influxd: ts=2020-09-23T08:01:28.112100Z lvl=info msg="Cache snapshot (start)" log_id=0OqBs5P0000 engine=tsm1 trace_id=0PQVYlC0000 op_name=tsm1_cache_snapshot op_event=start
Sep 23 16:01:28 db influxd: ts=2020-09-23T08:01:28.112156Z lvl=info msg="Cache snapshot (end)" log_id=0OqBs5P0000 engine=tsm1 trace_id=0PQVYlC0000 op_name=tsm1_cache_snapshot op_event=end op_elapsed=0.069ms
Sep 23 16:01:28 db influxd: ts=2020-09-23T08:01:28.112197Z lvl=info msg="Error writing snapshot" log_id=0OqBs5P0000 engine=tsm1 error="error opening new segment file for wal (1): write /data/influxdb/wal/dbmonitor/autogen/1467/_02247.wa
l: bad address"
```

and this error is from function [CloseSegment](https://github.com/influxdata/influxdb/blob/50237d97ad54efbe1ae49b579e46d66d5c0fac7f/tsdb/engine/tsm1/wal.go#L480)

#### telegraf error message:

```
2020-09-23T08:01:00Z E! [outputs.influxdb] when writing to [http://127.0.0.1:8086]: 500 Internal Server Error: engine: error writing WAL entry: write /data/influxdb/wal/dbmonitor/autogen/1467/_02247.wal: bad address
2020-09-23T08:01:00Z E! [agent] Error writing to output [influxdb]: could not write any address
```

#### influxdb server environment:

```
Centos 7
kernel-3.10.0-862.14.4.el7.x86_64
influxdb-1.7.4-1.x86_64
telegraf-1.10.3-1.x86_64

# disk space
$ df -hl
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 100G 7.9G 93G 8% /
......
datapool/db 472G 210G 262G 45% /data
```

Contributor guide

Open the contributing guide

Research direction

Start with CloseSegment in tsdb/engine/tsm1/wal.go and review the reported WAL snapshot and write errors, including the server environment and available disk space. Determine why the WAL receives a “bad address” error and define completion as identifying a reproducible cause and an appropriate fix or diagnostic guidance.

Written by the indexing model from the issue text.

Assessment

Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.