You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Konstantin Kolinko (Jira)" <ji...@apache.org> on 2022/12/08 01:27:00 UTC

[jira] [Updated] (DAEMON-445) Changes of DAEMON-441 cause trouble with empty env vars

     [ https://issues.apache.org/jira/browse/DAEMON-445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konstantin Kolinko updated DAEMON-445:
--------------------------------------
    Attachment: 0001-Fix-DAEMON-445.-Fix-processing-of-environment-variab.patch

> Changes of DAEMON-441 cause trouble with empty env vars
> -------------------------------------------------------
>
>                 Key: DAEMON-445
>                 URL: https://issues.apache.org/jira/browse/DAEMON-445
>             Project: Commons Daemon
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>            Reporter: Alexander Fischer
>            Priority: Major
>         Attachments: 0001-Fix-DAEMON-445.-Fix-processing-of-environment-variab.patch
>
>
> The changes done via DAEMON-441, namely [https://github.com/apache/commons-daemon/commit/97b31058ecf5e4dc202188d8e8917f6caa90dcfc#diff-e7f9bbe0d9947378640c1e1c91d8dc72c93e6d1034218458158a1cc43f2f3b9fR278] lead to a failing service installation in case the environment variable exists but has no value. 
> In my use case the supported environment variables are explicitly set empty if defaults shall be used. This is done to avoid interference with environment variables which may be set by the caling process. 
> In such a case example output is:
> {noformat}
> [2022-06-29 11:32:11] [error] [10552] Error getting environment variable PR_LibraryPath
> [2022-06-29 11:32:11] [warn]  [10552] Failed to grant service user '.\user' write permissions to log path 'C:\Windows\system32\LogFiles\Apache' due to error '19: The media is write protected.'
> {noformat}
> while the environment is set
> {noformat}
> PR_DESCRIPTION: tomcat-service description
> PR_DISPLAYNAME: tomcat-service
> PR_INSTALL: C:\apache-tomcat\bin\tomcat9.exe
> PR_SERVICEUSER: .\hidden
> PR_SERVICEPASSWORD: hidden
> PR_STARTUP: auto
> PR_CLASSPATH: C:\apache-tomcat/bin/bootstrap.jar;C:\apache-tomcat/bin/tomcat-juli.jar;
> PR_JAVA_HOME: C:\jdk
> PR_JVM: C:\jdk\bin\server\jvm.dll
> PR_JVMMS: 256
> PR_JVMMX: 3072
> PR_JVMOPTIONS: -Dcatalina.base=C:\tomcat-service;-Dcatalina.home=C:\apache-tomcat;-Djava.io.tmpdir=C:\tomcat-service/temp;
> PR_ENVIRONMENT: PATH='C:\Windows;C:\Windows\System32;C:\Windows\System32\Wbem;C:\apache-tomcat\bin'
> PR_LIBRARYPATH: C:\apache-tomcat/bin
> PR_STARTCLASS: org.apache.catalina.startup.Bootstrap
> PR_STARTMETHOD: 
> PR_STARTPARAMS: start
> PR_STARTMODE: jvm
> PR_STARTPATH: C:\tomcat-service
> PR_STOPCLASS: org.apache.catalina.startup.Bootstrap
> PR_STOPMETHOD: 
> PR_STOPPARAMS: stop
> PR_STOPMODE: jvm
> PR_STOPPATH: C:\tomcat-service
> PR_STOPTIMEOUT: 60
> PR_LOGJNIMESSAGES: 0
> PR_LOGLEVEL: Info
> PR_LOGPATH: C:\Logs\tomcat-service
> PR_LOGPREFIX: tomcat-service
> PR_STDERROR: auto
> PR_STDOUTPUT: auto
> PR_DEPENDSON: postgresql-x64-11;
> {noformat}
> Means, the environment variables PR_STOPMETHOD, PR_LIBRARYPATH and PR_STARTMETHOD are defined but empty.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)