在 docker(-compose) 中以生产模式启动 FusionAuth

Start FusionAuth in docker(-compose) with productive mode

我在 ubuntu 服务器 运行 docker (Docker 版本 19.03.13 上用 docker 安装了 fusionauth+postgres -ce,构建 4484c46)。一切正常,但只要我想启用生产模式,FusionAuth 就不再启动了。我正在使用 nginx 代理,但是 fusionauth 和数据库之间的通信发生在 docker 网络内部,代理只重定向传入的 http 调用。

我有以下日志:

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.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.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 ms

使用以下 docker-撰写文件:

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_RUNTIME_MODE: productive
      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: bridge

和以下 nginx 配置:

server {
        listen 80;
        listen [::]:80;

        #for certbot challenges (renewal process)
        location ~ /.well-known/acme-challenge {
                allow all;
                root /var/www/html;
        }

        location / {
                rewrite ^ https://$host$request_uri? permanent;
        }
}


server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name ***(domain)***;

    server_tokens off;

    # ssl on; <-- Deprecated

    ssl_buffer_size 8k;
    ssl_dhparam /etc/ssl/certs/dhparam-2048.pem;

    ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
    ssl_prefer_server_ciphers on;
    ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5;

    ssl_ecdh_curve secp384r1;
    ssl_session_tickets off;

    # OCSP stapling
    ssl_stapling on;
    ssl_stapling_verify on;
    resolver 127.0.0.11 valid=30s;   # (127.0.0.11) is the internal Docker DNS, cache only for 30s

    ssl_certificate /etc/letsencrypt/live/***(domain)***/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/***(domain)***/privkey.pem;

    client_max_body_size    20M;
    underscores_in_headers on;

    location / {
            try_files $uri @iam;
    }


    # Reroute to the iam app
    location @iam {
            set $upstream http://fusionauth:9011;

            proxy_pass $upstream;
            proxy_set_header Host $http_host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Port "443";
            proxy_set_header X-Forwarded-Proto "https";
            add_header X-Frame-Options "SAMEORIGIN" always;
            add_header X-XSS-Protection "1; mode=block" always;
            add_header X-Content-Type-Options "nosniff" always;
            add_header Referrer-Policy "no-referrer-when-downgrade" always;
            add_header Content-Security-Policy "default-src * data: 'unsafe-eval' 'unsafe-inline'" always;
            add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
            # enable strict transport security only if you understand the implications
    }
}

我无法真正理解错误消息以及出了什么问题。

感谢您的帮助!

编辑:

这是在开发模式下启动时的日志:

