Netbeans can't start derby server - java

I've been trying to start the server but I get this error message:
2013-01-23 19:24:18.133 GMT : Security manager installed using the
Basic server security policy. 2013-01-23 19:24:18.430 GMT : Could not
listen on port 1527 on host localhost: java.net.BindException: Cannot
assign requested address: JVM_Bind
On top of that I get a prompt saying:
Unable to connect. Cannot establish a connection to
jdbc:derby://localhost:1527/sample using
org.apache.derby.jdbc.ClientDriver (java.net.SocketException : Error
connecting to server localhost on port 1527 with message Network is
unreachable: connect.).
How is one suppose to fix such an issue?

I had the same issue but my problem was I had my loopback (lo) network interface disabled... took me quite long to discover... (But most common would be another instance of derby already running I think)

Related

cant connect my driver to from eclipse to sql server [duplicate]

This question already has answers here:
JDBC connection failed, error: TCP/IP connection to host failed
(9 answers)
Closed 5 years ago.
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:191)
at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:242)
at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2369)
at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:551)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1963)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1628)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1459)
I'm facing this exception after I tried to connect with my driver through the new database profile.
The information I have was correct and the TCP port was enabled and the firewall was turned off.
I'm using Microsoft SQL server 2008 JDBC driver and I've added the jars.
A "connection refused" is rarely caused by the connecting client, i.e. the JDBC client within your Eclipse setup. A good check is to open a shell (e.g. cmd.exe on Windows) and do a
telnet [server name used in JDBC configuration] 1433
On newer Windows installations you need to install the telnet client because it's not part of the standard installation anymore (Settings -> Software -> Add/Remove Features).
If that leads to a similar error message you can focus your trouble shooting to the network part of your system, since the JDBC side is completely uninvolved. If you can connect, make sure that the server name resolves to the same IP when using the command prompt as it's resolved within Java (I once had this effect which took quite a time to find that out). Especially with localhost as server name one might resolve to 127.0.0.1 while the other resolvs to ::1.

How to resolve java.net.ConnectException: Connection refused

i am running my android application in device its not connecting to device.Its giving following error
[2016-10-24 19:41:00 - DeviceMonitor] Failed to start monitoring 127.0.0.1:5558
[2016-10-24 19:41:17 - Device] Error during Sync: Connection refused: connect
[2016-10-24 19:41:38 - Device] Error during Sync: Connection refused: connect
Try giving user permission to your manifest
<uses-permission android:name="android.permission.INTERNET" />
If you are sure that the server IP address and port number correct then my answer will not be so helpful.
Otherwise: - Especially if you are using different JVMs for the client android app and the java program(your server). This could happen probably because they are both referencing different localhosts.
Open command line and issue the command ipconfig you will get details about your network configurations. Instead of localhost Use the physical address of your computer(IPv4 address displayed on your terminal), it looks something like below.

Not able to connect VMware teradata database from windows 8(Host Machine) java application

I have installed in windows8 teradata in VMwere by following bellow link
http://kosmisch.net/Blog/DataAndBusinessIntelligence/Archive/2014/6/29/1a7ee23474544efb9e2318c7a771f74f.html
Now i am trying to connect the db from windows java application, but i am not able to connect it.
i have given below credentials
con = DriverManager.getConnection("jdbc:teradata://192.168.10.182:1025/database=DBC", "dbc", "dbc");
getting exception like
2016-06-09.13:15:42.126 TERAJDBC4 ERROR [main]
com.teradata.jdbc.jdk6.JDK6_SQL_Connection#264b898 Connection to 192.168.128.128:1025 Thu Jun 09 13:15:42 IST 2016
socket orig=192.168.128.128:1025 cid=cd63cd3 sess=0 java.net.UnknownHostException: 192.168.128.128:1025: invalid IPv6 address
at java.net.InetAddress.getAllByName(InetAddress.java:1141) at java.net.InetAddress.getAllByName(InetAddress.java:1098)
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.<init>(TDNetworkIOIF.java:201) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.connectToHost
(TDNetworkIOIF.java:301) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.createSocketConnection(TDNetworkIOIF.java:149)
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.<init>(TDNetworkIOIF.java:135)
at com.teradata.jdbc.jdbc.GenericTeradataConnection.getIO(GenericTeradataConnection.java:130)
at com.teradata.jdbc.jdbc.GenericLogonController.run(GenericLogonController.java:98) at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:207)
at com.teradata.jdbc.jdk6.JDK6_SQL_Connection.<init>(JDK6_SQL_Connection.java:35)
at com.teradata.jdbc.jdk6.JDK6ConnectionFactory.constructSQLConnection(JDK6ConnectionFactory.java:25)
at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:179)
at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:169)
at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:234)
at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:160)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at xteradatademo.TeradataExampl.buildCon(TeradataExampl.java:33)
at xteradatademo.TeradataExampl.main(TeradataExampl.java:19)
Can any one please help me.
You do not need to specify a port number with a Type 4 JDBC driver, hence why it works without the port number. The error message suggests with the port number it is being interpreted as a malformed IPv6 address.

Tried all: '1' addresses, but could not connect over HTTP

Can some one help me understand why I'm getting this error while running my managed server locally. My admin server is also running (locally as well) on port 7001.
Why it is trying to connect 172.30.XXX.XXX ip ? I am but confused what's happening here. When I startup my managed server I get this exception.
INFO: The Wsee Service is starting
java.net.ConnectException: Tried all: '1' addresses, but could not connect over HTTP to server: '172.30.XXX.XXX', port: '7001'
at weblogic.net.http.HttpClient.openServer(HttpClient.java:401)
at weblogic.net.http.HttpClient.openServer(HttpClient.java:506)
at weblogic.net.http.HttpClient.New(HttpClient.java:313)
at weblogic.net.http.HttpClient.New(HttpClient.java:289)
at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:267)
at weblogic.deploy.service.datatransferhandlers.HttpDataTransferHandler.getDataAsStream(HttpDataTransferHandler.java:76)
Thanks for your help.

connecting to postgreSQL server failed

I am trying to install "Kwok information server" and I am new to postgreSQL. I just followed the installation guide of Kwok information server.
when I am trying to install kwok-schema-setup.jar file using java through postgreSQL server in Command Prompt, I am getting the following error..."Connecting to PostgreSQL Server ...failed. Connection refused. Check that the ho
stname and port are correct and that the postmaster is accepting TCP/IP connecti
ons. Cause: java.net.ConnectException: Connection refused: connect
Schema setup encountered errors" .
And when I am trying to connect to the server using pgAdmin III, I am getting the following error "Server doesn't listen
The server doesn't accept connections: the connection library reports
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432? ".
Please anyone help me regarding, Thanks in advance!!
Looks like your Postgresql daemon is not running. Check if the server has started and is running. I dont know which OS you are using but try ps -ax on linux/mac or the task manager in windows.
Maybe a firewall that is blocking the connection, you have to provide more information about your environment to be sure.

Categories