KnowageLabs / Knowage-Server-Docker

Docker Image packaging for Knowage Server https://www.knowage-suite.com
GNU Affero General Public License v3.0
66 stars 77 forks source link

knowage-docker init too slow, need 9minutes #48

Open qiaofeng1227 opened 3 years ago

qiaofeng1227 commented 3 years ago

ENV: Amazon ubuntu20.04 2core 4G 50g HDD 100M

[root@ip-172-31-35-153 ec2-user]# docker logs knowage-server 
wait-for-it.sh: waiting 15 seconds for knowagedb:3306
wait-for-it.sh: knowagedb:3306 is available after 12 seconds
MySql is up!
wait-for-it.sh: waiting 15 seconds for knowagedb:3306
wait-for-it.sh: knowagedb:3306 is available after 0 seconds
MySql is up!
21-May-2021 01:22:46.720 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/8.5.65
21-May-2021 01:22:47.054 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Mar 30 2021 12:28:40 UTC
21-May-2021 01:22:47.054 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.65.0
21-May-2021 01:22:47.054 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
21-May-2021 01:22:47.054 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.14.231-173.361.amzn2.x86_64
21-May-2021 01:22:47.054 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
21-May-2021 01:22:47.054 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/local/openjdk-8/jre
21-May-2021 01:22:47.054 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_265-b01
21-May-2021 01:22:47.054 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
21-May-2021 01:22:47.054 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /home/knowage/apache-tomcat
21-May-2021 01:22:47.054 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /home/knowage/apache-tomcat
21-May-2021 01:22:47.055 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/home/knowage/apache-tomcat/conf/logging.properties
21-May-2021 01:22:47.055 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
21-May-2021 01:22:47.055 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.manager
21-May-2021 01:22:47.055 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.policy=/home/knowage/apache-tomcat/conf/knowage-default.policy
21-May-2021 01:22:47.055 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UnlockExperimentalVMOptions
21-May-2021 01:22:47.055 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseCGroupMemoryLimitForHeap
21-May-2021 01:22:47.055 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
21-May-2021 01:22:47.056 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
21-May-2021 01:22:47.056 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
21-May-2021 01:22:47.056 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
21-May-2021 01:22:47.056 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/knowage/apache-tomcat
21-May-2021 01:22:47.056 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/home/knowage/apache-tomcat
21-May-2021 01:22:47.056 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/home/knowage/apache-tomcat/temp
21-May-2021 01:22:47.056 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
21-May-2021 01:22:48.569 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
21-May-2021 01:22:48.608 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
21-May-2021 01:22:48.657 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-127.0.0.1-8009"]
21-May-2021 01:22:48.668 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
21-May-2021 01:22:48.671 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 5674 ms
21-May-2021 01:22:48.821 WARNING [main] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = knowage Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "20" for "maxActive" property, which is being ignored.
21-May-2021 01:22:48.822 WARNING [main] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = knowage Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "-1" for "maxWait" property, which is being ignored.
21-May-2021 01:22:48.982 WARNING [main] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = ds_cache Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "20" for "maxActive" property, which is being ignored.
21-May-2021 01:22:48.982 WARNING [main] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = ds_cache Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "300" for "maxWait" property, which is being ignored.
21-May-2021 01:22:49.064 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
21-May-2021 01:22:49.065 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.65]
21-May-2021 01:22:49.093 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/knowage/apache-tomcat/webapps/knowage]
21-May-2021 01:23:36.398 INFO [localhost-startStop-1] org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory.getObjectInstance Name = knowageds Ignoring unknown property: value of "" for "description" property
21-May-2021 01:23:36.807 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
21-May-2021 01:23:37.285 INFO [localhost-startStop-1] com.hazelcast.config.ClasspathXmlConfig.null Configuring Hazelcast from 'hazelcast.xml'.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
21-May-2021 01:24:09.347 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/knowage/apache-tomcat/webapps/knowage] has finished in [80,246] ms
21-May-2021 01:24:09.350 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/knowage/apache-tomcat/webapps/knowagebirtreportengine]
21-May-2021 01:25:01.423 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
21-May-2021 01:25:07.135 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/knowage/apache-tomcat/webapps/knowagebirtreportengine] has finished in [57,784] ms
21-May-2021 01:25:07.136 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/knowage/apache-tomcat/webapps/knowagecockpitengine]
21-May-2021 01:25:40.157 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
21-May-2021 01:25:41.279 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/knowage/apache-tomcat/webapps/knowagecockpitengine] has finished in [34,142] ms
21-May-2021 01:25:41.279 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/knowage/apache-tomcat/webapps/knowagecommonjengine]
21-May-2021 01:26:21.123 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
21-May-2021 01:26:22.512 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/knowage/apache-tomcat/webapps/knowagecommonjengine] has finished in [41,233] ms
21-May-2021 01:26:22.513 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/knowage/apache-tomcat/webapps/knowagegeoreportengine]
21-May-2021 01:26:59.305 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
21-May-2021 01:27:00.115 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/knowage/apache-tomcat/webapps/knowagegeoreportengine] has finished in [37,602] ms
21-May-2021 01:27:00.116 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/knowage/apache-tomcat/webapps/knowagejasperreportengine]
21-May-2021 01:27:43.482 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
21-May-2021 01:27:44.119 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/knowage/apache-tomcat/webapps/knowagejasperreportengine] has finished in [44,003] ms
21-May-2021 01:27:44.120 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/knowage/apache-tomcat/webapps/knowagekpiengine]
21-May-2021 01:28:21.627 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
21-May-2021 01:28:22.461 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/knowage/apache-tomcat/webapps/knowagekpiengine] has finished in [38,341] ms
21-May-2021 01:28:22.461 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/knowage/apache-tomcat/webapps/knowagemeta]
21-May-2021 01:29:02.338 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
21-May-2021 01:29:02.981 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/knowage/apache-tomcat/webapps/knowagemeta] has finished in [40,520] ms
21-May-2021 01:29:02.982 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/knowage/apache-tomcat/webapps/knowageqbeengine]
21-May-2021 01:29:46.693 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
21-May-2021 01:29:47.548 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/knowage/apache-tomcat/webapps/knowageqbeengine] has finished in [44,561] ms
21-May-2021 01:29:47.548 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/knowage/apache-tomcat/webapps/knowagesvgviewerengine]
21-May-2021 01:30:27.176 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
21-May-2021 01:30:27.799 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/knowage/apache-tomcat/webapps/knowagesvgviewerengine] has finished in [40,251] ms
21-May-2021 01:30:27.799 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/knowage/apache-tomcat/webapps/knowagetalendengine]
21-May-2021 01:30:56.642 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
21-May-2021 01:30:56.735 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/knowage/apache-tomcat/webapps/knowagetalendengine] has finished in [28,936] ms
21-May-2021 01:30:56.735 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/knowage/apache-tomcat/webapps/knowagewhatifengine]
21-May-2021 01:31:26.737 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
21-May-2021 01:31:27.452 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/knowage/apache-tomcat/webapps/knowagewhatifengine] has finished in [30,717] ms
21-May-2021 01:31:27.481 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
21-May-2021 01:31:27.513 SEVERE [main] org.apache.catalina.core.StandardService.startInternal Failed to start connector [Connector[AJP/1.3-8009]]
    org.apache.catalina.LifecycleException: Protocol handler start failed
        at org.apache.catalina.connector.Connector.startInternal(Connector.java:1101)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:440)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:766)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:688)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
    Caused by: java.lang.IllegalArgumentException: The AJP Connector is configured with secretRequired="true" but the secret attribute is either null or "". This combination is not valid.
        at org.apache.coyote.ajp.AbstractAjpProtocol.start(AbstractAjpProtocol.java:274)
        at org.apache.catalina.connector.Connector.startInternal(Connector.java:1099)
        ... 12 more
21-May-2021 01:31:27.516 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 518844 ms

Could you help me improve this problem, thank you very much.

kerny3d commented 3 years ago

Hi, we cannot do much about the slowness of the boot: you should try to add more CPU cores or remove CPU limits, if you use it.

About the error, just ignore it because it's related to the AJP connector, used in case of an external reverse proxy.