Avatar of mdoland
mdoland

asked on 

Failing to connect to nother server

I have written a server module in our application server solution that uses JBoss. My module is sending  transactions to another server X. The module is doing so by connecting to an API (a local dll that is provided by the party that has the server X. To be able to connect to this dll, I have written an own JNI-bridge dll in C. Got it?

My Server module -> my bridge JNI dll -> client dll from X ------------- (network) ----------> server X

Suddenly the "client dll from X" starts to reply fail on all transactions by claiming that server X is down. No network traffic is sent (so it is lying ;-)   ). After a restart of JBoss, it works for awhile, sometimes many hours and sometimes the first transaction goes into fail mode, which means that the rest of the transactions will get the "X is down return code" back.

What could be wrong here? Are there any security things that could lock up the network connection suddenly. That would sort of fit the error code, it can't reach the server.

Could it be a JNI issue?
Java App ServersJava

Avatar of undefined
Last Comment
mdoland
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of mdoland
mdoland

ASKER

In the stack trace I can see that the return code is "server down", however, that is in my Java code.

Of course, it could be bugs in the X client API, but it is very unlikely. It is used by many. Are there any possibilities that some security issue could be the case?
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

>>that is in my Java code.

Ah well, that's different ;-)

You need to interpret the return code properly
SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of mdoland
mdoland

ASKER

> > In the stack trace I can see that the return code is "server down", however, that is in my Java code.

> what is your code setting that return code based on.

Well, I call the x client API and receive the particular error code from it saying server down. I log it and can clearly see where it happens through a stack trace in the log, so I can follow whap happens "on my side".

What about the symptoms. Pretend that some memory thing get it to behave in this way. What would have happended. Why do I get a return value at all? Is it that I get the last error code sent over and over again?

Another weired thing, that gives the memory related thing  some credit is that this has only been reproduced in the production, never in the test system.
Avatar of Mick Barry
Mick Barry
Flag of Australia image

I'd be talking to the owners of the server and who supplied the api. Hopefully they can shed some light on things that could possibly trigger that error.

Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

The point is that, according to you, the server is clearly *not* down, so if that's what their error code is saying, that's a bug is it not?
Avatar of mdoland
mdoland

ASKER

Finally solved! DLL hell. The API had some DLL:s that collided with DLLs provided by another supplier.
Java
Java

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.

102K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo