Windows authentication fails to connect after Java update - java

We have an application which front end is on running on Tomcat 8.5, IIS 8.5 configured with isapi redirect. Everthing is working fine with java 8.92. But after upgrading Java to 8.211 windows authentication fails to connect with error
SOAP Fault occurred: Fault string, and possibly fault code, not set
Is there any configuration needs to be changed after Java update?
EDIT:
We have recreated Tomcat services after Java update. And if we enabe Anonymous Authentication in IIS everything works fine. But when only Windows Authentication is enabled in IIS we got that authentication failed error. There is only one error in logs
SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[HTTP/1.1-1443]]
org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:995)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:552)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:848)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.startup.Catalina.load(Catalina.java:639)
at org.apache.catalina.startup.Catalina.load(Catalina.java:662)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: java.lang.IllegalArgumentException
at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:100)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:72)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:244)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1118)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:223)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:581)
at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:70)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:993)
... 13 more
Caused by: java.io.IOException
at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:301)
at org.apache.tomcat.util.net.openssl.OpenSSLUtil.getKeyManagers(OpenSSLUtil.java:98)
at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:246)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:98)

Related

Read-only filesystem pod with Spring Boot application on Kubernetes

I have a Docker container with Spring Boot 3.0.0 application running in the Kubernetes Deployment.
I have received a number of hardening rules that are required to be implemented, such as:
do not mount emptyDir volumes to pods
define runAsNonRoot in securityContext of pods
pods must define, that their filesystem is mounted readonly using readOnlyRootFilesystem: true in securityContext
My application stores data in the database and does not need any write permissions to the filesystem, so I have tried to define securityContext in my Deployment using:
securityContext:
runAsNonRoot: true
readOnlyRootFilesystem: true
However, running the Deployment failed, and it seems that the Spring Boot is trying to create some temporary directory, which of course is not allowed:
[2023-02-01 15:12:31.762] ERROR [main] [org.springframework.boot.SpringApplication - 820]: Application run failed
org.springframework.context.ApplicationContextException: Unable to start web server
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:164)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:578)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:95)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
Caused by: org.springframework.boot.web.server.WebServerException: Unable to create tempDir. java.io.tmpdir is set to /tmp
at org.springframework.boot.web.server.AbstractConfigurableWebServerFactory.createTempDir(AbstractConfigurableWebServerFactory.java:208)
at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:194)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:183)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:161)
... 16 common frames omitted
Caused by: java.nio.file.FileSystemException: /tmp/tomcat.8080.8311954706877871713: Read-only file system
at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(Unknown Source)
at java.base/java.nio.file.Files.createDirectory(Unknown Source)
at java.base/java.nio.file.TempFileHelper.create(Unknown Source)
at java.base/java.nio.file.TempFileHelper.createTempDirectory(Unknown Source)
at java.base/java.nio.file.Files.createTempDirectory(Unknown Source)
at org.springframework.boot.web.server.AbstractConfigurableWebServerFactory.createTempDir(AbstractConfigurableWebServerFactory.java:202)
... 19 common frames omitted
I was trying to find some relevant information on the web and this tells me that read-only containers are not supported in Spring Boot: https://github.com/spring-projects/spring-boot/issues/8578.
There are some proposed solutions, which I cannot apply, for example to use emptyDir mount, or pvc. It does not make sense for me to mount something just because Spring Boot needs to create temporary directory.
Does anyone has experience with that and can suggest a good solution how to create Deployment with Spring Boot pod that works when readOnlyRootFilesystem: true?

com.bea.wli.monitoring.MonitoringException: Caused by: java.lang.IllegalArgumentException: Server 'null' not found

I have java code that uses Java Management Extensions (JMX) monitoring API to get service statistics data from oracle weblogic console.
I have a production server and a testing server.
this java code works fine and gets service statistics data from weblogic console of testing server. when i run this code for production server it shows the below error :
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.getProxyServiceStatistics(Unknown Source)
at reports.All_ServiceStatisticsReport.getProxyServiceDetails(All_ServiceStatisticsReport.java:235)
at reports.All_ServiceStatisticsReport.<init>(All_ServiceStatisticsReport.java:189)
at reports.All_ServiceStatisticsReport.main(All_ServiceStatisticsReport.java:567)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at reports.All_ServiceStatisticsReport$ServiceDomainMBeanInvocationHandler.invoke(All_ServiceStatisticsReport.java:145)
... 4 more
Caused by: com.bea.wli.monitoring.MonitoringException: [OSB-473057]Failed to get statistics for services due to java.lang.IllegalArgumentException: Server 'null' not found
at weblogic.utils.StackTraceDisabled.unknownMethod()
Caused by: java.lang.IllegalArgumentException: Server 'null' not found
... 1 more
Process exited with exit code 0.
the line where the error occurs is :
proxyServiceResourceStatisticMap = serviceDomainMbean.getProxyServiceStatistics(filteredProxyServiceRefs,resourceType.value(),null);
I am passing all the right arguments according to the oracle docs.
https://docs.oracle.com/middleware/1213/osb/java-api/com/bea/wli/monitoring/ServiceDomainMBean.html
then why i am getting this error.
thanks in advance.

