Getting Network error IOException in iReport during connection to MSSQL - jdbc

I'm getting an error while connecting to a MSSQL server in iReport designer on Ubuntu.
JDBC driver: jtds.JDBC
Is there anything I've missed?
Exception
Message:
java.sql.SQLException: Network error IOException: Malformed reply from SOCKS server
Level:
SEVERE
Stack Trace:
Network error IOException: Malformed reply from SOCKS server
net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:410)
net.sourceforge.jtds.jdbc.ConnectionJDBC3.(ConnectionJDBC3.java:50)
net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
com.jaspersoft.ireport.designer.connection.JDBCConnection.getConnection(JDBCConnection.java:140)
com.jaspersoft.ireport.designer.connection.JDBCConnection.test(JDBCConnection.java:447)

Answering my own question, The issue with proxy connection, Without proxy it works fine

Related

Can't connect to Oracle database from application

after restarting operating system (aix) I am not able to connect to locally installed oracle db from my application.
connected to sqlplus and executed startup command.
Select statements working fine from sqlplus. Should we start listener separately?
But the application fails with:
Error:
IO Error: The Network Adapter could not establish the connection
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150916-55dc7c3): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

Connection Reset Error on Weblogic

in my company i using Weblogic 10.3.6.0 on OEL 6.5 for connecting to a Oracle database in another location when i try to connect with weblogic to db i getting that error
Error encountered:
java.sql.SQLRecoverableException: IO Error: Connection reset
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:467)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at utils.dbping.main(dbping.java:204)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:167)
at oracle.net.ns.Packet.receive(Packet.java:300)
at oracle.net.ns.DataPacket.receive(DataPacket.java:106)
at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:315)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:260)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:185)
at oracle.net.ns.NetInputStream.read(NetInputStream.java:102)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124)
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80)
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137)
at oracle.jdbc.driver.T4C8TTIdty.receive(T4C8TTIdty.java:669)
at oracle.jdbc.driver.T4C8TTIdty.doRPC(T4C8TTIdty.java:578)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1166)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:322)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:94)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at utils.dbping.main(dbping.java:205)
so i change the SID to an invalid SID and get that error
Error encountered:
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:236)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at utils.dbping.main(dbping.java:204)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:395)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1102)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320)
... 7 more
from that i found my connection to database is OK
i try that from other servers in my company and Weblogic 12c with JDK 8 and get "Connection Reset" error again
i try in my local Weblogic on Windows OS and get success
So... What can i dooo
Can you please check a few things like :
is the connection successful from console when you try to test the
datasource?
is there any firewall restricting the connection between your DB and Weblogic server.
what is the driver that you are using for your production and is it
the same as of your windows PC?
is this happening everytime or is it an intermittent issue?
check the below thread for some more hints :
Oracle 11g connection reset error

Setting up a database in glassfish server 4.1

As specified in oracle documentation I'm trying to setup a database in glassfish server. my JDK version is 1.8 and the glassfish is 4.1. I'm using the ojdbc7.jar.
I've put the ojdbc into \glassfish\domains\domain1\lib\ext folder and re-started both server and the database. But when I try to ping, an error comes as:
Ping Connection Pool failed for TestPool. Connection could not be allocated because: IO Error: The Network Adapter could not establish the connection
in server.log I found:
2015-04-13T18:35:25.413+0530] [glassfish 4.1] [WARNING] [test.connection.pool.failed] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=45 _ThreadName=admin-listener(2)] [timeMillis: 1428930325413] [levelValue: 900] [[
RAR8054: Exception while creating an unpooled [test] connection for pool [ TestPool ], Connection could not be allocated because: IO Error: The Network Adapter could not establish the connection]]
But I can ping "Derby Pool" which is in glassfish by default successfully. I've setup all the Connection pool properties and JVM options as mentioned in the documents.
Can someone please help to setup this correctly?
Thanks in Advance.
The driver seems to have problems connecting to the oracle instance.
Make sure you can make the connection from the glassfish to the oracle server. Especially check the hostname / port (the default oracle portnumber is 1521).
Here's a snapshot of my setup:
But while trying to ping, I found these on server log:
RAR8054: Exception while creating an unpooled [test] connection for pool [ TEST ], Connection could not be allocated because: IO Error: The Network Adapter could not establish the connection]]
Is this due to a server error, because I'm using glassfish 4.1.

Grails plugins suddenly failing to download

