Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load FusionAuth from backup SQL file. #3000

Open
mmoreno509 opened this issue Feb 15, 2025 · 0 comments
Open

Can't load FusionAuth from backup SQL file. #3000

mmoreno509 opened this issue Feb 15, 2025 · 0 comments

Comments

@mmoreno509
Copy link

mmoreno509 commented Feb 15, 2025

Failed to load FusionAuth from export Database Backups

Description

Mysql version: 8.0.34
Fusionauth version: 1.47.1

We're having an issue booting up an instance of FusionAuth within a docker container using a mysql dump of our production database. (We do this for testing config changes as well as theme updates.

We confirmed our dump is using the expected encoding (utf8mb4) and created the database as utf8mb4_0900_ai_ci

If this instance is booted without the backup (we are able to create the tables and setup an admin user). The install works as expected. When we restart the instance with a backup from our production environment, we see the following error in the /user/local/fusionauth/logs/fusionauth.log file:

Error

[java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null] 

Any idea what the anycontroller would mean? Here's the trace if it helps. Thanks again for any pointers!

Full Trace:

2025-02-15 02:44:07.911 AM INFO  com.inversoft.jdbc.hikari.DataSourceProvider - Connecting to MySQL database at [jdbc:mysql://mysql-fusionauth:3306/fusionauth?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true]
2025-02-15 02:44:07.912 AM WARN  com.zaxxer.hikari.HikariConfig - HikariPool-1 - idleTimeout has been set but has no effect because the pool is operating as a fixed size pool.
2025-02-15 02:44:07.912 AM INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2025-02-15 02:44:07.920 AM INFO  com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection com.mysql.cj.jdbc.ConnectionImpl@383c3eb3
2025-02-15 02:44:07.924 AM INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2025-02-15 02:44:08.505 AM INFO  com.inversoft.scheduler.DefaultScheduler - Starting up scheduler
2025-02-15 02:44:08.505 AM INFO  com.inversoft.scheduler.DefaultScheduler - Scheduler is running
2025-02-15 02:44:08.590 AM INFO  io.fusionauth.api.service.system.NodeService - Node [75173b44-34bb-41d3-adf8-c219c7b39f26] added with address [http://172.18.0.8:9011]
2025-02-15 02:44:09.535 AM INFO  io.fusionauth.app.primeframework.FusionHTTPContextAuthSetup - Initializing the FusionAuth HTTP Context.
2025-02-15 02:44:09.587 AM ERROR org.primeframework.mvc.guice.GuiceBootstrap - 

===================================================================================================

  Unable to start the server. Here's why: 


[java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null] 
        -> [class java.lang.NullPointerException] Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null

===================================================================================================


2025-02-15 02:44:09.587 AM ERROR org.primeframework.mvc.guice.GuiceBootstrap - Unable to start the server. Exception: 

com.google.inject.CreationException: Unable to create injector, see the following errors:

1) [Guice/ErrorInjectingConstructor]: NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null
  at FusionAuthJVMStatsBinder.<init>(FusionAuthJVMStatsBinder.java:22)
  at FusionAuthMetricModule.configure(FusionAuthMetricModule.java:22)
      \_ installed by: FusionAuthModule -> Modules$OverrideModule -> APIModule -> FusionAuthMetricModule
  while locating FusionAuthJVMStatsBinder

Learn more:
  https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR

======================
Full classname legend:
======================
APIModule:                "io.fusionauth.api.guice.APIModule"
FusionAuthJVMStatsBinder: "io.fusionauth.api.metrics.FusionAuthJVMStatsBinder"
FusionAuthMetricModule:   "io.fusionauth.api.metrics.FusionAuthMetricModule"
FusionAuthModule:         "io.fusionauth.app.guice.FusionAuthModule"
Modules$OverrideModule:   "com.google.inject.util.Modules$OverrideModule"
========================
End of classname legend:
========================

        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:576)
        at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:190)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:113)
        at com.google.inject.Guice.createInjector(Guice.java:87)
        at com.google.inject.Guice.createInjector(Guice.java:69)
        at com.google.inject.Guice.createInjector(Guice.java:59)
        at org.primeframework.mvc.guice.GuiceBootstrap.initialize(GuiceBootstrap.java:60)
        at org.primeframework.mvc.BasePrimeMain.hup(BasePrimeMain.java:69)
        at org.primeframework.mvc.BasePrimeMain.start(BasePrimeMain.java:100)
        at io.fusionauth.app.FusionAuthMain.main(FusionAuthMain.java:27)
Caused by: java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "anyController" is null
        at java.base/jdk.internal.platform.cgroupv2.CgroupV2Subsystem.getInstance(CgroupV2Subsystem.java:80)
        at java.base/jdk.internal.platform.CgroupSubsystemFactory.create(CgroupSubsystemFactory.java:114)
        at java.base/jdk.internal.platform.CgroupMetrics.getInstance(CgroupMetrics.java:177)
        at java.base/jdk.internal.platform.SystemMetrics.instance(SystemMetrics.java:29)
        at java.base/jdk.internal.platform.Metrics.systemMetrics(Metrics.java:58)
        at java.base/jdk.internal.platform.Container.metrics(Container.java:43)
        at jdk.management/com.sun.management.internal.OperatingSystemImpl.<init>(OperatingSystemImpl.java:182)
        at jdk.management/com.sun.management.internal.PlatformMBeanProviderImpl.getOperatingSystemMXBean(PlatformMBeanProviderImpl.java:280)
        at jdk.management/com.sun.management.internal.PlatformMBeanProviderImpl$3.nameToMBeanMap(PlatformMBeanProviderImpl.java:199)
        at java.management/java.lang.management.ManagementFactory.lambda$getPlatformMBeanServer$0(ManagementFactory.java:488)
        at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1779)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at java.management/java.lang.management.ManagementFactory.getPlatformMBeanServer(ManagementFactory.java:489)
        at io.fusionauth.api.metrics.FusionAuthJVMStatsBinder.<init>(FusionAuthJVMStatsBinder.java:23)
        at io.fusionauth.api.metrics.FusionAuthJVMStatsBinder$$FastClassByGuice$$155100759.GUICE$TRAMPOLINE(<generated>)
        at io.fusionauth.api.metrics.FusionAuthJVMStatsBinder$$FastClassByGuice$$155100759.apply(<generated>)
        at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:300)
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
        at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:169)
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:45)
        at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:213)
        at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:186)
        ... 8 common frames omitted
Exception in thread "main" org.primeframework.mvc.PrimeException
        at org.primeframework.mvc.guice.GuiceBootstrap.initialize(GuiceBootstrap.java:80)
        at org.primeframework.mvc.BasePrimeMain.hup(BasePrimeMain.java:69)
        at org.primeframework.mvc.BasePrimeMain.start(BasePrimeMain.java:100)
        at io.fusionauth.app.FusionAuthMain.main(FusionAuthMain.java:27)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant