Unable to connect to Oracle database from Weblogic server - oracle12c

I installed Oracle 12c database server created the database using DBCA on RedHat Enterprise Linux 7. I can connect to the database using sqldeveloper on windows 7. I configured SSH Tunnel in putty. I start a putty session by logging to the RHEL 7 server. Then I start the sqldeveloper and login to the database. I have Weblogic 12c server installed on the same RHEL 7 machine and I am configuring a Generic Datasource to connect to the database on the same RHEL 7 machine and getting the following error:
Connection test failed.
Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:774)
oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:702)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:691)
weblogic.jdbc.common.internal.DataSourceUtil.testConnection0(DataSourceUtil.java:371)
weblogic.jdbc.common.internal.DataSourceUtil.access$000(DataSourceUtil.java:24)
weblogic.jdbc.common.internal.DataSourceUtil$1.run(DataSourceUtil.java:285)
java.security.AccessController.doPrivileged(Native Method)
weblogic.jdbc.common.internal.DataSourceUtil.testConnection(DataSourceUtil.java:282)
com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:937)
com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:524)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
...
I don't see tnsnames.ora, listener.ora and sqlnet.ora files under /network/admin folder. I heard from someone that if I am working on the server there is no need to have those files. I tried to create listener.ora and tnsnames.ora file to see if it resolves the error. But, that didn't help. If I have tnsnames or listener files, I see the failure to connect from my windows machine using sqldeveloper as well. Any help is greatly appreciated.
Thanks.

The issue was resolved by replacing the SID with service name in connect string in datasource configuration of weblogic

Related

Configure jvm monitoring for wildfly 21

I have recently upgraded wildfly from 11 to 21 version. I was using jvisualvm for jvm monitoring, but now when tried connecting to remote wildfly server via jvisualvm , getting error
I have followed following steps to configure wildfly on linux for remote monitoring
created a file named security.policy which contains the following:
grant codebase "file:/usr/lib/jvm/java-8-oracle/lib/tools.jar" {
permission java.security.AllPermission;
};
Now execute jstatd as follows:
/usr/lib/jvm/java-8-oracle/bin/jstatd -J-Djava.security.policy=security.policy &
Start WildFly, taking care to bind it to an IP address which can be reached from a remote machine:
standalone.bat -b ip-addr -bmanagement=ip-addr
Since we will need a management user to connect to this server, execute the add-user script and create a management user:
./add-user.sh
on starting wildfly getting following error:
Services with missing/unavailable dependencies" => ["jboss.remoting.remoting-http-upgrade-service.http-management is missing [jboss.http-upgrade-registry.http-management]"]
Tried following these steps as well, but same error
(open JMX through jconsole on Remote WildFly 21 server)
Can anyone help me with configuration to enable remote jvm monitoring for wildfly 21 server in linux

How to enforce SSL in keycloak with Azure PostgreSQL

I am trying to configure keycloak to run with PostgreSQL (using Azure Database for PostgreSQL) using a docker container. I was able to do this as instructed in the keycloak documentation here.
The problem that I am facing is, Azure Database for PostgreSQL has this option "Enforce SSL connection" set to "Enable" by default and the keycloak server is not working with that. It throws following error at the server startup.
ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 49) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./auth:
Caused by: org.postgresql.util.PSQLException: FATAL: SSL connection is required. Please specify SSL options and retry.
If the option "Enforce SSL connection" is disabled it worked fine.
I would like to know how to specify this option to work with keycloak.
I am using a custom Dockerfile to download and boot keycloak server and passing the data-source parameters as environmental variables with the docker run command. I have tried this approach which worked fine when I point it to my PostgreSQL data-source without any modifications. But when I change it to be compatible with my own Dockerfile it gives the same error.
Thanks in advance.
so here's what I did.
I overlooked the latest Dockerfile shared by jboss (which is available here) and adopted the lines that I needed with the version of my requirement. Earlier I was trying to add postgreSQL configuration by my own as keycloak document was suggesting. Since it is now supported out of the box I changed my Dockerfile to be compatible with jboss Dockerfile for keycloak.
Also I introduced new env. variable to enforce SSL connection by stating ssl=true as guided here
FATAL: SSL connection is required. Please specify SSL options and retry.
I've seen this happen when the client IP address isn't included in the firewall rules on the PostgreSQL server. Try confirming the firewall is open for your IP in the Connection Security page in the portal or in the Azure CLI using az postgres server firewall-rule list --resource-group --server-name

