IllegalStateException: 403 error on Sonarcube via VPN - sonarqube

Sonarcube server is behind our company VPN server. If I connect to VPN, I can access sonar in browser without any issues. But while connecting from sonarCLI or IntelliJ plugin getting the following error
Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42)
at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
... 155 more
Caused by: java.lang.IllegalStateException: Status returned by url [https://sonarqube.ourtesco.com/batch/index] is not valid: [403]
at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:118)
at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)
at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39)
... 158 more

Adding a proxy while connecting to the server solved the issue.

Related

Trying java client for secure connection with Kerberose on CDP 7.1

Trying java client for secure connection with Kerberose on CDP 7.1 but it is failing to connect.
can someone one help with this error.
Caused by: java.io.IOException: java.lang.RuntimeException: Found no valid authentication method from options
at org.apache.hadoop.hbase.ipc.IPCUtil.toIOE(IPCUtil.java:154)
... 13 more
Caused by: java.lang.RuntimeException: Found no valid authentication method from options
at org.apache.hadoop.hbase.ipc.RpcConnection.<init>(RpcConnection.java:112)
at org.apache.hadoop.hbase.ipc.NettyRpcConnection.<init>(NettyRpcConnection.java:89)
at org.apache.hadoop.hbase.ipc.NettyRpcClient.createConnection(NettyRpcClient.java:74)
at org.apache.hadoop.hbase.ipc.NettyRpcClient.createConnection(NettyRpcClient.java:40)
at org.apache.hadoop.hbase.ipc.AbstractRpcClient.getConnection(AbstractRpcClient.java:350)
at org.apache.hadoop.hbase.ipc.AbstractRpcClient.callMethod(AbstractRpcClient.java:419)
... 12 more

Spring boot enable Https : SSL Keystore Error

I am trying to enable https in my spring boot application but getting 'Keystore was tampered with, or password was incorrect' error. Following are the below configuration i have in my application properties file.
server.port=8083
server.ssl.enabled=true
server.ssl.key-store-type=JKS
server.ssl.key-store=C:\\Users\\abc.jks
server.ssl.key-store-password=C:\\Users\\password.txt
However when i am using TomcatServletWebServerFactory to redirect http to https with the below configuration in application properties it works fine without any issue. application starts on http 8081 and https 8083 ports.
server.port=8083
http.server.port= 8081
server.ssl.enabled=true
server.ssl.key-store-type=JKS
server.ssl.key-store=C:\\Users\\abc.jks
server.ssl.key-store-password=C:\\Users\\password.txt
I am not able to find root cause and resolve the issue. Please help me to find out what i am doing wrong.
**Spring boot : 2.3.2.RELEASE
tomcat-embed-core-9.0.37.jar:9.0.37
jdk1.8.0_111**
Below is the error.
[AsyncReporter{org.springframework.cloud.sleuth.zipkin2.sender.RestTemplateSender#355ce6a6}] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
Caused by: java.lang.IllegalArgumentException: standardService.connector.startFailed
Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed
Caused by: java.lang.IllegalArgumentException: Keystore was tampered with, or password was incorrect
Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect
Caused by: java.security.UnrecoverableKeyException: Password verification failed
You are missing key password.
server.ssl.key-password=yourpasswordhere

Access denied reading java.util.Permissions

we are using websphere 17 for a web application based on eclipse-link as persistence layer. Application works fine but after a while (during user activity) we got this kind of error that forces us to restart of server.
org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Access denied ("java.util.PropertyPermission" "oracle.jdbc.sqlTranslationProfile" "read")
Error Code: 0
what is the meaning of this error ?
From what I understood this error happens because there is no reading access to that property. But this could be due to security manager. Problem is I would expect any security manager set by websphere and for sure we are not creating any custom security manager. Security manager should not exist at all in our application. So, who is setting it ? Or am I missing something ?
Following is the full stacktrace:
Internal Exception: java.sql.SQLException: Access denied ("java.util.PropertyPermission" "oracle.jdbc.sqlTranslationProfile" "read")
Error Code: 0
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:316)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:147)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.setOrDetectDatasource(DatabaseSessionImpl.java:207)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:760)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:265)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:731)
... 83 common frames omitted
Caused by: java.sql.SQLException: Access denied ("java.util.PropertyPermission" "oracle.jdbc.sqlTranslationProfile" "read")
at com.ibm.ws.rsadapter.AdapterUtil.toSQLException(AdapterUtil.java:822)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:152)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:116)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
... 88 common frames omitted
Caused by: javax.resource.spi.ResourceAllocationException: Access denied ("java.util.PropertyPermission" "oracle.jdbc.sqlTranslationProfile" "read")
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1576)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1228)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:1434)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:573)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:309)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:143)
... 90 common frames omitted
Caused by: java.security.AccessControlException: Access denied ("java.util.PropertyPermission" "oracle.jdbc.sqlTranslationProfile" "read")
at java.security.AccessController.throwACE(AccessController.java:176)
at java.security.AccessController.checkPermissionHelper(AccessController.java:237)
at java.security.AccessController.checkPermission(AccessController.java:373)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1307)
at java.lang.System.getProperty(System.java:456)
at oracle.jdbc.driver.GeneratedPhysicalConnection$1.run(GeneratedPhysicalConnection.java:84)
at java.security.AccessController.doPrivileged(AccessController.java:640)
at oracle.jdbc.driver.GeneratedPhysicalConnection.getSystemProperty(GeneratedPhysicalConnection.java:82)
at oracle.jdbc.driver.GeneratedPhysicalConnection.getSystemPropertySqlTranslationProfile(GeneratedPhysicalConnection.java:46)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:555)
at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:317)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:241)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:164)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:102)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:79)
at com.ibm.ws.rsadapter.impl.DatabaseHelper$1.run(DatabaseHelper.java:949)
at java.security.AccessController.doPrivileged(AccessController.java:696)
at com.ibm.ws.rsadapter.impl.DatabaseHelper.getPooledConnection(DatabaseHelper.java:958)
at com.ibm.ws.rsadapter.impl.WSManagedConnectionFactoryImpl.getConnection(WSManagedConnectionFactoryImpl.java:810)
at com.ibm.ws.rsadapter.impl.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:656)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1354)
... 95 common frames omitted
thanks for any help,
The websphere.java.security property in bootstrap.properties controls whether Java 2 Security is enabled in Liberty.
When running with Java 2 Security enabled, here is an example server config snippet (for server.xml file) of how to grant permission for the oracle JDBC driver to read System properties that begin with "oracle.jdbc.",
<javaPermission codebase="C:/drivers/oracle/ojdbc7.jar" className="java.util.PropertyPermission" actions="read" name="oracle.jdbc.*"/>

Not able to access rabbitMQ installed in docker

I have installed rabbit MQ in docker, my host machine OS is windows. Now I am not able to access rabbit mq instance present in my docker but others can access the same using my Ip address. While trying to connect using spring boot amqp I am getting error
org.springframework.amqp.AmqpIOException: java.io.IOException .....
Caused by: java.io.IOException: null .....
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error....
Caused by: java.net.SocketException: Connection reset.....

RuntimeMBeanCallable.call() exception

When a .wlapp file is deployed in MobileFirst Console, we get the following error in the logs. This happened after we upgraded MobileFirst Server from 6.3 to 7, but don't know if this is related to the version of MobileFirst.
000001c6 BaseTransacti E RuntimeMBeanCallable.call() exception
java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy166.deployApplication(Unknown Source)
at com.ibm.worklight.admin.actions.ApplicationDeploymentTransaction.prepareMBean(ApplicationDeploymentTransaction.java:919)
at com.ibm.worklight.admin.actions.util.RuntimeMBeanWorkerThreadCaller$RuntimeMBeanCallable.call(RuntimeMBeanWorkerThreadCaller.java:76)
at com.ibm.worklight.admin.actions.util.RuntimeMBeanWorkerThreadCaller.callSynchronously(RuntimeMBeanWorkerThreadCaller.java:183)
at com.ibm.worklight.admin.actions.util.RuntimeMBeanPoolCaller.callRuntimeMBeans(RuntimeMBeanPoolCaller.java:91)
at com.ibm.worklight.admin.actions.BaseTransaction.prepare(BaseTransaction.java:450)
at com.ibm.worklight.admin.actions.BaseTransaction.internalRun(BaseTransaction.java:348)
at com.ibm.worklight.admin.actions.BaseTransaction$1.run(BaseTransaction.java:235)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:790)
Caused by: com.ibm.websphere.management.exception.ConnectorException: ADMC0009E: The system failed to make the SOAP RPC call: invoke
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invokeTemplateOnce(SOAPConnectorClient.java:894)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invokeTemplate(SOAPConnectorClient.java:689)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invokeTemplate(SOAPConnectorClient.java:679)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invoke(SOAPConnectorClient.java:665)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invoke(SOAPConnectorClient.java:487)
at com.sun.proxy.$Proxy121.invoke(Unknown Source)
at com.ibm.ws.management.AdminClientImpl.invoke(AdminClientImpl.java:224)
at com.worklight.common.util.jmx.WASRuntimeMBeanHandler$AdminClientMBeanServerConnection.invoke(WASRuntimeMBeanHandler.java:521)
at com.sun.jmx.mbeanserver.MXBeanProxy$InvokeHandler.invoke(MXBeanProxy.java:146)
at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:160)
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:246)
... 11 more
Caused by: [SOAPException: faultCode=SOAP-ENV:Client; msg=Read timed out; targetException=java.net.SocketTimeoutException: Read timed out]
at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:479)
at org.apache.soap.rpc.Call.WASinvoke(Call.java:510)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient$8.run(SOAPConnectorClient.java:852)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.invokeTemplateOnce(SOAPConnectorClient.java:845)
... 21 more
MobileFirst version 7
WAS server version 8.5.5.5
JRE version 1.6
Re-deploying the MobileFirst artifacts to the application server should normally not be required as inspecting the logs and configuration usually will lead to the root cause of the problem. However in some cases starting over to get things right will work.
As mentioned in the comments, re-deployment of the server artifacts nullified the issue that was experienced.

Resources