WAS8.5.5 not incorporating Jacorb application

I had an application which is tightly coupled with jacorb and it is working great with Jboss. Now, i have to migrate this application to deploy the same in Websphere 8.5.5. General flow is , my application will reach another system (developed in C++) through corba usign jacorb. since IBM is having its own ORB implementations, My application is getting deployed in websphere. If my application is modified to make use of IBM orb jars, then 80% of applciation have to change. Kindly suggest me the way to include jacord proeprties and jar to resolve the errors.
My trails : All trails are independent to each other.
1) Kept my orb.properties, jacorb.jar and removed IBM orb.properties in WAS->JAVA->JRE->lib
2) Included my files in JVM classpath through Admin console.(Server failed to start after this change).
3) Modified the IBM orb.properties with jacorb properties but getting classcast exceptions.
Errors:
[3/4/15 0:52:23:175 PST] 00000001 ContainerHelp E WSVR0501E: Error creating component null [class com.ibm.ws.runtime.component.ORBImpl]java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:877)
at org.jacorb.config.JacORBConfiguration.setAttribute(Unknown Source)
at org.jacorb.config.JacORBConfiguration.setAttributes(Unknown Source)
at org.jacorb.config.JacORBConfiguration.init(Unknown Source)
at org.jacorb.config.JacORBConfiguration.<init>(Unknown Source)
at org.jacorb.config.JacORBConfiguration.getConfiguration(Unknown Source)
at org.jacorb.orb.ORB.set_parameters(Unknown Source)
at org.omg.CORBA.ORB.init(ORB.java:371)
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
[3/4/15 0:52:23:347 PST] 00000001 ContainerHelp E WSVR0501E: Error creating component com.ibm.ws.naming.bootstrap.NameServerImpl#e69374e2[_serverProcessType=UnManagedProcess, _listener=null,
Caused by: javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.reflect.InvocationTargetException]
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:400)
at com.ibm.ws.naming.urlbase.UrlContextImpl.<init>(UrlContextImpl.java:177)
at com.ibm.ws.naming.urlns.genericURLContext.<init>(genericURLContext.java:83)
at com.ibm.ws.naming.urlns.genericURLContextRoot.<init>(genericURLContextRoot.java:79)
at com.ibm.ws.naming.urlns.genericURLContextFactory.createURLContextRoot(genericURLContextFactory.java:110)
... 51 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:391)
... 55 more
Caused by: java.lang.ClassCastException: org.jacorb.orb.ORB incompatible with com.ibm.CORBA.iiop.ORB
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
at
Thanks for your support in advance.

Cannot get Mule ESB - Studio Artifacts

I am trying to test a database connection in Mule Studio 3.4. I keep getting errors and I keep noticing this particular error in the error log. What is this trying to tell me? The connection to the database keeps failing and I am not sure what is wrong. I am new to mule and not that experienced with java and spring. Any help is appreciated.
Below is the stack trace for the error.
org.mule.common.MuleArtifactFactoryException: Error initializing
at org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.doGetArtifact(SpringXmlConfigurationMuleArtifactFactory.java:149)
at org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.getArtifact(SpringXmlConfigurationMuleArtifactFactory.java:49)
at org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.getArtifact(SpringXmlConfigurationMuleArtifactFactory.java:39)
at org.mule.tooling.metadata.api.utils.ConnectionTester.internalTestConnection(ConnectionTester.java:58)
at org.mule.tooling.metadata.api.utils.ConnectionTester.testConnectionFor(ConnectionTester.java:92)
at org.mule.tooling.messageflow.action.TestConnectorConnectionFromMuleConfigAction$1$1.run(TestConnectorConnectionFromMuleConfigAction.java:65)
at java.lang.Thread.run(Unknown Source)
Caused by: org.mule.retry.RetryPolicyExhaustedException: Error trying to load driver: ${osas-jdbc.classname} : ${osas-jdbc.classname} (java.sql.SQLException)
at org.mule.retry.policies.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:105)
at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1616)
at org.mule.transport.AbstractConnector.start(AbstractConnector.java:428)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225)
at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276)
at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155)
at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126)
at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80)
at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120)
at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94)
at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90)
at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72)
at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64)
at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:255)
at org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.doGetArtifact(SpringXmlConfigurationMuleArtifactFactory.java:130)
... 6 more
Caused by: org.mule.transport.ConnectException: Error trying to load driver: ${osas-jdbc.classname} : ${osas-jdbc.classname} (java.sql.SQLException)
at org.mule.transport.jdbc.JdbcConnector.getConnection(JdbcConnector.java:258)
at org.mule.transport.jdbc.JdbcConnector.doConnect(JdbcConnector.java:377)
at org.mule.transport.AbstractConnector$5.doWork(AbstractConnector.java:1556)
at org.mule.retry.policies.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:67)
... 24 more
Caused by: java.sql.SQLException: Error trying to load driver: ${osas-jdbc.classname} : ${osas-jdbc.classname}
at org.enhydra.jdbc.standard.StandardDataSource.getConnection(StandardDataSource.java:184)
at org.enhydra.jdbc.standard.StandardDataSource.getConnection(StandardDataSource.java:144)
at org.mule.transport.jdbc.JdbcConnector.getConnection(JdbcConnector.java:254)
... 27 more
It's as if you haven't provided a value for ${osas-jdbc.classname} either by using Mule's properties loading mechanism (i.e. a file named mule-app.properties at the root of the classpath) or by using Spring's context:property-placeholder.

