openshift-liberty: драйверы jdbc не загружаются - PullRequest
0 голосов
/ 10 октября 2018

Сервер Websphere Liberty, работающий в openshift, получает ошибку ниже при запуске.Поскольку рабочая область в свободе создается во время запуска, как мы можем предоставить ч / б доступ к тому же

JVMSHRC155E Error copying username into cache name
JVMSHRC686I Failed to startup shared class cache. Continue without using it as -Xshareclasses:nonfatal is specified
Launching defaultServer (WebSphere Application Server 18.0.0.2/wlp-1.0.21.cl180220180619-0403) on IBM J9 VM, version 8.0.5.21 - pxa6480sr5fp21-20180830_01(SR5 FP21) (en_US)
[AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT   ] CWWKG0028A: Processing included configuration resource: /config/project/server.xml
****[ERROR   ] CWWKG0074E: Unable to update the configuration for webApplication with the unique identifier null because of the exception: /opt/ibm/wlp/output/defaultServer/workarea/org.eclipse.osgi/10/data/configs/webApplication!-908507812 (Permission denied)**.**
[WARNING ] CWWKG0076W: The previous configuration for webApplication with id null is still in use.
**[ERROR   ] CWWKG0074E: Unable to update the configuration for applicationMonitor with the unique identifier null because of the exception: /opt/ibm/wlp/output/defaultServer/workarea/org.eclipse.osgi/10/data/configs/applicationMonitor!1812182506 (Permission denied).**
[WARNING ] CWWKG0076W: The previous configuration for applicationMonitor with id null is still in use.
**[ERROR   ] CWWKG0074E: Unable to update the configuration for dataSource with the unique identifier null because of the exception: /opt/ibm/wlp/output/defaultServer/workarea/org.eclipse.osgi/10/data/configs/dataSource!1272470629 (Permission denied).**
[WARNING ] CWWKG0076W: The previous configuration for dataSource with id null is still in use.
**[ERROR   ] CWWKG0074E: Unable to update the configuration for jdbcDriver with the unique identifier DB2 because of the exception: /opt/ibm/wlp/output/defaultServer/workarea/org.eclipse.osgi/10/data/configs/jdbcDriver_2!329917942 (Permission denied).**

Server.xml

<jdbcDriver id="DB2">
    <library name="DB2JCC4Lib">
        <fileset dir="${wlp.user.dir}/shared/resources" includes="db2jcc4.jar db2jcc_license_cisuz.jar" />
    </library>
</jdbcDriver>

<dataSource jdbcDriverRef="DB2" jndiName="jdbc/abcdDB2DataSource">
    <connectionManager maxPoolSize="25" minPoolSize="0" agedTimeout="21600s" connectionTimeout="180s" reapTime="180s" maxIdleTime="1800s"/>
    <properties.db2.jcc databaseName="${env.DB_MF_DATABASENAME}" password="${env.DB_MF_PWD}" portNumber="${env.DB_MF_PORT}" serverName="${env.DB_MF_URL}" user="${env.DB_MF_USERID}" sslConnection="true"/>
</dataSource>

<applicationMonitor updateTrigger="mbean" />
<webApplication contextRoot="${env.APP_CONTEXT_ROOT}" location="abcd.war" />

Содержимое DockerFile

RUN mkdir -p /config/project && \
chown -R 1001:0 /config && \
chmod -R g+rw /config && \
mkdir -p /opt/ibm/wlp/installTmp && \
chown -R 1001:0 /opt/ibm/wlp && \
chmod -R g+rw /opt/ibm/wlp && \
chown -R 1001:0 /logs && \
chmod -R g+rw /logs && \
mkdir -p $HOME && \
chown -R 1001:0 $HOME && \
chmod -R g+rw $HOME && \
chown -R 1001:0 $JAVA_HOME/lib/security && \
chmod -R g+rw $JAVA_HOME/lib/security && \
mkdir -p /opt/ibm/wlp/output/defaultServer/workarea && \
chown -R 1001:0 /opt/ibm/wlp/output/defaultServer/workarea && \
chmod -R g+rw /opt/ibm/wlp/output/defaultServer/workarea

Ответы [ 2 ]

0 голосов
/ 11 октября 2018

@ ArthurDM, спасибо, но не смог заставить его работать с решением для битов.Но смонтировал папку workarea в контейнере и заставил работать

volumeMounts:
  - name: lib-workarea-volume
    mountPath: /opt/ibm/wlp/output/defaultServer/workarea

volumes:
  - name: lib-workarea-volume
    emptyDir: {}
0 голосов
/ 11 октября 2018

При использовании RHEL в качестве базовой ОС мы заметили, что на /output был установлен бит закрепления, что вызывало некоторые проблемы.Проверьте места, где нам пришлось манипулировать /output в этом PR .

...