Bea Weblogic - Oracle JDBC Connection failed - java

I am creating a simple JDBC connection data source from Bea Weblogic console, using my mac OS X Macbook (Yosemite). Something does not work.
I'm using the following parameters:
Driver Name: oracle.jdbc.OracleDriver
URL: jdbc:oracle:thin:#anagrafe:1521:MY_SERVICE_NAME
USERNAME and PASSWORD Are right.
Trying to connect from the jDeveloper IDE, using the same parameters, everything is ok, but doing the connection from Bea WebLogic Server Administration Console 12c, running locally, I register the following connection:
<15-gen-2015 11.33.37 CET> <Error> <Console> <BEA-240003> <Administration Console encountered the following error:
java.sql.SQLRecoverableException: Errore di I/O: Invalid argument
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:816)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:793)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:614)
at weblogic.jdbc.common.internal.DataSourceUtil.testConnection0(DataSourceUtil.java:340)
at weblogic.jdbc.common.internal.DataSourceUtil.access$000(DataSourceUtil.java:22)
at weblogic.jdbc.common.internal.DataSourceUtil$1.run(DataSourceUtil.java:254)
at java.security.AccessController.doPrivileged(Native Method)
at weblogic.jdbc.common.internal.DataSourceUtil.testConnection(DataSourceUtil.java:251)
at com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:751)
at com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:479)
[...........]
Caused by: java.net.SocketException: Invalid argument
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at oracle.net.nt.MetricsEnabledInputStream.read(TcpNTAdapter.java:759)
at oracle.net.ns.Packet.receive(Packet.java:312)
at oracle.net.ns.NSProtocolStream.negotiateConnection(NSProtocolStream.java:168)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:275)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1606)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:539)
Looks like it cannot logon... Any Idea?
Tanks a lot, Davide.

Related

Deploy application fails on weblogic 12c

We have Java webservices application (SOAP) which developed with java 1.6 and deployed in weblogic 9 and it works fine ,Now we upgrade java 1.8 and weblogic 12c we are facing below errors
weblogic.application.ModuleException: java.net.ConnectException: Connection refused (Connection refused)
at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:212)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:207)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
Truncated. see log file for complete stacktrace
Caused By: java.net.ConnectException: Connection refused (Connection refused)
The the WebService application is using the wsdlLocation attribute for #WebServiceClient annotation.

Apache Nutch SolrIndexer error in SolrCloud mode

I have configured Apache Nutch 2.3.1 and crawled few websites. I have to index these documents to Solr (6.6.3) that is running in Cloud mode. When I execute solrindex command, I got following exception
2018-05-02 13:10:40,679 INFO [main] org.apache.hadoop.mapred.MapTask: Ignoring exception during close for org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector#3bd3d05e
java.io.IOException: org.apache.solr.client.solrj.SolrServerException: Server refused connection at: http://10.11.22.156:8983/solr/collection2
at org.apache.nutch.indexwriter.solr.SolrIndexWriter.close(SolrIndexWriter.java:103)
at org.apache.nutch.indexer.IndexWriters.close(IndexWriters.java:114)
at org.apache.nutch.indexer.IndexerOutputFormat$1.close(IndexerOutputFormat.java:54)
at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.close(MapTask.java:670)
at org.apache.hadoop.mapred.MapTask.closeQuietly(MapTask.java:2019)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:797)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1754)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: org.apache.solr.client.solrj.SolrServerException: Server refused connection at: http://10.11.22.156:8983/solr/collection2
at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:559)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:124)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:68)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:54)
at org.apache.nutch.indexwriter.solr.SolrIndexWriter.close(SolrIndexWriter.java:97)
... 11 more
Caused by: org.apache.http.conn.HttpHostConnectException: Connection to http://10.11.22.156:8983 refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:448)
... 17 more
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
Where is the problem? If I repeat the same job with solr without cloud mode, it works fines.
The error straight forward showing that you have an Apache Nutch server, which is unable to access this particular node and port of Apache Solr http://10.11.22.156:8983/solr/collection2.
You need access between these two servers to make them communicate with each other :
You need to provide outbound permission to solr server to do request response with Apache Nutch server.
Also, you need to provide inbound permission to Apache Nutch server to access the given solr IP and port.

Netbeans Debugging with Tomcat Connection Refused