Could'nt connect to jboss fuse server to create a fabric in shell tab

I have installed JBOSS developer studio 8.1.0 and also I have installed Jboss developer stack integration plugins for JBOSS FUSE developement.
Here the problem arises.To access the JBOSS fuse console I have to create a user in shell tab by connecting the FUSE SERVER.But whenever I enter the server credentials,it displays as SSH client error(Error connecting to the local host).can connect to the JBOSS FUSE console,but to access it I have to create a user name and password in shell tab.
ERROR:
Error connecting jboss.4iapps.local:8101 : SSH client error: SSH_MSG_DISCONNECT: 2 Session has timed out waiting for authentication after 120000 ms.
NOTE:I have already uncommented the admin user from the user.properties file and also chaned the IP in org.apache.karaf.management file.
Please help me regarding this.
Regards,
Janaarthanan

IPython Notebook WebSocket connection failed

With Chrome/Firefox and IPython 1.1 under Windows 7 64bit I've got the error "WebSocket connection failed" on opening an existing IPython notebook if using automatic proxy configuration (with authentication) though the configuration file contains exception for localhost.
I poked a little bit around in Chrome (30) and found in the Javascript console (F12):
Kernel started: aec48410-068f-424f-8fc1-8fd229409e70 kernel.js:110
Starting WebSockets: ws://127.0.0.1:8888/kernels/aec48410-068f-424f-8fc1-8fd229409e70 kernel.js:143
WebSocket connection to 'ws://127.0.0.1:8888/kernels/aec48410-068f-424f-8fc1-8fd229409e70/iopub' failed: WebSocket is closed before the connection is established.
WebSocket connection to 'ws://127.0.0.1:8888/kernels/aec48410-068f-424f-8fc1-8fd229409e70/stdin' failed: WebSocket is closed before the connection is established.
WebSocket connection failed: ws://127.0.0.1:8888/kernels/aec48410-068f-424f-8fc1-8fd229409e70
Obviously the websocket server has been started and it is the right adress (same as output of ipython-notebook)
Any ideas? Thanks!
It is about proxy configuration: We have a proxy that needs authentication and it is normally automatically configured by a central configuration file.
In this file there is an exception for localhost but for some reason this does not work.
Manually configuring the proxy with authentication and adding localhost as an exception did the job. And that was the difference between Firefox and Chrome - I forgot that I configured them differently.
happened same with me. When I installed tensorflowjs, it downgraded my prompt-toolkit version to 1.0.14. To solve this issue just upgrade prompt-toolkit version to 3.0.5 by running the following code in your command prompt:
pip install prompt-toolkit==3.0.5
I ran into websocket closed/connection issues and zmq message arrived on closed channel when running jupyter notebook and jupyter lab. The issue was caused by running the xpython kernel. When I switched back to python3, all was good.

I'm getting error 'install_driver(Oracle) failed: Attempt to reload DBD/Oracle.pm aborted. Compilation failed in require at (eval 85) line 3

I've checked evrything using bugzilla. it says ok. but still not getting script running. The server I'm trying to connect is suse Linux. Oracle 10g server. I'm running cgi script on Windows x86 PC.
Thanks in advance.
i assume you have oracle driver installed on the windows machine and that the env parameters in windows is setup properly for oracle_home, tns_admin and that normal net8 capibilities all work to connect to oracle without perl first via sqlplus from the oracle driver/instant client. If not install either oracle instant client or oracle full client install. Then configure your oracle client to properly connect to the db and test that its working.