-
I have installed fusionauth+postgres with docker on an ubuntu server. Everything works fine, but as soon as I want to enable productive mode, FusionAuth does not start anymore. I am using an nginx proxy, but the communication between fusionauth and the database happens inside the docker network.
I have following logs:
root@dev1:~/launch# ./sh/local-iam-maintenance Creating volume "launch_fa_config" with default driver Creating volume "launch_web-root" with local driver Creating fusionauthdb ... done Creating fusionauth ... done Creating webserver ... done Attaching to fusionauthdb, fusionauth, webserver fusionauth | NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED fusionauthdb | fusionauthdb | PostgreSQL Database directory appears to contain a database; Skipping initialization fusionauthdb | fusionauthdb | 2021-01-19 12:17:34.854 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 fusionauthdb | 2021-01-19 12:17:34.854 UTC [1] LOG: listening on IPv6 address "::", port 5432 fusionauthdb | 2021-01-19 12:17:34.858 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" fusionauthdb | 2021-01-19 12:17:34.881 UTC [20] LOG: database system was shut down at 2021-01-19 12:16:47 UTC fusionauthdb | 2021-01-19 12:17:34.892 UTC [1] LOG: database system is ready to accept connections webserver | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration webserver | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ webserver | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh webserver | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf webserver | 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf webserver | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh webserver | /docker-entrypoint.sh: Configuration complete; ready for start up fusionauth | 19-Jan-2021 12:17:36.900 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:/usr/lib64:/lib64:/lib:/usr/lib] fusionauth | 19-Jan-2021 12:17:37.280 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-9011"] fusionauth | 19-Jan-2021 12:17:37.305 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read fusionauth | 19-Jan-2021 12:17:37.359 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-jsse-nio-9013"] fusionauth | 19-Jan-2021 12:17:37.750 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read fusionauth | 19-Jan-2021 12:17:37.754 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-127.0.0.1-9019"] fusionauth | 19-Jan-2021 12:17:37.758 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read fusionauth | 19-Jan-2021 12:17:37.761 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1373 ms fusionauth | 19-Jan-2021 12:17:37.771 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina] fusionauth | 19-Jan-2021 12:17:37.773 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.57 fusionauth | Jan 19, 2021 12:17:39 PM org.apache.jasper.servlet.TldScanner scanJars fusionauth | INFO: 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. fusionauth | 2021-01-19 12:17:40.331 PM INFO io.fusionauth.api.configuration.DefaultFusionAuthConfiguration - Loading FusionAuth configuration file [/usr/local/fusionauth/config/fusionauth.properties] fusionauth | 2021-01-19 12:17:40.336 PM INFO io.fusionauth.api.configuration.DefaultFusionAuthConfiguration - Set property [fusionauth-app.url] set to [http://fusionauth:9011] using configured value. fusionauth | 2021-01-19 12:17:40.343 PM ERROR org.primeframework.mvc.guice.GuiceBootstrap - fusionauth | fusionauth | =================================================================================================== fusionauth | fusionauth | Unable to start the server. Here's why: fusionauth | fusionauth | fusionauth | [Error injecting constructor, java.lang.UnsupportedOperationException] fusionauth | -> [class java.lang.UnsupportedOperationException] null fusionauth | fusionauth | =================================================================================================== fusionauth | fusionauth | fusionauth | 2021-01-19 12:17:40.352 PM ERROR org.primeframework.mvc.guice.GuiceBootstrap - Unable to start the server. Exception: fusionauth | fusionauth | com.google.inject.CreationException: Unable to create injector, see the following errors: fusionauth | fusionauth | 1) Error injecting constructor, java.lang.UnsupportedOperationException fusionauth | at io.fusionauth.api.configuration.DefaultFusionAuthConfiguration.<init>(DefaultFusionAuthConfiguration.java:58) fusionauth | at io.fusionauth.api.configuration.DefaultFusionAuthConfiguration.class(DefaultFusionAuthConfiguration.java:23) fusionauth | while locating io.fusionauth.api.configuration.DefaultFusionAuthConfiguration fusionauth | at io.fusionauth.app.maintenance.guice.FusionAuthInitialMaintenanceModeModule.configure(FusionAuthInitialMaintenanceModeModule.java:19) fusionauth | while locating io.fusionauth.api.configuration.FusionAuthConfiguration fusionauth | fusionauth | 1 error fusionauth | at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:554) fusionauth | at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:188) fusionauth | at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:111) fusionauth | at com.google.inject.Guice.createInjector(Guice.java:87) fusionauth | at com.google.inject.Guice.createInjector(Guice.java:69) fusionauth | at com.google.inject.Guice.createInjector(Guice.java:59) fusionauth | at org.primeframework.mvc.guice.GuiceBootstrap.initialize(GuiceBootstrap.java:58) fusionauth | at com.inversoft.maintenance.servlet.MaintenanceModePrimeServletContextListener.contextInitialized(MaintenanceModePrimeServletContextListener.java:39) fusionauth | at io.fusionauth.app.primeframework.FusionAuthAppPrimeServletContextListener.contextInitialized(FusionAuthAppPrimeServletContextListener.java:26) fusionauth | at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4689) fusionauth | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5155) fusionauth | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) fusionauth | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412) fusionauth | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402) fusionauth | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) fusionauth | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) fusionauth | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) fusionauth | at java.base/java.lang.Thread.run(Thread.java:832) fusionauth | Caused by: java.lang.UnsupportedOperationException: null fusionauth | at io.fusionauth.api.domain.RuntimeMode.fromConfiguration(RuntimeMode.java:21) fusionauth | at io.fusionauth.api.configuration.DefaultFusionAuthConfiguration.initialize(DefaultFusionAuthConfiguration.java:181) fusionauth | at com.inversoft.configuration.BasePropertiesFileInversoftConfiguration.initializeAndLogWarningsAndErrors(BasePropertiesFileInversoftConfiguration.java:514) fusionauth | at com.inversoft.configuration.BasePropertiesFileInversoftConfiguration.<init>(BasePropertiesFileInversoftConfiguration.java:88) fusionauth | at io.fusionauth.api.configuration.DefaultFusionAuthConfiguration.<init>(DefaultFusionAuthConfiguration.java:58) fusionauth | at io.fusionauth.api.configuration.DefaultFusionAuthConfiguration$$FastClassByGuice$$b82219af.newInstance(<generated>) fusionauth | at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89) fusionauth | at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114) fusionauth | at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91) fusionauth | at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306) fusionauth | at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) fusionauth | at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:168) fusionauth | at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39) fusionauth | at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:62) fusionauth | at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) fusionauth | at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:168) fusionauth | at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39) fusionauth | at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:213) fusionauth | at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184) fusionauth | ... 16 common frames omitted fusionauth | Jan 19, 2021 12:17:40 PM org.apache.catalina.core.StandardContext listenerStart fusionauth | SEVERE: Exception sending context initialized event to listener instance of class [io.fusionauth.app.primeframework.FusionAuthAppPrimeServletContextListener] fusionauth | org.primeframework.mvc.PrimeException fusionauth | at org.primeframework.mvc.guice.GuiceBootstrap.initialize(GuiceBootstrap.java:77) fusionauth | at com.inversoft.maintenance.servlet.MaintenanceModePrimeServletContextListener.contextInitialized(MaintenanceModePrimeServletContextListener.java:39) fusionauth | at io.fusionauth.app.primeframework.FusionAuthAppPrimeServletContextListener.contextInitialized(FusionAuthAppPrimeServletContextListener.java:26) fusionauth | at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4689) fusionauth | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5155) fusionauth | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) fusionauth | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412) fusionauth | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402) fusionauth | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) fusionauth | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) fusionauth | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) fusionauth | at java.base/java.lang.Thread.run(Thread.java:832) fusionauth | fusionauth | 19-Jan-2021 12:17:40.355 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file fusionauth | 19-Jan-2021 12:17:40.376 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors fusionauth | Jan 19, 2021 12:17:40 PM org.apache.catalina.core.StandardContext listenerStop fusionauth | SEVERE: Exception sending context destroyed event to listener instance of class [io.fusionauth.app.primeframework.FusionAuthAppPrimeServletContextListener] fusionauth | java.lang.NullPointerException fusionauth | at org.primeframework.mvc.guice.GuiceBootstrap.shutdown(GuiceBootstrap.java:88) fusionauth | at org.primeframework.mvc.servlet.PrimeServletContextListener.contextDestroyed(PrimeServletContextListener.java:47) fusionauth | at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4735) fusionauth | at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5399) fusionauth | at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) fusionauth | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:187) fusionauth | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412) fusionauth | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402) fusionauth | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) fusionauth | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) fusionauth | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) fusionauth | at java.base/java.lang.Thread.run(Thread.java:832) fusionauth | fusionauth | 19-Jan-2021 12:17:40.434 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-9011"] fusionauth | 19-Jan-2021 12:17:40.447 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["https-jsse-nio-9013"] fusionauth | 19-Jan-2021 12:17:40.451 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-127.0.0.1-9019"] fusionauth | 19-Jan-2021 12:17:40.454 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 2692 msand using following docker-compose file:
version: '3.7' services: fusionauthdb: container_name: fusionauthdb image: postgres:11.9-alpine environment: PGDATA: /var/lib/postgresql/data/pgdata POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres networks: - app-network restart: unless-stopped volumes: - /var/lib/postgresql:/var/lib/postgresql/data fusionauth: container_name: fusionauth image: fusionauth/fusionauth-app:1.22.2 depends_on: - fusionauthdb environment: DATABASE_URL: jdbc:postgresql://fusionauthdb:5432/fusionauth DATABASE_ROOT_USERNAME: postgres DATABASE_ROOT_PASSWORD: postgres DATABASE_USERNAME: fusionauth DATABASE_PASSWORD: hkaLBM3RVnyYeYeqE3WI1w2e4Avpy0Wd5O3s3 FUSIONAUTH_APP_MEMORY: '512M' FUSIONAUTH_APP_RUNTIME_MODE: development FUSIONAUTH_APP_URL: http://fusionauth:9011 SEARCH_TYPE: database networks: - app-network restart: unless-stopped ports: - 9011:9011 volumes: - fa_config:/usr/local/fusionauth/config volumes: fa_config: networks: app-network: driver: bridgeI do not really understand the error message and what is going wrong.
Thank you for your help!
Cyrill
-
@cyrill-lippuner
Hmmm. The docker-compose you shared shows you are still in development mode:
FUSIONAUTH_APP_RUNTIME_MODE: development.Not sure if this is a typo, but you want to be in
productionmode, notproductivemode. (Although we all want to be productive
).Can you please try with
FUSIONAUTH_APP_RUNTIME_MODE: productionand share what the results are? -
Yeah, that was it... I guess it was already late

-
D dan moved this topic from Q&A on
-
D dan moved this topic from Frequently Asked Questions (FAQ) on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login