fusionauthdb    | 
fusionauthdb    | PostgreSQL Database directory appears to contain a database; Skipping initialization
fusionauthdb    | 
fusionauthdb    | 2021-01-30 11:19:35.409 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
fusionauthdb    | 2021-01-30 11:19:35.409 UTC [1] LOG:  listening on IPv6 address "::", port 5432
fusionauthdb    | 2021-01-30 11:19:35.411 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
fusionauthdb    | 2021-01-30 11:19:35.425 UTC [20] LOG:  database system was shut down at 2021-01-30 11:10:14 UTC
fusionauthdb    | 2021-01-30 11:19:35.430 UTC [1] LOG:  database system is ready to accept connections
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
fusionauth      | 30-Jan-2021 11:19:37.277 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]
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      | 30-Jan-2021 11:19:37.987 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-9011"]
fusionauth      | 30-Jan-2021 11:19:38.017 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
fusionauth      | 30-Jan-2021 11:19:38.063 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["https-jsse-nio-9013"]
fusionauth      | 30-Jan-2021 11:19:38.406 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
fusionauth      | 30-Jan-2021 11:19:38.410 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-127.0.0.1-9019"]
fusionauth      | 30-Jan-2021 11:19:38.412 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
fusionauth      | 30-Jan-2021 11:19:38.413 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1492 ms
fusionauth      | 30-Jan-2021 11:19:38.420 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
fusionauth      | 30-Jan-2021 11:19:38.420 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.57
fusionauth      | Jan 30, 2021 11:19:40 AM 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-30 11:19:41.146 AM INFO  io.fusionauth.api.configuration.DefaultFusionAuthConfiguration - Loading FusionAuth configuration file [/usr/local/fusionauth/config/fusionauth.properties]
fusionauth      | 2021-01-30 11:19:41.151 AM INFO  io.fusionauth.api.configuration.DefaultFusionAuthConfiguration - Set property [fusionauth-app.url] set to [http://fusionauth:9011] using configured value.
fusionauth      | 2021-01-30 11:19:41.152 AM INFO  com.inversoft.configuration.BasePropertiesFileInversoftConfiguration - 
fusionauth      |   - Overriding default value of property [database.mysql.enforce-utf8mb4] with value [true]
fusionauth      |   - Overriding default value of property [database.mysql.connector-version] with value [8.0.21]
fusionauth      |   - Overriding default value of property [FUSIONAUTH_APP_RUNTIME_MODE] with value [development]
fusionauth      |   - Overriding default value of property [SEARCH_TYPE] with value [database]
fusionauth      | 
fusionauth      | 2021-01-30 11:19:41.260 AM INFO  io.fusionauth.api.configuration.DefaultFusionAuthConfiguration - Loading FusionAuth configuration file [/usr/local/fusionauth/config/fusionauth.properties]
fusionauth      | 2021-01-30 11:19:41.261 AM INFO  io.fusionauth.api.configuration.DefaultFusionAuthConfiguration - Set property [fusionauth-app.url] set to [http://fusionauth:9011] using configured value.
fusionauth      | 2021-01-30 11:19:41.264 AM INFO  com.inversoft.configuration.BasePropertiesFileInversoftConfiguration - 
fusionauth      |   - Overriding default value of property [database.mysql.enforce-utf8mb4] with value [true]
fusionauth      |   - Overriding default value of property [database.mysql.connector-version] with value [8.0.21]
fusionauth      |   - Overriding default value of property [FUSIONAUTH_APP_RUNTIME_MODE] with value [development]
fusionauth      |   - Overriding default value of property [SEARCH_TYPE] with value [database]
fusionauth      | 
fusionauth      | 2021-01-30 11:19:41.443 AM INFO  com.inversoft.maintenance.DefaultMaintenanceModeWorkflow - 
fusionauth      | 
fusionauth      | ---------------------------------------------------------------------------------------------------------
fusionauth      | ---------------------------------- Entering Silent Configuration Mode -----------------------------------
fusionauth      | ---------------------------------------------------------------------------------------------------------
fusionauth      | 
fusionauth      | 2021-01-30 11:19:41.539 AM INFO  com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - [jZpYqg] Attempting to lock database to prevent multi-node issues
fusionauth      | 2021-01-30 11:19:41.552 AM INFO  com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - [jZpYqg] Obtained a database lock
fusionauthdb    | 2021-01-30 11:19:41.556 UTC [28] LOG:  incomplete startup packet
fusionauth      | 2021-01-30 11:19:41.590 AM INFO  com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - [jZpYqg] Database Version [1.22.2]
fusionauth      | 2021-01-30 11:19:41.591 AM INFO  com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - [jZpYqg] Latest Migration Version [1.22.0]
fusionauth      | 2021-01-30 11:19:41.593 AM INFO  com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - [jZpYqg] Attempting to unlock database to prevent multi-node issues
fusionauth      | 2021-01-30 11:19:41.594 AM INFO  com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - [jZpYqg] Unlock completed
fusionauthdb    | 2021-01-30 11:19:41.596 UTC [32] LOG:  incomplete startup packet
fusionauth      | 2021-01-30 11:19:41.602 AM INFO  com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - [jZpYqg] Database Version [1.22.2]
fusionauth      | 2021-01-30 11:19:41.602 AM INFO  com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - [jZpYqg] Latest Migration Version [1.22.0]
fusionauth      | 2021-01-30 11:19:41.605 AM INFO  org.primeframework.mvc.servlet.PrimeServletContextListener - Initializing Prime
fusionauth      | 2021-01-30 11:19:41.606 AM INFO  io.fusionauth.app.guice.FusionAuthModule - 
fusionauth      | 
fusionauth      | ---------------------------------------------------------------------------------------------------------
fusionauth      | --------------------------------- Starting FusionAuth version [1.22.2] ----------------------------------
fusionauth      | ---------------------------------------------------------------------------------------------------------
…

您配置了导致异常的无效运行时模式。

 FUSIONAUTH_APP_RUNTIME_MODE: productive
Caused by: java.lang.UnsupportedOperationException: null
    at io.fusionauth.api.domain.RuntimeMode.fromConfiguration(RuntimeMode.java:21)

FusionAuth configuration 中查看此参数的可用选项。

可用的选项是:

  • development
  • production