# no longer able to connect from client's office to server

**URL:** <https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530>\
**Category:** Classic Servoy\
**Created:** [February 27, 2006, 5:37pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530 "2006-02-27T17:37:08Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [February 27, 2006, 5:37pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/1 "2006-02-27T17:37:08Z")

</div>

I have a client using a servoy solution hosted on a machine at my office;  
the client can connect from his primary site (“site #1”), and until receintly,  
was able to connect from a secondary site (“site #2”) with no problems.

now, he’s getting errors when he attempts to start servoy client from  
site #2; when this occurs, I see errors in servoy server’s log as well.

the error seen on the client side is “you are disconnected from  
the server. trying to reconnect”. the servoy client java console  
shows this:

```auto
java.lang.NullPointerException
at com.servoy.j2db.util.a.g.<init>Unknown Source)
at com.servoy.j2db.util.a.c.run(Unkown Source)

```

repeated over and over many times, and then gives up with a message about no licensenes remaining.

meanwhile, the server shows the following messages:

```auto
2006-02-23 13:19 : java.rmi.ConnectException: Connection refused to host: 192.168.1.86; nested exception is: 
	java.net.ConnectException: Connection timed out: connect
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
	at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
	at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
	at sun.rmi.server.UnicastRef.invoke(Unknown Source)
	at com.servoy.j2db.UserClient_Stub.getClientInfo(Unknown Source)
	at com.servoy.j2db.dataprocessing.j.a(Unknown Source)
	at com.servoy.j2db.dataprocessing.SQLEngine.register(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
	at sun.rmi.transport.Transport$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Unknown Source)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out: 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.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.(Unknown Source)
	at java.net.Socket.(Unknown Source)
	at com.servoy.j2db.util.a.d.createSocket(Unknown Source)
	... 18 more

```

a really strange part of all this is, the ip address in the server log,  
192.168.1.86, is not a node anywhere on our network (it’s a small  
network, and I personally manage it, so I know every machine’s ip  
address)

any help would be appreciated.  
thanks in advance.

rm.

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [February 27, 2006, 6:28pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/2 "2006-02-27T18:28:04Z")

</div>

Seems that for some reason the client cannot access the server properly. Probably port 1099 is blocked somehow.

The address 192.168.1.86 should be the address of the client machine, so it’s not in your network, but his.

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [February 27, 2006, 8:17pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/3 "2006-02-27T20:17:35Z")

</div>

I checked with the guy who handles all the networks at  
site #2, and he says nothing’s been changed in quite a while.  
we were running ok from this site about two weeks ago.

as far as the 192.168.1.86 ip address, you’re right. it turns  
out that’s the internal address of the machine we’re trying  
to use with servoy client.

do you think this could be related to the ‘2-way socket’ setting?  
we changed that a while ago to prevent disconnection errors  
from occuring…

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [February 28, 2006, 11:48am UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/4 "2006-02-28T11:48:14Z")

</div>

> RobertMeyer:  
> do you think this could be related to the ‘2-way socket’ setting?  
> we changed that a while ago to prevent disconnection errors  
> from occuring…

Yes, it could be related if they are using a NAT/Firewall. Check also if they are using a proxy in combination with Java 1.5 on Windows clients, there are problems with Java 1.5 proxy settings.

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [February 28, 2006, 3:53pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/5 "2006-02-28T15:53:12Z")

</div>

actually, everything at this site is linux (fedora core 3).

like I mentioned, we were doing great until a week or so ago,  
and now unable to connect to the servoy app. server from  
this location.

I tried changing the ‘2-way socket’ param back & restarting the server,  
but still no luck.

---

<div class="post-metadata">

**Author:** ![ngervasi](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@ngervasi](https://forum.servoy.com/u/ngervasi)\
**Post date:** [February 28, 2006, 6:49pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/6 "2006-02-28T18:49:32Z")

</div>

Try to clear the client java cache and redownload the servoy client from the server. Or manually change “use two-way socket” on all clients, if it is modified on the server the change is not broadcasted to clients and must be manually applied.

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [February 28, 2006, 10:18pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/7 "2006-02-28T22:18:43Z")

</div>

thanks for your response, Nicola;

I tried what you suggested, but still having no luck.

rm

---

<div class="post-metadata">

**Author:** ![sebster](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sebster](https://forum.servoy.com/u/sebster)\
**Post date:** [March 1, 2006, 10:18am UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/8 "2006-03-01T10:18:31Z")

</div>

I suggest you try some basic network debugging first. Try to connect on the relevant ports from the remote client to the server, i.e., ports 8080 and 1099. Try trace routes, pings, telnets to these ports, etc.. You can do all these things without even starting a Servoy client on the remote machine (but you must have Servoy server running). Only when all these things are working and Servoy is not, is it a problem with Servoy’s configuration…

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [March 1, 2006, 2:34pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/9 "2006-03-01T14:34:34Z")

</div>

Sebastiaan:

according to the documentation for the ‘ping’ utility (I’m running  
linux here), there doesn’t appear to be any way to specify  
what port to use when sending ping packets. ![:?]( "Confused")

when I telnet to port 8080 of the machine running servoy  
server, and try a simple get request ("get /') I get the folloiwng  
response:

```auto
<html><head><title>Apache Tomcat/4.0.1 - Error report</title><STYLE></STYLE> </head><body><h1>Apache Tomcat/4.0.1 - HTTP Status 501 - Method get is not defined in RFC 2068 and is not supported by the Servlet API </h1><HR size="1" noshade><p><b>type</b> Status report</p><p><b>message</b> <u>Method get is not defined in RFC 2068 and is not supported by the Servlet API </u></p><p><b>description</b> <u>The server does not support the functionality needed to fulfill this request (Method get is not defined in RFC 2068 and is not supported by the Servlet API ).</u></p><HR size="1" noshade></body></html>Connection closed by foreign host.

```

as strange as that response is, it does appear to be coming from the  
tomcat server running on that machine, so I think that’s ok.

when I try to telnet to the rmi port on that machine, I don’t get any  
response. could you tell me what to ‘say’ to the rmi port that would  
tell me if it’s working and reachable?

thank you  
robert meyer

---

<div class="post-metadata">

**Author:** ![sebster](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sebster](https://forum.servoy.com/u/sebster)\
**Post date:** [March 1, 2006, 2:49pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/10 "2006-03-01T14:49:32Z")

</div>

Ahhhh… LINUX. ![:-)]( "Smile") That’s good news.

Ping is just for determining if the machine is reachable at all (although this might not work in certain firewall configurations).

Telnet (or even better, netcat) can be used to test TCP ports. TCP port 8080 and 1099 should be reachable in the default configuration. BTW, the correct syntax for an HTTP get is with the protocol after the GET, i.e., GET / HTTP/1.0. Also you should use caps for the get.

As far as RMI is concerned, it’s a binary protocol and I don’t really speak it myself, and especially with SSL tunneling enabled it’s even more difficult to speak (I guess you could use openssl s\_client to connect so you don’t have to do the encryption in your head). Anyway, you should be able to connect to 1099 and if you type some random stuff you should get this in your server log:

> javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?  
> at com.sun.net.ssl.internal.ssl.InputRecord.b(DashoA6275)

Anyway, you not getting ANY connection to the RMI port suggests that either RMI is not on the default port, or it’s being filtered by a firewall. You should at least be getting connected.

Hope this helps

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [March 1, 2006, 3:11pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/11 "2006-03-01T15:11:41Z")

</div>

the connection to port 8080 seems to be working fine;  
if I do the correct request, I get back the servoy index.html  
page as one would see in a browser ![:D]( "Very Happy")

when I try sending some random characters to the rmi  
port (thru telnet) I get back a message saying the connection  
was closed by the remote host.

as an experiment, I opened another terminal window, and  
telneted over to the server, and ran windump, to see if the rmi  
traffic was getting to it, and it is. I can see the text I sent to the  
rmi port, and I can see a response coming back from that port  
to my machine here at the client site. although I can’t tell what’s  
actually coming back from whomever is listening on the rmi port,  
it would appear that I’m able to reach it from here.

also, my client is able to use servoy with no problems from their  
other location (‘site #1’), just not from here (‘site #2’), so I’m thinking  
the server, router, network, database, etc. are all operating properly.

I’m not sure what to do next… ![:roll:]( "Rolling Eyes")  
any thoughts?

thank you.  
rm.

---

<div class="post-metadata">

**Author:** ![sebster](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sebster](https://forum.servoy.com/u/sebster)\
**Post date:** [March 1, 2006, 3:34pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/12 "2006-03-01T15:34:41Z")

</div>

Can you tell me the version of Servoy you are using? The null pointer exception is certainly strange, and also the message that you are disconnected from te server. I’ll have a look at it.

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [March 1, 2006, 3:39pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/13 "2006-03-01T15:39:30Z")

</div>

thank you for all your help Seb!

here’s the info from the admin page for the server:

```auto
Server Information
Servoy version R2 2.2.3-build 335, repository version 27
Current time: Wed Mar 01 10:34:47 EST 2006
Uptime: 1 day 18 hours 54 minutes 43 seconds

User Information
Logged in as: robertmeyer

JDK Information
java.vm.name=Java HotSpot(TM) Client VM
java.vm.version=1.4.2_10-b03
java.vm.info=mixed mode
java.vm.vendor=Sun Microsystems Inc.

Operating System Information
os.name=Windows XP
os.version=5.1
os.arch=x86

```

I could give you access to the server if you like.  
rm.

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [March 1, 2006, 3:43pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/14 "2006-03-01T15:43:19Z")

</div>

here’s the info from the Network Settings page:

java.rmi.server.hostname: [blank]  
servoy.rmiStartPort: 1099  
ApplicationServer.pingDelay: 30  
SocketFactory.useTwoWaySocket: [checked]  
SocketFactory.useSSL: [checked]  
SocketFactory.SSLKeystorePath: [blank]  
SocketFactory.SSLKeystorePassphrase: [blank]

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [March 13, 2006, 4:31pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/15 "2006-03-13T16:31:52Z")

</div>

we’re still experiencing this problem, Sebastiaan.  
wondering if you’ve had a chance to look into this  
at all?

thanks.  
rm.

---

<div class="post-metadata">

**Author:** ![akalehzan](https://avatars.discourse-cdn.com/v4/letter/a/db5fbb/32.png) [@akalehzan](https://forum.servoy.com/u/akalehzan)\
**Post date:** [March 15, 2006, 4:33pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/16 "2006-03-15T16:33:25Z")

</div>

Robert,

Did you try to remove .Servoy folder from the client system and connect again?

Abrahim

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [March 17, 2006, 6:14pm UTC](https://forum.servoy.com/t/no-longer-able-to-connect-from-clients-office-to-server/5530/17 "2006-03-17T18:14:00Z")

</div>

we just solved the problem yesterday;

turns out my hostname was incorrect on the client machine,  
and was causing the confusion.

thanks to all who responded.

rm.
