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

Edit secret file formatting error #137

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

natpatchara-w
Copy link

@natpatchara-w natpatchara-w commented Oct 7, 2024

My solution for problem in issue #135

Problem:
Fresh installation of Broadsea cause WebAPI initializations error.

log:

. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \ \
( ( )__ | '_ | '| | ' / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
' || .__|| ||| |_, | / / / /
=========||==============|/=////
:: Spring Boot :: (v1.5.22.RELEASE)

2024-06-17 02:53:39.587 ERROR main org.apache.juli.logging.DirectJDKLog - [] - Unable to create initial connections of pool.
org.postgresql.util.PSQLException: Something unusual has occurred to cause the driver to fail. Please report this exception.
at org.postgresql.Driver.connect(Driver.java:282) ~[postgresql-42.3.7.jar!/:42.3.7]
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319) ~[tomcat-jdbc-8.5.43.jar!/:?]
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212) ~[tomcat-jdbc-8.5.43.jar!/:?]
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:736) ~[tomcat-jdbc-8.5.43.jar!/:?]
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:668) ~[tomcat-jdbc-8.5.43.jar!/:?]
...
Caused by: java.lang.IllegalArgumentException: Prohibited character
at org.postgresql.shaded.com.ongres.saslprep.SaslPrep.saslPrep(SaslPrep.java:105) ~[postgresql-42.3.7.jar!/:42.3.7]
at org.postgresql.shaded.com.ongres.scram.common.stringprep.StringPreparations$2.doNormalize(StringPreparations.java:55) ~[postgresql-42.3.7.jar!/:42.3.7]
...
2024-06-17 02:53:39.595 WARN main org.springframework.context.support.AbstractApplicationContext - [] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroFilter' defined in class path resource [org/ohdsi/webapi/ShiroConfiguration.class]: Unsatisfied dependency expressed through method 'shiroFilter' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/ohdsi/webapi/FlywayConfig.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.dbsupport.FlywaySqlException:
Unable to obtain Jdbc connection from DataSource

full logs
logs.txt

Cause:
Additional space and newline at the end of secret files cause connection error when loaded into JDBC for database connection.

Fix:
Delete additional space and newline at the end of secret files.

File edited:

  • secrets/atlas/ATLAS_ADMIN_PASSWORD
  • secrets/atlas/ATLAS_NEW_CDMSOURCE_PASSWORD
  • secrets/hades/HADES_PASSWORD
  • secrets/omop_vocab/VOCAB_PG_PASSWORD
  • secrets/openldap/OPENLDAP_ACCOUNT_PASSWORDS
  • secrets/openldap/OPENLDAP_ADMIN_PASSWORD
  • secrets/pgadmin4/PGADMIN_DEFAULT_PASSWORD
  • secrets/phoebe/PHOEBE_PG_PASSWORD
  • secrets/postprocessing/CDM_CONNECTIONDETAILS_PASSWORD
  • secrets/solr_vocab/SOLR_VOCAB_JDBC_PASSWORD
  • secrets/webapi/CDM_SNOWFLAKE_PRIVATE_KEY
  • secrets/webapi/SECURITY_LDAP_SYSTEM_PASSWORD
  • secrets/webapi/WEBAPI_DATASOURCE_PASSWORD

    remove additional space at end of secret file that might cause connection error with jdbc java library.
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

Successfully merging this pull request may close these issues.

2 participants