SSL using RSAL Toolkit not encapsulated by a jar Error

I'm running a 3rd party app which fails with the following stacktrace when trying to create a SSL connection to a server:
The root exception is this:
Caused by: java.lang.SecurityException: Toolkit not encapsulated by a jar.
at com.rsa.jcm.f.hq.a(Unknown Source)
at com.rsa.jcm.f.jg.b(Unknown Source)
at com.rsa.crypto.jcm.ModuleLoader.a(Unknown Source)
at com.rsa.crypto.jcm.ModuleLoader.load(Unknown Source)
... 43 more
Has anyone seen this occur when connecting over SSL that uses RSA? I've worked the google and there isn't anything obvious as to why this would happen.
This particular error happens on a Mac, and I've got a windows version of the same app which works correctly. Main difference being they bundle the JRE in the windows version, so I checked various security policies etc but there are no great differences in the JRE on windows vs the JRE on my mac.
The full stacktrace looks like this:
Caused by: java.lang.Error: Problem loading module.
at com.rsa.cryptoj.o.ju.g(Unknown Source)
at com.rsa.cryptoj.o.ju.c(Unknown Source)
at com.rsa.cryptoj.o.gd.a(Unknown Source)
at com.rsa.cryptoj.o.dm.b(Unknown Source)
at com.rsa.cryptoj.o.dm.<clinit>(Unknown Source)
at com.rsa.cryptoj.o.me.newInstance(Unknown Source)
at javax.crypto.Cipher.chooseProvider(Cipher.java:845)
at javax.crypto.Cipher.init(Cipher.java:1348)
at sun.security.ssl.CipherBox.<init>(CipherBox.java:175)
at sun.security.ssl.CipherBox.newCipherBox(CipherBox.java:208)
at sun.security.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:467)
at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:507)
at sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:485)
at sun.security.ssl.CipherSuite.isAvailable(CipherSuite.java:190)
at sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(SSLContextImpl.java:342)
at sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(SSLContextImpl.java:300)
at sun.security.ssl.SSLSocketImpl.init(SSLSocketImpl.java:576)
at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:512)
at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:73)
at com.somevendor.client.common.spring.remoting.http.e.createSocket(Unknown Source)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at com.somevendor.client.common.spring.remoting.http.SecureHttpInvokerRequestExecutor.executePostMethod(Unknown Source)
at org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor.doExecuteRequest(CommonsHttpInvokerRequestExecutor.java:140)
at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:136)
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:192)
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:174)
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:142)
... 7 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
... 39 more
Caused by: java.lang.SecurityException: Toolkit not encapsulated by a jar.
at com.rsa.jcm.f.hq.a(Unknown Source)
at com.rsa.jcm.f.jg.b(Unknown Source)
at com.rsa.crypto.jcm.ModuleLoader.a(Unknown Source)
at com.rsa.crypto.jcm.ModuleLoader.load(Unknown Source)
... 43 more
Answering as I worked it out (5 years ago..). This exception happens when there is whitespace in the fully qualified path to the jar file that is been executed.
So this works:
/Users/stringy05/app/app.jar
But if you use a path with a space:
/Volumes/Macintosh HD/Users/stringy05/app/app.jar
Then it fails. When this originally happened I had a soft link in /Users/stringy05 to another hard disk, so either java or the OS was resolving the link path to the real path and it would fail.

Categories