connectexception

Simple Application using JNDI and DataSource without Server, ServiceUnavailableException, ConnectException

醉酒当歌 提交于 2019-12-29 09:06:14
问题 I'm reading about JNDI and DataSource. https://www.journaldev.com/2509/java-datasource-jdbc-datasource-example https://www.journaldev.com/2513/tomcat-datasource-jndi-example-java https://www.baeldung.com/jndi Does it make sense to use JNDI without a server, e.g. Tomcat, JBoss, WAS? Is there some simple, standalone application that uses JNDI? I would like an example using both without a server. import java.rmi.Remote; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry;

HttpsURLConnection: Connection Timed out error

核能气质少年 提交于 2019-12-29 01:45:09
问题 I have a simple code for setting up a https connection to google and printing the response obtained. import java.io.OutputStreamWriter; import java.net.URL; import javax.net.ssl.HttpsURLConnection; public class SendCertReq { public static void main(String[] args) throws Exception { URL url = new URL("https://www.google.co.in/"); HttpsURLConnection conn = (HttpsURLConnection)url.openConnection(); conn.setRequestMethod("GET"); conn.setDoOutput(true); OutputStreamWriter wr = new

Connection refused exception in all HTTP requests in jmeter 2.11 with jdk 1.8

落爺英雄遲暮 提交于 2019-12-13 07:34:55
问题 I have a very plain jmeter project. I just send an HTTP GET request to my webservice wsdl file to verify if everything is working fine. However both the myinternal.server.local/ws/calc webservice request and HTTP GET to myinternal.server.local/ws/calc?wsdl fail with following exceptions; Non HTTP response code: org.apache.http.conn.HttpHostConnectException Non HTTP response message: Connection to https://myinternal.server.local I am sure that webservice works because I can invoke it with via

Simple java socket client, what throws this ConnectException?

故事扮演 提交于 2019-12-12 03:26:21
问题 I'm writing a very simple client for my very simple server. Line 17 throws a ConnectException at runtime if the server isn't running, I don't know why. I have looked through the docs for Socket's constructor and getInputStream(), but neither of them throw the ConnectException. I looked at the docs for the CE, and it says "Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the connection was refused remotely (e.g., no process is

Multiple sockets cause ConnectException: Connection refused: connect

…衆ロ難τιáo~ 提交于 2019-12-07 13:51:14
问题 I am programming java in Eclipse on Windows XP. I have a multiprocess simulation which uses ProcessBuilder to run a server and two clients. The server starts a thread to listen to two different sockets - one for each client. I can comment out the code for each client and have the other work perfectly fine. When I try to run them both, one client will always error with ConnectException: Connection refused: connect. Which client it is seems to be whichever is running slower, though it's hard to

Hadoop installation: namenode cannot be started

前提是你 提交于 2019-12-06 09:52:23
问题 Currently I am trying to install hadoop-2.6.0 on my ubuntu 14.10 (32 bit utopic). I followed the instruction from here: http://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/install-apache-hadoop-ubuntu-14-10-centos-7-single-node-cluster.html#axzz3X2DuWaxQ However, namenode cannot be started when i try to format namenode. This is the what I keep receiving when I try to do hdfs or hadoop namenode -format: 15/04/11 16:32:13 FATAL namenode.NameNode: Fialed to start namenode java.lang

Hadoop installation: namenode cannot be started

戏子无情 提交于 2019-12-04 16:52:53
Currently I am trying to install hadoop-2.6.0 on my ubuntu 14.10 (32 bit utopic). I followed the instruction from here: http://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/install-apache-hadoop-ubuntu-14-10-centos-7-single-node-cluster.html#axzz3X2DuWaxQ However, namenode cannot be started when i try to format namenode. This is the what I keep receiving when I try to do hdfs or hadoop namenode -format: 15/04/11 16:32:13 FATAL namenode.NameNode: Fialed to start namenode java.lang.IllegalArgumentException: URI has an authority component at java.io.File.<init>(File.java:423) at org.apache.hadoop

HttpsURLConnection: Connection Timed out error

自古美人都是妖i 提交于 2019-11-28 14:03:38
I have a simple code for setting up a https connection to google and printing the response obtained. import java.io.OutputStreamWriter; import java.net.URL; import javax.net.ssl.HttpsURLConnection; public class SendCertReq { public static void main(String[] args) throws Exception { URL url = new URL("https://www.google.co.in/"); HttpsURLConnection conn = (HttpsURLConnection)url.openConnection(); conn.setRequestMethod("GET"); conn.setDoOutput(true); OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); wr.close(); System.out.println(conn.getResponseMessage()); } } I get the

Why would a “java.net.ConnectException: Connection timed out” exception occur when URL is up?

99封情书 提交于 2019-11-27 02:59:26
I'm getting a ConnectException: Connection timed out with some frequency from my code. The URL I am trying to hit is up. The same code works for some users, but not others. It seems like once one user starts to get this exception they continue to get the exception. Here is the stack trace: java.net.ConnectException: Connection timed out Caused by: java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java

Why would a “java.net.ConnectException: Connection timed out” exception occur when URL is up?

泄露秘密 提交于 2019-11-26 10:19:44
问题 I\'m getting a ConnectException: Connection timed out with some frequency from my code. The URL I am trying to hit is up. The same code works for some users, but not others. It seems like once one user starts to get this exception they continue to get the exception. Here is the stack trace: java.net.ConnectException: Connection timed out Caused by: java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect