Client-server application under linux - desperate help

This is a discussion on Client-server application under linux - desperate help within the Linux Networking forums, part of the Linux Forums category; Hi everybody, I currently have between hands a client application (java client connect to a C++ server which runs under ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-19-2007
lteixeira.1973@gmail.com
 
Posts: n/a
Default Client-server application under linux - desperate help

Hi everybody,
I currently have between hands a client application (java client
connect to a C++ server which runs under windows) that simply
establishes a TCP/IP connection and passes a simple string (no spaces)
to the server. Everything works fine in windows. However, if I run the
client under Linux it fails - the server simply crashes. This is the
exception I get:
Exception in thread "main" java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream. java:168)
at SGSClient.main(SGSClient.java:43)

Under windows I was able to reproduce the same behavior by activating
a firewall.
I've tested under several different SuSE platfoms (SuSE 8.2, SuSE9.3,
SLES9.0) and I alway got the same behavior (the firewall was disabled
in all platforms).
My company recently moved its headquarters to a different building and
we had some networking problems. However, now everything works fine
except for this application under the previously described
conditions.
Do you have any idea what the problem might be? I've runnout of ideas
and I just don't know where to look.

Thanks in advance.
LTeixeira

PS: Don't have access to source code. Otherwise I would try to debug
it.

Reply With Quote
  #2 (permalink)  
Old 10-22-2007
Lew Pitcher
 
Posts: n/a
Default Re: Client-server application under linux - desperate help

On Oct 19, 2:26 pm, lteixeira.1...@gmail.com wrote:
> Hi everybody,
> I currently have between hands a client application (java client
> connect to a C++ server which runs under windows) that simply
> establishes a TCP/IP connection and passes a simple string (no spaces)
> to the server. Everything works fine in windows. However, if I run the
> client under Linux it fails - the server simply crashes.


I think I'm with you so far

Portable client on Windows, server on windows = success
Portable client on Linux, server on windows = server crashes

Either your portable client isn't as portable as you think it is, or
your server is incorrectly coded such that it expects a Microsoft
Windows-specific form of interaction. In either case, you have a
program flaw, likely from the developers assumptions that the quirks
of the Microsoft Windows network stack are standards for all systems.

> This is the
> exception I get:
> Exception in thread "main" java.net.SocketException: Connection reset
> at java.net.SocketInputStream.read(SocketInputStream. java:168)
> at SGSClient.main(SGSClient.java:43)


OK, that's what the client would see if the server unexpectedly
terminated the connection. This, and the previous comment wrt the
server crashing points to the fact that the server isn't coded to
handle generic network interaction, but rather expects interactions to
follow the quirks of the Microsoft Windows networking stack.

[snip]

> Do you have any idea what the problem might be?


Yup. You have a badly designed/coded server application, and possibly
a badly designed/coded client program. :-(

>I've runnout of ideas and I just don't know where to look.
>
> Thanks in advance.
> LTeixeira
>
> PS: Don't have access to source code. Otherwise I would try to debug
> it.


OK, then you need the technicians who /do/ have the source code to
debug and repair the application. If it is a vendor program, contact
the vendor under your maintenance agreement, otherwise contact your
inhouse technical support for the application. There's nothing that
you can do at the system level to make Linux have the same
(unspecified) networking quirks that Windows has. Sorry.


Reply With Quote
  #3 (permalink)  
Old 10-23-2007
David Schwartz
 
Posts: n/a
Default Re: Client-server application under linux - desperate help

On Oct 22, 5:24 am, Lew Pitcher <lpitc...@teksavvy.com> wrote:

> OK, then you need the technicians who /do/ have the source code to
> debug and repair the application. If it is a vendor program, contact
> the vendor under your maintenance agreement, otherwise contact your
> inhouse technical support for the application. There's nothing that
> you can do at the system level to make Linux have the same
> (unspecified) networking quirks that Windows has. Sorry.


Depending on the exact circumstances, there might be things you can
do. For example, if the issue is that a particular termination
sequence that the other side uses shows up as normal on one OS and
abnormal on the other, you can work around it.

One way is to interpose your own proxy between the client and the
server. You can implement this on the server machine or on the client
machine, whichever makes the most sense. The proxy is very careful to
close down connections normally even if it sees an abnormal connection
from the other end.

This can be dangerous if done incorrectly, but it can be a lifesaver
if you have to workaround a broken application. Get someone who can
analyze the problem in detail on the wire and figure out what's going
on and how to work around it.

Or better yet, get the application fixed, as Lew Pitcher suggested.

DS

Reply With Quote
  #4 (permalink)  
Old 10-29-2007
Ashish Shuklaआशीष शुक्ल
 
Posts: n/a
Default Re: Client-server application under linux - desperate help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

,--- lteixeira 1973 writes:
| Hi everybody,
| I currently have between hands a client application (java client
| connect to a C++ server which runs under windows) that simply
| establishes a TCP/IP connection and passes a simple string (no spaces)
| to the server. Everything works fine in windows. However, if I run the
| client under Linux it fails - the server simply crashes. This is the
| exception I get:
| Exception in thread "main" java.net.SocketException: Connection reset
| at java.net.SocketInputStream.read(SocketInputStream. java:168)
| at SGSClient.main(SGSClient.java:43)

| Under windows I was able to reproduce the same behavior by activating
| a firewall.
| I've tested under several different SuSE platfoms (SuSE 8.2, SuSE9.3,
| SLES9.0) and I alway got the same behavior (the firewall was disabled
| in all platforms).
| My company recently moved its headquarters to a different building and
| we had some networking problems. However, now everything works fine
| except for this application under the previously described
| conditions.
| Do you have any idea what the problem might be? I've runnout of ideas
| and I just don't know where to look.

And have you tried it, with client running on another Windows box,
hmm.. ?

Try running Wireshark on your Windows box, to see whether it received
the string your client passes or not.

| Thanks in advance.
| LTeixeira

| PS: Don't have access to source code. Otherwise I would try to debug
| it.

HTH
- --
Ashish Shukla "Wah Java !!"
आशीष शुक्ल

weblog: http://wahjava.wordpress.com/

,= ,-_-. =. | DRMs are often designed by ambitious, well-funded consortia, |
((_/)o o(\_)) | with top-notch engineers from every corner of the industry.. |
`-'(. .)`-' | They spend millions. They take years. They are defeated in|
\_/ | days, for pennies, by hobbyists. - Cory Doctorow |

The best optimizer is between your ears.
- Michael Abrash
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHJY8XHy+EEHYuXnQRAmiEAKDQf0C9zSOQm6eZudMZwK HM8zgprgCgoFDR
uTwqnJsnGBf19f9CuA6E3V8=
=OpHl
-----END PGP SIGNATURE-----
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:36 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0