• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

Unable to connect to Postgres Database.

Scheduled Pinned Locked Moved Unsolved
Q&A
2
2
2.1k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P
    pc
    last edited by 14 Feb 2025, 07:57

    Fusionauth version: [1.47.1]
    Postgres: PostgreSQL 15 (Managed POstgres on DO)

    The database and fusion were running fine till i decided to restart. It enters the maintenance mode, and once it enters credentials, it gets stuck with loading forever and then gets back to maintenance mode.

    The database opens up many connections to POstgress continuously.

    Some of the logs.


    --------------------------------- Starting FusionAuth version [1.47.1] ----------------------------------

    2025-02-14 06:59:30.334 AM INFO io.fusionauth.api.plugin.guice.PluginModule - No plugins found
    2025-02-14 06:59:30.721 AM INFO io.fusionauth.api.service.system.NodeService - Node [19befe59-2599-41bb-9739-27f64208bba1] started.
    2025-02-14 06:59:31.660 AM INFO io.fusionauth.api.configuration.DefaultFusionAuthConfiguration - Loading FusionAuth configuration file [/root/fusionauth/config/fusionauth.properties]
    2025-02-14 06:59:31.661 AM INFO io.fusionauth.api.configuration.DefaultFusionAuthConfiguration - Dynamically set property [fusionauth-app.url] set to [http://10.114.16.4:9011]
    2025-02-14 06:59:31.665 AM INFO com.inversoft.configuration.BasePropertiesFileInversoftConfiguration -

    • Overriding default value of property [database.mysql.enforce-utf8mb4] with value [true]
    • Overriding default value of property [fusionauth-app.runtime-mode] with value [development]
    • Overriding default value of property [search.type] with value [database]

    2025-02-14 06:59:31.667 AM INFO com.inversoft.jdbc.hikari.DataSourceProvider - Connecting to PostgreSQL database at [jdbc:postgresql://private-bringin-fa-do-user-11431242-0.b.db.ondigitalocean.com:25060/defaultdb]
    2025-02-14 06:59:31.669 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-14 06:59:31.675 AM INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
    2025-02-14 06:59:31.769 AM INFO com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@5d512ddb
    2025-02-14 06:59:31.786 AM INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
    2025-02-14 06:59:34.334 AM INFO com.inversoft.scheduler.DefaultScheduler - Starting up scheduler
    2025-02-14 06:59:34.335 AM INFO com.inversoft.scheduler.DefaultScheduler - Scheduler is running
    2025-02-14 06:59:34.562 AM ERROR com.inversoft.scheduler.LogAndRetainFailureHandler - The scheduled service [class io.fusionauth.api.service.cache.CORSConfigurationCacheLoader] failed but will be re-run.
    org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:81)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.apache.ibatis.session.SqlSessionManager$SqlSessionInterceptor.invoke(SqlSessionManager.java:355)
    at jdk.proxy2/jdk.proxy2.$Proxy51.selectOne(Unknown Source)
    at org.apache.ibatis.session.SqlSessionManager.selectOne(SqlSessionManager.java:164)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:87)
    at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:142)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
    at jdk.proxy2/jdk.proxy2.$Proxy53.retrieve(Unknown Source)
    at io.fusionauth.api.service.cache.CORSConfigurationCacheLoader.internalLoad(CORSConfigurationCacheLoader.java:36)
    at com.inversoft.cache.BaseSingleValueCacheLoader.load(BaseSingleValueCacheLoader.java:13)
    at io.fusionauth.api.service.cache.CORSConfigurationCacheLoader.run(CORSConfigurationCacheLoader.java:30)
    at com.inversoft.scheduler.InjectableRunnable.run(InjectableRunnable.java:56)
    at com.inversoft.scheduler.DefaultScheduler.<init>(DefaultScheduler.java:70)
    at com.inversoft.scheduler.DefaultScheduler$$FastClassByGuice$$207759591.GUICE$TRAMPOLINE(<generated>)
    at com.inversoft.scheduler.DefaultScheduler$$FastClassByGuice$$207759591.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 io.fusionauth.app.FusionAuthMain.main(FusionAuthMain.java:27)
    

    2025-02-14 06:59:34.610 AM ERROR com.inversoft.scheduler.LogAndRetainFailureHandler - The scheduled service [class io.fusionauth.api.service.cache.IdentityProviderCacheLoader] failed but will be re-run.
    com.google.inject.ProvisionException: Unable to provision, see the following errors:

    1. [Guice/ErrorInCustomProvider]: TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
      at FusionAuthMVCModule.configure(FusionAuthMVCModule.java:31)
      _ installed by: FusionAuthModule -> Modules$OverrideModule -> FusionAuthMVCModule
      at FusionAuthObjectMapperProvider.<init>(FusionAuthObjectMapperProvider.java:23)
      _ for 2nd parameter
      while locating FusionAuthObjectMapperProvider
      at FusionAuthContentModule.bindObjectMapper(FusionAuthContentModule.java:24)
      _ installed by: FusionAuthModule -> Modules$OverrideModule -> FusionAuthContentModule
      at DefaultCipherService.<init>(DefaultCipherService.java:35)
      _ for 1st parameter
      while locating DefaultCipherService
      at DefaultReactorCore.<init>(DefaultReactorCore.java:66)
      _ for 1st parameter
      while locating DefaultReactorCore
      at InstanceManager.<init>(InstanceManager.java:38)
      _ for 3rd parameter
      at DefaultReactorService.<init>(DefaultReactorService.java:85)
      _ for 4th parameter
      while locating DefaultReactorService
      at DefaultPasswordService.<init>(DefaultPasswordService.java:50)
      _ for 3rd parameter
      while locating DefaultPasswordService
      at FusionAuthConnector.<init>(FusionAuthConnector.java:41)
      _ for 2nd parameter
      while locating FusionAuthConnector
      while locating Connector annotated with @Element(setName=,uniqueId=56, type=MAPBINDER, keyType=ConnectorType)
      at DefaultAuthenticationService.<init>(DefaultAuthenticationService.java:122)
      _ for 3rd parameter
      while locating DefaultAuthenticationService
      at AppleIdentityProviderAuthenticationService.<init>(AppleIdentityProviderAuthenticationService.java:75)
      _ for 2nd parameter
      while locating AppleIdentityProviderAuthenticationService
      while locating IdentityProviderAuthenticationService annotated with @Element(setName=,uniqueId=106, type=MAPBINDER, keyType=IdentityProviderType)
      at IdentityProviderCacheLoader.<init>(IdentityProviderCacheLoader.java:39)
      _ for 4th parameter
      while locating IdentityProviderCacheLoader

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

    M 1 Reply Last reply 14 Feb 2025, 21:11 Reply Quote 0
    • M
      mark.robustelli @pc
      last edited by 14 Feb 2025, 21:11

      @pc Was anything changed before the reboot? What prompted the reboot?

      1 Reply Last reply Reply Quote 0
      1 out of 2
      • First post
        1/2
        Last post