• What could be the reason for OpenKM not starting after docker container creation?

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #54317  by LauryMenton
 
Hello, I'm trying to install OpenKM-CE on a new server, docker based. But, I'm having a lot of problems trying to install it successfully.

Below, is the configuration that I have used to install the latest available docker image for OpenKM-CE, and using the SQLite database for testing. I already tried with an external database (MySQL), like I have right now on another server (production: OpenKM-CE v6.3.11), but I have the same problem/error.

I have tried with older versions as well, just to see what happent: 6.3.9, 6.3.11, 6.3.12. But, the same error.

ERROR (LOG)
Code: Select all
2023-06-29 17:28:00,118 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.

2023-06-29 17:28:00,118 INFO Included extra file "/etc/supervisor/conf.d/custom.conf" during parsing

2023-06-29 17:28:00,140 INFO RPC interface 'supervisor' initialized

2023-06-29 17:28:00,141 CRIT Server 'inet_http_server' running without any HTTP authentication checking

2023-06-29 17:28:00,142 INFO RPC interface 'supervisor' initialized

2023-06-29 17:28:00,142 CRIT Server 'unix_http_server' running without any HTTP authentication checking

2023-06-29 17:28:00,143 INFO supervisord started with pid 1

2023-06-29 17:28:01,146 INFO spawned: 'xvfb' with pid 9

2023-06-29 17:28:01,148 INFO spawned: 'tomcat' with pid 10

2023-06-29 17:28:02,699 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2023-06-29 17:28:02,699 INFO success: tomcat entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2023-06-29 17:28:02,699 INFO exited: tomcat (exit status 1; not expected)

2023-06-29 17:28:03,703 INFO spawned: 'tomcat' with pid 34

2023-06-29 17:28:04,957 INFO success: tomcat entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2023-06-29 17:28:04,958 INFO exited: tomcat (exit status 1; not expected)

2023-06-29 17:28:05,989 INFO spawned: 'tomcat' with pid 56

2023-06-29 17:28:07,241 INFO success: tomcat entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2023-06-29 17:28:07,242 INFO exited: tomcat (exit status 1; not expected)

2023-06-29 17:28:08,245 INFO spawned: 'tomcat' with pid 78

2023-06-29 17:28:09,486 INFO success: tomcat entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

2023-06-29 17:28:09,487 INFO exited: tomcat (exit status 1; not expected)

This is the configuration I'm using to install it:

DOCKER-COMPOSE
Code: Select all
services:

  openkm:
    image: openkm/openkm-ce:6.3.12
    container_name: openkm-ce
    ports:
      - "10005:8080/tcp"   
    volumes:
      - /home/debian/docker-data/openkm/server.xml:/opt/tomcat/conf/server.xml
      - /home/debian/docker-data/openkm/OpenKM.cfg:/opt/tomcat/OpenKM.cfg
      - /home/debian/docker-data/openkm/repository:/opt/tomcat/repository
    #depends_on:
      # database
    restart: unless-stopped
    networks:
      - openkm-net

networks:
  openkm-net:
    name: openkm-net
OPENKM.CFG
Code: Select all
# OpenKM Hibernate configuration values
# It acts as a 'bridge' between the Java JDBC types and SQL types.
# Uncomment the corresponding line.
hibernate.dialect=org.hibernate.dialect.H2Dialect
#hibernate.dialect=org.hibernate.dialect.HSQLDialect
#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
#hibernate.dialect=org.hibernate.dialect.SQLServerDialect
#hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
#hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
#hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Configuration property used on Hibernate database schema generation process.
# Posible values: create (new instance), update (upgrade instance), none (no changes done).
hibernate.hbm2ddl=create

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Other OpenKM settings.
# Logback configuration file
logback.config=logback.xml
SERVER.XML
Code: Select all
<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <!-- Global JNDI resources -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />

    <Resource name="jdbc/OpenKMDS" auth="Container" type="javax.sql.DataSource"
            maxTotal="100" maxIdle="30" maxWaitMillis="10000" validationQuery="select 1"
            username="openkm" password="openkm" driverClassName="org.h2.Driver"
            url="jdbc:h2:/opt/tomcat/openkm"/>

    <Resource name="mail/OpenKM" auth="Container" type="javax.mail.Session"
              mail.smtp.host="localhost" mail.from="noreply@openkm.com"/>

  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">
    <Connector port="8080" address="0.0.0.0" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" address="127.0.0.1" protocol="AJP/1.3" redirectPort="8443" />

    <Engine name="Catalina" defaultHost="localhost">
      <!-- Use the LockOutRealm to prevent attempts to guess user passwords via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>

      <Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true">
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

        <!-- External resources -->
        <!-- <Context docBase="${catalina.home}/custom" path="/OpenKM/custom" reloadable="true"/> -->
      </Host>
    </Engine>
  </Service>
</Server>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Another question...
Is it possible to mount the whole '/opt/tomcat' internal directory, to the host?
Would be: '/path/to/host/openkm/config:/opt/tomcat' acceptable? Or OpenKM docker image is not designed to mount the whole dir, but only 'server.xml', 'OpenKM.cfg' and the repository directory?

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.