vmware-archive / lightwave

Identity services for traditional infrastructure, applications and containers.
Other
323 stars 100 forks source link

Error when deploying lightwaveui.war #21

Closed fjudith closed 6 years ago

fjudith commented 7 years ago

Hello,

I'm getting the following error message when executin systemctl restart vmware-stsd that prevent me to access https://lw-1.photon.com

09-May-2017 19:56:26.134 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /opt/vmware/vmware-sts/webapps/lightwaveui.war
09-May-2017 19:56:26.513 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/lightwaveui]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/lightwaveui] due to a StackOverflowError. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. The class hierarchy being processed was [org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector]
        at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2110)
        at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2054)
        at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2000)
        at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1970)
        at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1923)
        at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1163)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:775)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 10 more

09-May-2017 19:56:26.513 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive /opt/vmware/vmware-sts/webapps/lightwaveui.war
 java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/lightwaveui]]
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:756)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

09-May-2017 19:56:26.514 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /opt/vmware/vmware-sts/webapps/lightwaveui.war has finished in 380 ms

could you help me to solve this issue ?

vm.cpu 2 vm.memory 4096

snambakam commented 7 years ago

Could you please share some information about your setup? Is this off the develop or master branch?

tvs commented 7 years ago

Unless its appeared again, this should have been fixed in dev here: https://github.com/vmware/lightwave/commit/119c2cd16792985301c40e04f2acde560cc33618

Andrei also merged the fix over to the 1.2 branch here https://github.com/vmware/lightwave/commit/a23cf1124387a6de1970e01217e415db01dc1a81

The short version is that there were two different BouncyCastle jars in both the ROOT and LightwaveUI WARs that cause the cyclic inheritance (org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector):

[ /opt/vmware/vmware-sts/webapps/lightwaveui/WEB-INF/lib ]# ls -l | grep bc
-rw-r--r-- 1 root root  598674 Apr  7 19:49 bcpkix-jdk15on-1.50.jar
-rw-r--r-- 1 root root 1815677 Apr  7 19:50 bcprov-jdk15-1.46.jar
-rw-r--r-- 1 root root 2732684 Apr  7 19:49 bcprov-jdk15on-1.50.jar

A modern build and deployment of Lightwave shouldn't exhibit the problem, but if you're stuck with the older build, you can work around it by deleting bcprov-jdk15-1.46.jar and replacing xmltooling-1.3.3.jar with the 1.4.4 version (https://mvnrepository.com/artifact/org.opensaml/xmltooling/1.4.4) for both the ROOT and lightwaveui WAR files in their respective WEB-INF/lib folders.

fjudith commented 7 years ago

I'm running Lightwave as part of Photon Controller installer 1.2.