You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Dunn, Scott" <SD...@sonusnet.com> on 2003/01/16 20:07:28 UTC
ConnectException in DefaultSocketFactory
I am having problems deploying multiple services from within a single VM. I
have tried this on W2K and Solaris.
To demonstrate the problem, I modified AdminClient.main() as follows
public static void main(String args[]) {
SDAdminClient admin = new SDAdminClient();
args[1] = "deploy-svc1.wsdd";
String result = admin.process(args); // This
succeeds
if (result != null)
log.info(result);
admin = new AdminClient();
args[1] = "deploy-svc2.wsdd";
result = admin.process(args); // This
fails
if (result != null)
log.info(result);
}
The second call fails with a ConnectException being thrown from
DefaultSocketFactory when it tries to construct a new socket.
I've included a stack trace below.
The problem does not appear to be server-side as I can deploy multiple
services by executing the unmodified AdminClient multiple times. As you
might expect when using the modified AdminClient I don't see anything appear
in tcpmon for the second invocation.
Anyone encountered this before? More importantly, does anyone have a
solution?
Thanks,
Scott.
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at
org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFact
ory.java:131)
at
org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:175)
at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:118)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:182)
at org.apache.axis.client.Call.invokeEngine(Call.java:2113)
at org.apache.axis.client.Call.invoke(Call.java:2102)
at org.apache.axis.client.Call.invoke(Call.java:1296)
at
org.apache.axis.client.SDAdminClient.process(SDAdminClient.java:320)
at
org.apache.axis.client.SDAdminClient.process(SDAdminClient.java:298)
at
org.apache.axis.client.SDAdminClient.process(SDAdminClient.java:305)
at
org.apache.axis.client.SDAdminClient.process(SDAdminClient.java:256)
at org.apache.axis.client.SDAdminClient.main(SDAdminClient.java:355)
Re: ConnectException in DefaultSocketFactory
Posted by Davanum Srinivas <di...@yahoo.com>.
Try
String args[] = new String[2];
args[0] = "deploy-svc1.wsdd";
args[1] = "deploy-svc2.wsdd";
AdminClient admin = new AdminClient();
result = admin.process(args);
if (result != null)
log.info(result);
Thanks,
dims
--- "Dunn, Scott" <SD...@sonusnet.com> wrote:
> I am having problems deploying multiple services from within a single VM. I
> have tried this on W2K and Solaris.
>
> To demonstrate the problem, I modified AdminClient.main() as follows
>
> public static void main(String args[]) {
> SDAdminClient admin = new SDAdminClient();
> args[1] = "deploy-svc1.wsdd";
> String result = admin.process(args); // This
> succeeds
> if (result != null)
> log.info(result);
>
> admin = new AdminClient();
> args[1] = "deploy-svc2.wsdd";
> result = admin.process(args); // This
> fails
> if (result != null)
> log.info(result);
> }
>
> The second call fails with a ConnectException being thrown from
> DefaultSocketFactory when it tries to construct a new socket.
>
> I've included a stack trace below.
>
> The problem does not appear to be server-side as I can deploy multiple
> services by executing the unmodified AdminClient multiple times. As you
> might expect when using the modified AdminClient I don't see anything appear
> in tcpmon for the second invocation.
>
> Anyone encountered this before? More importantly, does anyone have a
> solution?
>
> Thanks,
>
> Scott.
>
> java.net.ConnectException: Connection refused: connect
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at java.net.PlainSocketImpl.doConnect(Unknown Source)
> at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
> at java.net.PlainSocketImpl.connect(Unknown Source)
> at java.net.Socket.<init>(Unknown Source)
> at java.net.Socket.<init>(Unknown Source)
> at
> org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFact
> ory.java:131)
> at
> org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:175)
> at
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:118)
> at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
> 71)
> at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
> at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
> at org.apache.axis.client.AxisClient.invoke(AxisClient.java:182)
> at org.apache.axis.client.Call.invokeEngine(Call.java:2113)
> at org.apache.axis.client.Call.invoke(Call.java:2102)
> at org.apache.axis.client.Call.invoke(Call.java:1296)
> at
> org.apache.axis.client.SDAdminClient.process(SDAdminClient.java:320)
> at
> org.apache.axis.client.SDAdminClient.process(SDAdminClient.java:298)
> at
> org.apache.axis.client.SDAdminClient.process(SDAdminClient.java:305)
> at
> org.apache.axis.client.SDAdminClient.process(SDAdminClient.java:256)
> at org.apache.axis.client.SDAdminClient.main(SDAdminClient.java:355)
>
=====
Davanum Srinivas - http://xml.apache.org/~dims/
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com