I am using Netbeans 8.2 with the Java EE Base 1.31.1 and EJB and EAR 1.27.1 plugins installed. I installed Tomcat 9.0.4 and added it as a server to Netbeans. Netbeans can successfully start the tomcat server and launch my web app, but it will not debug. When I attempt to debug my webapp, I get the following error in my webapp log:
ant -f /Users/jryan/JDev/SVN/trunk/Java/CollaborationServer -Dnb.internal.action.name=debug -Ddirectory.deployment.supported=true -DforceRedeploy=false -Dnb.wait.for.caches=true -Dbrowser.context=/Users/jryan/JDev/SVN/trunk/Java/CollaborationServer debug
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
debug:
Stopping Tomcat process...
Waiting for Tomcat...
Tomcat server stopped.
Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
connect-debugger:
/Users/jryan/JDev/SVN/trunk/Java/CollaborationServer/nbproject/build-impl.xml:1206: The following error occurred while executing this line:
/Users/jryan/JDev/SVN/trunk/Java/CollaborationServer/nbproject/build-impl.xml:1216:
org.netbeans.api.debugger.jpda.DebuggerStartException: Connection refused (Connection refused)
at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.waitRunning(JPDADebuggerImpl.java:405)
at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.waitRunning(JPDADebuggerImpl.java:387)
at org.netbeans.api.debugger.jpda.JPDADebugger.attach(JPDADebugger.java:324)
at org.netbeans.modules.debugger.jpda.ant.JPDAConnect$1.run(JPDAConnect.java:235)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.sun.tools.jdi.SocketTransportService.attach(SocketTransportService.java:222)
at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:116)
at com.sun.tools.jdi.SocketAttachingConnector.attach(SocketAttachingConnector.java:90)
at org.netbeans.api.debugger.jpda.AttachingDICookie.getVirtualMachine(AttachingDICookie.java:231)
at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.doStartDebugger(StartActionProvider.java:188)
at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.access$200(StartActionProvider.java:80)
at org.netbeans.modules.debugger.jpda.actions.StartActionProvider$1.run(StartActionProvider.java:165)
... 4 more
BUILD FAILED (total time: 7 seconds)
The tomcat log says Listening for transport dt_socket at address: 8000
And the Netbeans Debugger Console says:
Attaching to localhost:8000
Connection refused.
Does anyone know what is happening here, and what I can do to fix it?
Thanks!
Perhaps try adding the flags detailed in this Answer.
This is how we currently do it.
Oops. It turns out that I had commented out the 127.0.0.1 localhost entry in my /etc/hosts file. When I re-enabled localhost, it worked fine! And as an aside, I thought I had to comment out the default localhost line because I had another line in there for a locally hosted site I was testing, but according to this answer, there's no need to do that!

Stop jboss 5.x from shell script

I am writing some small shell script utility which automates deployment process. I ready many links related to command for shutting down the jboss server in linux so that I can shutdown the server from my utility.
Read some links which will tell how to do it in jboss 7 or later but not in old jboss versions like 5.x. One such is
"$JBOSS_HOME/bin/jboss-cli.sh" --connect command=:shutdown
I want to shutdown the jboss 5.2 version from my shell script?
Edit: Jboss 5 version has shutdown.sh in the bin folder. But I am getting the below exception when I say
sh shutdown.sh -S
[john#mymachine bin]$ sh shutdown.sh -S
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1851)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:720)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.jboss.Shutdown.main(Shutdown.java:225)
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:362)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:287)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1821)
... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:332)
... 6 more
Caused by: java.net.ConnectException: Connection refused
Any idea ??
Regards
JBoss 5 has a shutdown.sh, from the docs:
usage: shutdown [options] <operation>
options:
-h, --help Show this help message (default)
-D<name>[=<value>] Set a system property
-- Stop processing options
-s, --server=<url> Specify the JNDI URL of the remote server
-n, --serverName=<url> Specify the JMX name of the ServerImpl
-a, --adapter=<name> Specify JNDI name of the MBeanServerConnection to use
-u, --user=<name> Specify the username for authentication
-p, --password=<name> Specify the password for authentication
operations:
-S, --shutdown Shutdown the server
-e, --exit=<code> Force the VM to exit with a status code
-H, --halt=<code> Force the VM to halt with a status code
I believe you should check your JBoss configuration and look for the JNP port. Probably you are running with a non default port and that's why you receive the connection refused exception.
Have a look at the file server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml.
Reference https://community.jboss.org/wiki/ConfigurePorts
If you have on ubuntu with default visual interface, open the "System Monitor", change to tab Process and filter by "jboss", it's will result in a java process, kill then.

Cassandra -- nodetool is not working on another machine?

I have a cassandra cluster on 4 nodes (each running ubuntu 10.04 and cassandra 0.7.4).
All nodes are connected using a SWITCH, and each is assigned a STATIC IP ADDRESS (no DNS is involved).
The node seems to be functioning properly (status is 'Normal', all nodes are up etc).
The problem is this: nodetool works, yet it only works when the nodetool command is run on the same node. When I try to run nodetool from STATIC_IP = 192.168.0.253 on STATIC_IP = 192.168.0.4 I get the following error:
(note: machine 's3789' has the static IP of 192.168.0.253)
user#s3789:/opt/cassandra/apache-cassandra-0.7.4$ bin/nodetool -host 192.168.0.4 ring
Error connection to remote JMX agent!
java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:128)
at javax.management.remote.rmi.RMIServerImpl_Stub.newClient(Unknown Source)
at javax.management.remote.rmi.RMIConnector.getConnection(RMIConnector.java:2343)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:296)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267)
at org.apache.cassandra.tools.NodeProbe.connect(NodeProbe.java:137)
at org.apache.cassandra.tools.NodeProbe.<init>(NodeProbe.java:107)
at org.apache.cassandra.tools.NodeCmd.main(NodeCmd.java:511)
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:546)
at java.net.Socket.connect(Socket.java:495)
at java.net.Socket.<init>(Socket.java:392)
at java.net.Socket.<init>(Socket.java:206)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:146)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
Any hints how to solve this?
from conf/cassandra-env.sh:
# add this if you're having trouble connecting:
# JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=<public name>"
#
# see
# https://blogs.oracle.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole
# for more on configuring JMX through firewalls, etc. (Short version:
# get it working with no firewall first.)
Check if you started rmiregistry before starting the server
rmiregistry &
Getting started with RMI

Categories