Prezados,
Estou precisando de ajuda com 2 containers. Já acrescentei o usuário root no yaml do prometheus, conforme dica do post anterior, mas ele continua restartando. O Container do app-forum-api também aparece como unhealthy
O Log do container prometheus-forum-api é seguinte:
manzutti@vboxlinux:/mnt/GitHub/prometheus-grafana$ sudo docker logs -f prometheus-forum-api
ts=2023-06-03T03:54:59.856Z caller=main.go:531 level=info msg="No time or size retention was set so using the default time retention" duration=15d
ts=2023-06-03T03:54:59.857Z caller=main.go:575 level=info msg="Starting Prometheus Server" mode=server version="(version=2.44.0, branch=HEAD, revision=1ac5131f698ebc60f13fe2727f89b115a41f6558)"
ts=2023-06-03T03:54:59.857Z caller=main.go:580 level=info build_context="(go=go1.20.4, platform=linux/amd64, user=root@739e8181c5db, date=20230514-06:18:11, tags=netgo,builtinassets,stringlabels)"
ts=2023-06-03T03:54:59.857Z caller=main.go:581 level=info host_details="(Linux 5.15.0-73-generic #80-Ubuntu SMP Mon May 15 15:18:26 UTC 2023 x86_64 70ca55254444 (none))"
ts=2023-06-03T03:54:59.857Z caller=main.go:582 level=info fd_limits="(soft=1048576, hard=1048576)"
ts=2023-06-03T03:54:59.857Z caller=main.go:583 level=info vm_limits="(soft=unlimited, hard=unlimited)"
ts=2023-06-03T03:54:59.870Z caller=web.go:562 level=info component=web msg="Start listening for connections" address=0.0.0.0:9090
ts=2023-06-03T03:54:59.872Z caller=tls_config.go:232 level=info component=web msg="Listening on" address=[::]:9090
ts=2023-06-03T03:54:59.872Z caller=tls_config.go:235 level=info component=web msg="TLS is disabled." http2=false address=[::]:9090
ts=2023-06-03T03:54:59.872Z caller=main.go:1016 level=info msg="Starting TSDB ..."
ts=2023-06-03T03:54:59.956Z caller=dir_locker.go:77 level=warn component=tsdb msg="A lockfile from a previous execution already existed. It was replaced" file=/prometheus/lock
ts=2023-06-03T03:54:59.996Z caller=head.go:588 level=info component=tsdb msg="Replaying on-disk memory mappable chunks if any"
ts=2023-06-03T03:54:59.997Z caller=head.go:669 level=info component=tsdb msg="On-disk memory mappable chunks replay completed" duration=2.816µs
ts=2023-06-03T03:54:59.997Z caller=head.go:677 level=info component=tsdb msg="Replaying WAL, this may take a while"
ts=2023-06-03T03:55:00.021Z caller=head.go:748 level=info component=tsdb msg="WAL segment loaded" segment=0 maxSegment=133
ts=2023-06-03T03:55:00.031Z caller=head.go:748 level=info component=tsdb msg="WAL segment loaded" segment=1 maxSegment=133
ts=2023-06-03T03:55:00.033Z caller=head.go:748 level=info component=tsdb msg="WAL segment loaded" segment=2 maxSegment=133
panic: sync directory: sync /prometheus/chunks_head: invalid argument
goroutine 436 [running]:
github.com/prometheus/prometheus/tsdb.handleChunkWriteError({0x3c7f680?, 0xc00089a8a0?})
/app/tsdb/head_append.go:1485 +0x76
github.com/prometheus/prometheus/tsdb/chunks.(*ChunkDiskMapper).WriteChunk(0xc0007e20f0, 0x416ceb?, 0x162900000566be98?, 0x33192979323355?, {0x3ca7ea8, 0xc000438020}, 0x20?, 0x37fbea0)
/app/tsdb/chunks/head_chunks.go:438 +0x162
github.com/prometheus/prometheus/tsdb.(*memSeries).mmapCurrentHeadChunk(0xc00079a0b0, 0xc000073400?)
/app/tsdb/head_append.go:1474 +0x7f
github.com/prometheus/prometheus/tsdb.(*memSeries).cutNewHeadChunk(0xc00079a0b0, 0x1887efd45a4, 0x1, 0xc0007a06a8?, 0x6ddd00)
/app/tsdb/head_append.go:1408 +0x33
github.com/prometheus/prometheus/tsdb.(*memSeries).appendPreprocessor(0xc00079a0b0, 0x1887efd45a4, 0x1, 0xc0007a0588?, 0x6ddd00)
/app/tsdb/head_append.go:1385 +0x20a
github.com/prometheus/prometheus/tsdb.(*memSeries).append(0xc00079a0b0, 0x1887efd45a4, 0x0, 0x0, 0x0?, 0x1a00?)
/app/tsdb/head_append.go:1122 +0x3a
github.com/prometheus/prometheus/tsdb.(*walSubsetProcessor).processWALSamples(0xc000c56288, 0xc0007fc000, 0x0?, 0x0?)
/app/tsdb/head_wal.go:591 +0x435
github.com/prometheus/prometheus/tsdb.(*Head).loadWAL.func2(0x0?)
/app/tsdb/head_wal.go:106 +0x4d