forked from zentures/sequence
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Database creation fails with an error message:
root@cent:/etc/syslog-ng/conf.d# sequence createdatabase -l /dev/stderr -n info --conn sequence.sdb --type sqlite3
{"id":100,"level":"info","msg":"Starting up: method called createdatabase","time":"2021-09-16T19:38:00+02:00","version":"beta"}
{"id":400,"level":"fatal","msg":"Fatal error occurred, reason: open ./sequence.toml: no such file or directory","time":"2021-09-16T19:38:00+02:00","version":"beta"}
root@cent:/etc/syslog-ng/conf.d# ls -la
total 12
drwxr-xr-x 2 root root 4096 Sep 16 19:37 .
drwxr-xr-x 4 root root 4096 Jul 18 20:48 ..
-rw-r--r-- 1 root root 779 Sep 16 18:01 seq.conf
root@cent:/etc/syslog-ng/conf.d# sequence createdatabase -l /dev/stderr --config /etc/sequence/sequence.toml -n info --conn sequence.sdb --type sqlite3
{"id":100,"level":"info","msg":"Starting up: method called createdatabase","time":"2021-09-16T19:38:18+02:00","version":"beta"}
{"id":100,"level":"info","msg":"Warning: The following flags are assigned values but are not used by the createdatabase function: threshold value (-v), ","time":"2021-09-16T19:38:18+02:00","version":"beta"}
Warning: The following flags are assigned values but are not used by the createdatabase function: threshold value (-v),
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4ff247]
goroutine 1 [running]:
bufio.(*Scanner).Scan(0x0, 0x9a5b18)
/usr/lib/go-1.11/src/bufio/scan.go:135 +0x37
gitlab.in2p3.fr/cc-in2p3-system/sequence.CreateDatabase(0x7ffcff90d895, 0xc, 0x7ffcff90d8a9, 0x7, 0x0, 0x0, 0x0, 0x0)
/root/sequence/databasehandler.go:33 +0x4a3
main.createdatabase(0xc000120f00, 0xc0001583c0, 0x0, 0xa)
/root/sequence/cmd/sequence_db/sequence_db_main.go:131 +0x9e
github.com/spf13/cobra.(*Command).execute(0xc000120f00, 0xc000158280, 0xa, 0xa, 0xc000120f00, 0xc000158280)
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:830 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0xc000120a00, 0x8, 0x0, 0xc000121900)
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:914 +0x2f8
github.com/spf13/cobra.(*Command).Execute(0xc000120a00, 0xc0000d1f58, 0x1)
/root/go/pkg/mod/github.com/spf13/[email protected]/command.go:864 +0x2b
main.main()
/root/sequence/cmd/sequence_db/sequence_db_main.go:813 +0xc6b
workaround: I ran the database creation command in the sequencer source tree, where it also gave the same error, but actually created a working database file. Then copied the file to the location specified in sequence.toml and it worked properly.
Metadata
Metadata
Assignees
Labels
No labels