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

    Connecting to postgresql sitting behind HAProxy

    Scheduled Pinned Locked Moved
    General Discussion
    0
    2
    953
    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.
    • H
      hvpavan
      last edited by

      hi,
      I have a the following cluster setup for my database:

      HAproxy-> PGBouncer -> Postgresql.

      db configuration in fusionauth.properties
      database.url=jdbc:postgresql://10.10.1.1:4242/fusionauth

      Error logs:
      *2021-01-22 9:20:50.476 PM INFO com.inversoft.jdbc.hikari.DataSourceProvider - Connecting to PostgreSQL database at [jdbc:postgresql://10.10.1.1:4242/fusionauth]
      2021-01-22 9:20:50.479 PM 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.
      2021-01-22 9:20:50.480 PM INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
      2021-01-22 9:20:50.512 PM ERROR com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Exception during pool initialization.
      org.postgresql.util.PSQLException: The connection attempt failed.

      Caused by: java.io.EOFException: null
      at org.postgresql.core.PGStream.receiveChar(PGStream.java:372)
      at org.postgresql.core.v3.ConnectionFactoryImpl.enableSSL(ConnectionFactoryImpl.java:416)
      at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:140)
      at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:197)
      ... 298 common frames omitted*

      Has someone managed to connect fusionauth through HAproxy?

      Thank you!

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        Does this happen regularly, or intermittently? It looks like some kind of SSL issue from the stacktrace, but I'm afraid I don't have any experience with this configuration.

        Another troubleshooting approach would be removing components to see if that changed the behavior.

        Or you could also search for interactions between Hikari (the java connection pooling system FusionAuth uses) and haproxy.

        Sorry I don't have a better answer for you. Please let us know what you end up finding out!

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • First post
          Last post