My build machine just started reporting the following:
:::: ERRORS
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/grails/plugins/tomcat/7.0.50/tomcat-7.0.50-sources.jar
SERVER ERROR: Backend is unhealthy url=http://repo1.maven.org/maven2/org/grails/plugins/tomcat/7.0.50/tomcat-7.0.50-src.jar
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/grails/plugins/tomcat/7.0.50/tomcat-7.0.50-javadoc.jar
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/7.0.50/tomcat-embed-core-7.0.50.pom
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/apache/tomcat/embed/tomcat-embed-core/7.0.50/tomcat-embed-core-7.0.50.jar
SERVER ERROR: Backend is unhealthy url=http://repo1.maven.org/maven2/org/apache/tomcat/tomcat-catalina-ant/7.0.50/tomcat-catalina-ant-7.0.50.pom
SERVER ERROR: Backend is unhealthy url=http://repo1.maven.org/maven2/org/apache/tomcat/tomcat-catalina-ant/7.0.50/tomcat-catalina-ant-7.0.50.jar
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/apache/tomcat/embed/tomcat-embed-jasper/7.0.50/tomcat-embed-jasper-7.0.50.pom
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/apache/tomcat/embed/tomcat-embed-jasper/7.0.50/tomcat-embed-jasper-7.0.50.jar
SERVER ERROR: Backend is unhealthy url=http://repo1.maven.org/maven2/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.50/tomcat-embed-logging-log4j-7.0.50.pom
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/apache/tomcat/embed/tomcat-embed-logging-log4j/7.0.50/tomcat-embed-logging-log4j-7.0.50.jar
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/3.7.2/ecj-3.7.2.pom
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/3.7.2/ecj-3.7.2.jar
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/grails/plugins/release/2.2.1/release-2.2.1-sources.jar
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/grails/plugins/release/2.2.1/release-2.2.1-src.jar
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/grails/plugins/release/2.2.1/release-2.2.1-javadoc.jar
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.pom
SERVER ERROR: Backend is unhealthy url=http://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/grails/plugins/rest-client-builder/1.0.3/rest-client-builder-1.0.3-sources.jar
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/grails/plugins/rest-client-builder/1.0.3/rest-client-builder-1.0.3-src.jar
SERVER ERROR: Connection timed out url=http://repo1.maven.org/maven2/org/grails/plugins/rest-client-builder/1.0.3/rest-client-builder-1.0.3-javadoc.jar
I took those URLs and started to look for what happened. The server is reporting a 404 on those links. I remove parts of the path I find out that:
http://repo1.maven.org/maven2/org/grails/plugins/
This doesn't exist.
What gives? Is this a maven error or something to do with Grails? Are we experiencing an outage that will be fixed or is this something that I have to tell someone is broke?

VisualVM 1.32 doesn't connect to WAS (Websphere Application Server) 7.0.0.15

I'd be very pleased getting help from yours so many thanks in advance.
Can't manage to connect to a WAS server using VisualVM.
WAS properties setup:
Servers->Server types->WebSphere application servers->server1->Process
definition->Java Virtual Machine -> Properties JVM
-Djavax.management.builder.initial=
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.port=9999
WAS console output:
INFO [com.sun.tools.visualvm.jmx.impl.JmxModelImpl]:
connect(service:jmx:rmi:///jndi/rmi://:9999/jmxrmi)
java.io.EOFException: SSL peer shut down incorrectly
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:333)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
Caused: javax.net.ssl.SSLHandshakeException: Remote host closed
connection during handshake
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:817)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:632)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at java.io.DataOutputStream.flush(DataOutputStream.java:106)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:211)
Caused: java.rmi.ConnectIOException: error during JRMP connection
establishment; nested exception is:
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:286)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97)
Caused: javax.naming.CommunicationException [Root exception is
java.rmi.ConnectIOException: error during JRMP connection
establishment; nested exception is:
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake]
at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1886)
at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856)
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
Caused: java.io.IOException: Failed to retrieve RMIServer stub
at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:338)
at com.sun.tools.visualvm.jmx.impl.JmxModelImpl$ProxyClient.tryConnect(JmxModelImpl.java:496)
at com.sun.tools.visualvm.jmx.impl.JmxModelImpl$ProxyClient.connect(JmxModelImpl.java:440)
at com.sun.tools.visualvm.jmx.impl.JmxModelImpl.connect(JmxModelImpl.java:220)
at com.sun.tools.visualvm.jmx.impl.JmxModelImpl.(JmxModelImpl.java:209)
at com.sun.tools.visualvm.jmx.impl.JmxModelProvider.createModelFor(JmxModelProvider.java:61)
at com.sun.tools.visualvm.jmx.impl.JmxModelProvider.createModelFor(JmxModelProvider.java:42)
at com.sun.tools.visualvm.core.model.ModelFactory.getModel(ModelFactory.java:111)
at com.sun.tools.visualvm.tools.jmx.JmxModelFactory.getJmxModelFor(JmxModelFactory.java:69)
at com.sun.tools.visualvm.jmx.impl.JmxApplicationProvider.addJmxApplication(JmxApplicationProvider.java:267)
at com.sun.tools.visualvm.jmx.impl.JmxApplicationProvider.createJmxApplication(JmxApplicationProvider.java:185)
at com.sun.tools.visualvm.jmx.JmxApplicationsSupport.createJmxApplicationImpl(JmxApplicationsSupport.java:286)
at com.sun.tools.visualvm.jmx.JmxApplicationsSupport.createJmxApplicationInteractive(JmxApplicationsSupport.java:263)
[catch] at
com.sun.tools.visualvm.jmx.impl.AddJMXConnectionAction$1.run(AddJMXConnectionAction.java:80)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
Thank you a lot again.
Regards.
Good morning.
Well,we've discovered the solution,kinda easy indeed.
The propertie -Djava.rmi.server.hostname=hostname was pointing to localhost instead of ip.
I Hope this info be usefull to someone more.
Thank you very much.
Regards.

Resources