thingsboard / thingsboard-ce-k8s

ThingsBoard Community Edition Kubernetes scripts and docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tb-mqtt-transport 3.44 - pod startup failed: tb-mqtt-transport-0-gc.log: Permission denied

stefan-bergstein opened this issue · comments

Starting 'ThingsBoard MQTT Transport Microservice' ...
[0.001s][error][logging] Error opening log file '/var/log/tb-mqtt-transport/tb-mqtt-transport-0-gc.log': Permission denied
[0.001s][error][logging] Initialization of output 'file=/var/log/tb-mqtt-transport/tb-mqtt-transport-0-gc.log' using options 'filecount=10,filesize=10M' failed.
Invalid -Xlog option '-Xlog:gc*,heap*,age*,safepoint=debug:file=/var/log/tb-mqtt-transport/tb-mqtt-transport-0-gc.log:time,uptime,level,tags:filecount=10,filesize=10M', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Environment: OpenShift Local (CRC) 4.11

Workaround:
Change log directory to /tmp in tb-transport-configmap.yml

export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=/tmp/${TB_SERVICE_ID}-gc.log:time,uptime,level,tags:filecount=10,filesize=10M"