Untitled

 avatar
cion
plain_text
5 months ago
12 kB
2
Indexable
podman run --rm --name pulse-portal-backend -d \
       --secret=jasypt-encryption-password,type=env,target=JASYPT_ENC_PASS \
       -e GOOGLE_APPLICATION_CREDENTIALS=/opt/pulse/dev-dbfeeds.json \
       -e JAVA_OPTS="-Dhttps.proxyHost=dev-net-proxy.intranet.db.com -Dhttps.proxyPort=8080 -Djavax.net.ssl.trustStore=/opt/pulse/truststore.jks -Djavax.net.ssl.trustStoreType=JKS -Djavax.net.ssl.trustStorePassword=dbca2020 -Dspring.config.location=file:/opt/pulse/application.yaml -Djasypt.encryptor.password=${JASYPT_ENC_PASS}" \
       -v /home/wmanltc/pulse/pulse-portal-backend/application.yaml:/opt/pulse/application.yaml \
       -v /home/wmanltc/pulse/pulse-portal-backend/certs/keystore.jks:/opt/pulse/keystore.jks \
       -v /home/wmanltc/pulse/pulse-portal-backend/certs/truststore.jks:/opt/pulse/truststore.jks \
       -v /home/wmanltc/pulse/pulse-portal-backend/dev-dbfeeds.json:/opt/pulse/dev-dbfeeds.json \
       -v /home/wmanltc/pulse/oracle_wallet/:/opt/pulse/oracle_wallet \
       --network=pulse-net -p 8082:8082 \
	artifactory.sdlc.ctl.gcp.db.com/dkr-snapshot-local/com/db/pulse/pulse-portal-backend:fix_podman_secrets

------------------
# The problem is -Djasypt.encryptor.password=${JASYPT_ENC_PASS} is still empty and this goes to the error from the log below.
# I think this ${JASYPT_ENC_PASS} expands to a variable that is set on the host system and not inside the container which is pretty stupid in my opinion.
# Because if I export JASYPT_ENC_PASS=ldapsecretkey the app works without issues. but I don't want to set my secret on the host machine

Log:
Starting Java application with JASYPT_ENC_PASS: ldapsecretkey

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v3.2.8)

2024-08-09T15:14:09.111Z  INFO 1 --- [           main] com.db.portal.PortalApplication          : Starting PortalApplication v0.0.1-SNAPSHOT using Java 17.0.11 with PID 1 (/opt/pulse/pulse-portal-backend.jar started by root in /opt/pulse)
2024-08-09T15:14:09.125Z  INFO 1 --- [           main] com.db.portal.PortalApplication          : No active profile set, falling back to 1 default profile: "default"
2024-08-09T15:14:15.008Z  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
2024-08-09T15:14:15.012Z  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JDBC repositories in DEFAULT mode.
2024-08-09T15:14:15.164Z  INFO 1 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data JDBC - Could not safely identify store assignment for repository candidate interface com.db.portal.admin.block_reaggregation.repository.admin_news.AdminNewsRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
2024-08-09T15:14:15.168Z  INFO 1 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data JDBC - Could not safely identify store assignment for repository candidate interface com.db.portal.admin.block_reaggregation.repository.admin_month_lock_status.AdminMonthLockStatusRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
2024-08-09T15:14:15.171Z  INFO 1 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data JDBC - Could not safely identify store assignment for repository candidate interface com.db.portal.admin.block_reaggregation.repository.admin_business_calendar.AdminBusinessCalendarRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
2024-08-09T15:14:15.174Z  INFO 1 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data JDBC - Could not safely identify store assignment for repository candidate interface com.db.portal.admin.block_reaggregation.repository.admin_permission.AdminPermissionRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
2024-08-09T15:14:15.177Z  INFO 1 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data JDBC - Could not safely identify store assignment for repository candidate interface com.db.portal.data_uploader.repository.file_permission.FilePermissionRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
2024-08-09T15:14:15.181Z  INFO 1 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data JDBC - Could not safely identify store assignment for repository candidate interface com.db.portal.data_uploader.repository.file_distribution.FileDistributionRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
2024-08-09T15:14:15.184Z  INFO 1 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data JDBC - Could not safely identify store assignment for repository candidate interface com.db.portal.data_uploader.repository.file_status.FileStatusRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
2024-08-09T15:14:15.187Z  INFO 1 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data JDBC - Could not safely identify store assignment for repository candidate interface com.db.portal.data_uploader.repository.file_category.FileCategoryRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
2024-08-09T15:14:15.191Z  INFO 1 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data JDBC - Could not safely identify store assignment for repository candidate interface com.db.portal.data_uploader.repository.file_upload.FileUploadRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
2024-08-09T15:14:15.194Z  INFO 1 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data JDBC - Could not safely identify store assignment for repository candidate interface com.db.portal.shared.repository.vw_entl_user_role.VwEntlUserRoleRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
2024-08-09T15:14:15.196Z  INFO 1 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data JDBC - Could not safely identify store assignment for repository candidate interface com.db.portal.shared.repository.file_location.FileLocationRepository; If you want this repository to be a JDBC repository, consider annotating your entities with one of these annotations: org.springframework.data.relational.core.mapping.Table.
2024-08-09T15:14:15.197Z  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 175 ms. Found 0 JDBC repository interfaces.
2024-08-09T15:14:15.222Z  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
2024-08-09T15:14:15.226Z  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2024-08-09T15:14:15.420Z  INFO 1 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 183 ms. Found 11 JPA repository interfaces.
2024-08-09T15:14:16.469Z  INFO 1 --- [           main] ptablePropertiesBeanFactoryPostProcessor : Post-processing PropertySource instances
2024-08-09T15:14:16.471Z  INFO 1 --- [           main] c.u.j.EncryptablePropertySourceConverter : Skipping PropertySource configurationProperties [class org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource
2024-08-09T15:14:16.474Z  INFO 1 --- [           main] c.u.j.EncryptablePropertySourceConverter : Skipping PropertySource servletConfigInitParams [class org.springframework.core.env.PropertySource$StubPropertySource
2024-08-09T15:14:16.474Z  INFO 1 --- [           main] c.u.j.EncryptablePropertySourceConverter : Skipping PropertySource servletContextInitParams [class org.springframework.core.env.PropertySource$StubPropertySource
2024-08-09T15:14:16.476Z  INFO 1 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource systemProperties [org.springframework.core.env.PropertiesPropertySource] to EncryptableMapPropertySourceWrapper
2024-08-09T15:14:16.477Z  INFO 1 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableSystemEnvironmentPropertySourceWrapper
2024-08-09T15:14:16.477Z  INFO 1 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper
2024-08-09T15:14:16.477Z  INFO 1 --- [           main] c.u.j.EncryptablePropertySourceConverter : Converting PropertySource Config resource 'file [/opt/pulse/application.yaml]' via location 'file:/opt/pulse/application.yaml' [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper
2024-08-09T15:14:17.505Z  INFO 1 --- [           main] c.u.j.filter.DefaultLazyPropertyFilter   : Property Filter custom Bean not found with name 'encryptablePropertyFilter'. Initializing Default Property Filter
2024-08-09T15:14:17.535Z  INFO 1 --- [           main] c.u.j.r.DefaultLazyPropertyResolver      : Property Resolver custom Bean not found with name 'encryptablePropertyResolver'. Initializing Default Property Resolver
2024-08-09T15:14:17.542Z  INFO 1 --- [           main] c.u.j.d.DefaultLazyPropertyDetector      : Property Detector custom Bean not found with name 'encryptablePropertyDetector'. Initializing Default Property Detector
2024-08-09T15:14:18.004Z  INFO 1 --- [           main] c.d.p.s.c.JasyptConfiguration            : Jasypt encryptor was successfully configured.
2024-08-09T15:14:18.013Z  INFO 1 --- [           main] c.u.j.encryptor.DefaultLazyEncryptor     : Found Custom Encryptor Bean org.jasypt.encryption.pbe.PooledPBEStringEncryptor@6f099cef with name: encryptorBean
2024-08-09T15:14:18.259Z  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server
2024-08-09T15:14:18.318Z  INFO 1 --- [           main] .s.b.a.l.ConditionEvaluationReportLogger :

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-08-09T15:14:18.358Z ERROR 1 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to bind properties under 'server.ssl.key-store-password' to java.lang.String:

    Reason: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'server.ssl.key-store-password' to java.lang.String

Action:

Update your application's configuration
Leave a Comment