[MODLOGSAML-1] Add Docker build configuration to mod-login-saml Created: 29/Aug/17  Updated: 31/Aug/17  Resolved: 31/Aug/17

Status: Closed
Project: mod-login-saml
Components: None
Affects versions: None
Fix versions: 1.0.1

Type: Task Priority: P3
Reporter: Wayne Schneider Assignee: Wayne Schneider
Resolution: Done Votes: 0
Labels: ci
Remaining Estimate: Not Specified
Time Spent: 1 hour, 45 minutes
Original estimate: Not Specified

Issue links:
Blocks
blocks FOLIO-807 Add mod-login-saml to blackbox Closed
is blocked by MODLOGSAML-5 Unable to run fat jar Closed
Sprint:

 Comments   
Comment by Wayne Schneider [ 29/Aug/17 ]

Added Dockerfile and entrypoint script in branch MODLOGSAML-1 Closed . Fat JAR fails to execute with error:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
	at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:330)
	at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:263)
	at java.util.jar.JarVerifier.processEntry(JarVerifier.java:318)
	at java.util.jar.JarVerifier.update(JarVerifier.java:230)
	at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
	at java.util.jar.JarFile.getInputStream(JarFile.java:450)
	at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:977)
	at sun.misc.Resource.cachedInputStream(Resource.java:77)
	at sun.misc.Resource.getByteBuffer(Resource.java:160)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:454)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)

This error appears for me when I try to execute the fat JAR going back to commit c9c50786b3c8b12daa784b6d08bf377d2ce5598c

Comment by Wayne Schneider [ 30/Aug/17 ]

Manifest signature is fixed with commit 66b311bd71dfac1ac4f5e2ed2e86e419c586d4ec, but now we get this problem:

vagrant@vagrant:/vagrant$ java -jar target/mod-login-saml-fat.jar embed_postgres=true
The command 'run' is not a valid command.
See 'java -jar target/mod-login-saml-fat.jar --help'
Comment by Robert Sass [ 31/Aug/17 ]

It is working now.

docker run --rm -ti folioci/mod-login-saml
starting rest verticle service..........
11:18:06 INFO  Version              HV000001: Hibernate Validator 5.2.4.Final
Aug 31, 2017 11:18:06 AM org.folio.rest.tools.messages.Messages
INFO: Loading messages from /infra-messages/APIMessages_en.properties ................................
Aug 31, 2017 11:18:06 AM org.folio.rest.tools.messages.Messages
INFO: Loading messages from /infra-messages/APIMessages_de.properties ................................
Aug 31, 2017 11:18:06 AM org.folio.rest.RestVerticle
INFO: git: https://github.com/folio-org/raml-module-builder.git 216db5edad3b87989d86fd29be613abd1823ae77
no rules directory found, continuing...
11:18:06 WARN  AbstractKieModule    No files found for KieBase defaultKieBase
11:18:06 INFO  KieRepositoryImpl    KieModule was added: MemoryKieModule[releaseId=org.default:artifact:1.0.0-SNAPSHOT]
Aug 31, 2017 11:18:06 AM org.folio.rest.tools.utils.LogUtil
INFO: org.folio.rest.RestVerticle start metrics enabled: true
Mapping functions in org.folio.rest.jaxrs.resource.SamlResource class to appropriate urls
Mapping functions in org.folio.rest.jaxrs.resource.TenantResource class to appropriate urls
Mapping functions in org.folio.rest.jaxrs.resource.JobsResource class to appropriate urls
Mapping functions in org.folio.rest.jaxrs.resource.RmbtestsResource class to appropriate urls
Mapping functions in org.folio.rest.jaxrs.resource.AdminResource class to appropriate urls
^/saml
^/_/tenant
^/jobs
^/rmbtests
^/admin
Aug 31, 2017 11:18:07 AM org.folio.rest.RestVerticle
INFO: 1 verticles deployed
Aug 31, 2017 11:18:07 AM org.folio.rest.impl.ApiInitializer
INFO: Init...
Aug 31, 2017 11:18:07 AM org.folio.rest.impl.ApiInitializer
WARNING: Applying trustAllCertificates() to bypass HTTPS cert errors. This is needed by IdPs with self signed certificates. Do not use this in production!
Aug 31, 2017 11:18:07 AM org.folio.rest.RestVerticle
INFO: init succeeded.......
Aug 31, 2017 11:18:07 AM org.folio.rest.tools.utils.LogUtil
INFO: org.folio.rest.RestVerticle runPeriodicHook no periodic implementation found, continuing with deployment
11:18:07 WARN  Slf4JLogger          Failed to find a usable hardware address from the network interfaces; using random bytes: 55:7b:38:07:0b:2a:a7:b2
Aug 31, 2017 11:18:07 AM org.folio.rest.tools.utils.LogUtil
INFO: org.folio.rest.RestVerticle runHook One time hook called with implemented class named org.folio.rest.impl.ApiInitializer
Aug 31, 2017 11:18:07 AM org.folio.rest.tools.utils.LogUtil
INFO: org.folio.rest.RestVerticle runPostDeployHook no Post Deploy Hook implementation found, continuing with deployment
Aug 31, 2017 11:18:07 AM org.folio.rest.tools.utils.LogUtil
INFO: org.folio.rest.RestVerticle start http server for apis and docs started on port 8081.
Aug 31, 2017 11:18:07 AM org.folio.rest.tools.utils.LogUtil
INFO: org.folio.rest.RestVerticle start Documentation available at: http://localhost:8081/apidocs/
Aug 31, 2017 11:18:07 AM io.vertx.core.impl.launcher.commands.VertxIsolatedDeployer
INFO: Succeeded in deploying verticle
Generated at Thu Feb 08 23:08:32 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.