w3c / automotive-viss2

MIT License
9 stars 15 forks source link

VISS server exited during docker start up #118

Closed renjithrajagopal-sudo closed 7 months ago

renjithrajagopal-sudo commented 7 months ago

Version : Master branch #117

Steps followed

  1. Fetch latest master
  2. Feeder configured for RemotiveLabs broker
  3. Docker build
  4. Docker run

Observation VISS server exited immediately.

Analysis Error seems in following line vissv2server.go

historySupport := parser.Flag("s", "history", &argparse.Options{Required: false, Help: "Support for historic data requests", Default: false})

Fixing above results in crash of VISS server due to Redis start up failure.


Traces

docker compose -f docker-compose-rl.yml up [+] Running 4/0 ✔ Container container_volumes Created 0.0s ✔ Container vissv2server Created 0.0s ✔ Container app_redis Created 0.0s ✔ Container feeder-rl Created 0.0s Attaching to app_redis, container_volumes, feeder-rl, vissv2server container_volumes exited with code 0 app_redis | 1:C 26 Feb 2024 14:56:38.320 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. app_redis | 1:C 26 Feb 2024 14:56:38.320 oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo app_redis | 1:C 26 Feb 2024 14:56:38.320 Redis version=7.2.3, bits=64, commit=00000000, modified=0, pid=1, just started app_redis | 1:C 26 Feb 2024 14:56:38.320 Configuration loaded app_redis | 1:M 26 Feb 2024 14:56:38.321 monotonic clock: POSIX clock_gettime app_redis | 1:M 26 Feb 2024 14:56:38.321 # Failed to write PID file: Permission denied app_redis | 1:M 26 Feb 2024 14:56:38.321 Running mode=standalone, port=0. app_redis | 1:M 26 Feb 2024 14:56:38.321 Server initialized app_redis | 1:M 26 Feb 2024 14:56:38.321 . The AOF directory appendonlydir doesn't exist app_redis | 1:M 26 Feb 2024 14:56:38.321 Loading RDB produced by version 7.2.3 app_redis | 1:M 26 Feb 2024 14:56:38.321 RDB age 49 seconds app_redis | 1:M 26 Feb 2024 14:56:38.321 RDB memory usage when created 0.83 Mb app_redis | 1:M 26 Feb 2024 14:56:38.321 Done loading RDB, keys loaded: 0, keys expired: 0. app_redis | 1:M 26 Feb 2024 14:56:38.321 DB loaded from disk: 0.000 seconds app_redis | 1:M 26 Feb 2024 14:56:38.321 Ready to accept connections unix app_redis | 1:M 26 Feb 2024 14:56:38.322 . 0 clients connected (0 replicas), 866064 bytes in use feeder-rl | {"file":"feeder-rl.go:381","level":"info","msg":"db path is=/tmp/docker/redisDB.sock","time":"2024-02-26T14:56:38Z"} feeder-rl | {"file":"feeder-rl.go:384","level":"info","msg":"file not created error=open /tmp/docker/server-feeder-channel.sock: no such device or address","time":"2024-02-26T14:56:38Z"} feeder-rl | time="2024-02-26T14:56:38Z" level=info msg="gRPC tls file cert /etc/ssl/certs/ca-certificates.crt" vissv2server | panic: unable to add Flag: short name s occurs more than once vissv2server | vissv2server | goroutine 1 [running]: vissv2server | github.com/akamensky/argparse.(*Command).Flag(0xc59f38?, {0xd4ab88, 0x1}, {0xc5bec6, 0x7}, 0xc000040dc0) vissv2server | /go/pkg/mod/github.com/akamensky/argparse@v1.4.0/argparse.go:220 +0x17a vissv2server | main.main() vissv2server | /build/server/vissv2server/vissv2server.go:797 +0x38c vissv2server exited with code 2

UlfBj commented 7 months ago

Fixed in PR#119