You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Starting a container with image tag 4-bullseye and env variables FHEM_UID and FHEM_GID set to a non-default value, FHEM gives the following error message: Messages collected while initializing FHEM:configfile: logfile is readonly, it is set in the FHEM_GLOBALATTR environment
However, the logfile is writeable without any problems. Also, all permissions get set correctly (i.e. entry.sh is doing its job correctly).
To Reproduce
Steps to reproduce the behavior:
Set FHEM_UID and FHEM_GID to some non-default value
Start container
Observe reading init_errors in device global
Observe logfile and notice it is being written to despite the error message
Change to 3-bullseye and observe that error message vanishes
Expected behavior
No error message
Additional context
Another user reported that they also get an error message for the PID file. This first occurred after switching from 3-bullseye to 4-bullseye.
See here (also see following forum posts for additional context).
Also, I am not sure if this is an issue within fhem.pl or with the container environment, however, given that the issue was not present in 3-bullseye I am assuming it is an issue with the code in this repo, rather than FHEM itself.
For the sake of completeness, here is the content of /proc/$PID/environ: SHELL=/bin/bashFHEM_GLOBALATTR=nofork=0 updateInBackground=1 logfile=log/fhem-%Y-%m-%d.log pidfilename=log/fhem.pidHOSTNAME=ha_fhemtestLANGUAGE=en_US:enPERL_JSON_BACKEND=Cpanel::JSON::XS,JSON::XS,JSON::PP,JSON::backportPPLC_ADDRESS=de_DE.UTF-8LC_NAME=de_DE.UTF-8LC_MONETARY=de_DE.UTF-8UMASK=0037PWD=/opt/fhemLOGNAME=fhemTZ=Europe/BerlinLOGFILE=/opt/fhem/log/fhem-%Y-%m-%d.logHOME=/opt/fhemFHEM_UID=7073LANG=en_US.UTF-8LC_PAPER=de_DE.UTF-8PERL5LIB=/usr/src/app/core/lib/perl5:/usr/src/app/3rdparty/lib/perl5GPIO_GID=6002FHEM_GID=7067TERM=xtermUSER=fhemCONFIGTYPE=fhem.cfgDOCKER_GW=172.21.0.1I2C_GID=6003TIMEOUT=10SHLVL=1LC_TELEPHONE=de_DE.UTF-8LC_MESSAGES=en_DK.UTF-8LC_MEASUREMENT=de_DE.UTF-8FHEM_PERM_FILE=0640LC_TIME=de_DE.UTF-8DOCKER_HOST=172.21.0.1PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binTELNETPORT=7072DOCKER_HOSTNETWORK=0MAIL=/var/mail/fhemFHEM_PERM_DIR=0750BLUETOOTH_GID=6001LC_NUMERIC=de_DE.UTF-8DOCKER_PRIVILEGED=1OLDPWD=/opt/fhem_=/usr/local/bin/perlroot
The text was updated successfully, but these errors were encountered:
Because if a attribute is defined via an environment variable you can't overwrite it from the fhem itself, it must be changed via the environment variable which is controlled by the container.
Oh. So "readonly" means that the attribute logfile is readonly? Not the logfile itself? Ok. Maybe that message should be clarified then (but not an issue for this repo, of course).
But that still doesn't explain why this only happens when UID/GID is changed to non-default …
Describe the bug
Starting a container with image tag
4-bullseye
and env variablesFHEM_UID
andFHEM_GID
set to a non-default value, FHEM gives the following error message:Messages collected while initializing FHEM:configfile: logfile is readonly, it is set in the FHEM_GLOBALATTR environment
However, the logfile is writeable without any problems. Also, all permissions get set correctly (i.e.
entry.sh
is doing its job correctly).To Reproduce
Steps to reproduce the behavior:
FHEM_UID
andFHEM_GID
to some non-default valueinit_errors
in deviceglobal
Expected behavior
No error message
Additional context
Another user reported that they also get an error message for the PID file. This first occurred after switching from
3-bullseye
to4-bullseye
.See here (also see following forum posts for additional context).
Also, I am not sure if this is an issue within fhem.pl or with the container environment, however, given that the issue was not present in
3-bullseye
I am assuming it is an issue with the code in this repo, rather than FHEM itself.For the sake of completeness, here is the content of
/proc/$PID/environ
:SHELL=/bin/bashFHEM_GLOBALATTR=nofork=0 updateInBackground=1 logfile=log/fhem-%Y-%m-%d.log pidfilename=log/fhem.pidHOSTNAME=ha_fhemtestLANGUAGE=en_US:enPERL_JSON_BACKEND=Cpanel::JSON::XS,JSON::XS,JSON::PP,JSON::backportPPLC_ADDRESS=de_DE.UTF-8LC_NAME=de_DE.UTF-8LC_MONETARY=de_DE.UTF-8UMASK=0037PWD=/opt/fhemLOGNAME=fhemTZ=Europe/BerlinLOGFILE=/opt/fhem/log/fhem-%Y-%m-%d.logHOME=/opt/fhemFHEM_UID=7073LANG=en_US.UTF-8LC_PAPER=de_DE.UTF-8PERL5LIB=/usr/src/app/core/lib/perl5:/usr/src/app/3rdparty/lib/perl5GPIO_GID=6002FHEM_GID=7067TERM=xtermUSER=fhemCONFIGTYPE=fhem.cfgDOCKER_GW=172.21.0.1I2C_GID=6003TIMEOUT=10SHLVL=1LC_TELEPHONE=de_DE.UTF-8LC_MESSAGES=en_DK.UTF-8LC_MEASUREMENT=de_DE.UTF-8FHEM_PERM_FILE=0640LC_TIME=de_DE.UTF-8DOCKER_HOST=172.21.0.1PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binTELNETPORT=7072DOCKER_HOSTNETWORK=0MAIL=/var/mail/fhemFHEM_PERM_DIR=0750BLUETOOTH_GID=6001LC_NUMERIC=de_DE.UTF-8DOCKER_PRIVILEGED=1OLDPWD=/opt/fhem_=/usr/local/bin/perlroot
The text was updated successfully, but these errors were encountered: