I am unable to get the response from the server for particular IP address.I tried with another URL in my program working very well when the IP address of that server is changed
i am getting the following exception java.net.ConnectException: Connection timed out.can anybody please let me know the possibilities that leads to this exception, so that i can change the settings in my midlet.
I can undoubtably say that the problem is with the server not with the midlet.
expecting the soon response from you people
lakshman
SCJP, SCWCD.
|Asking Good Questions|
It just 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 listening on the remote address/port). Or a firewall perhaps, blocking your request

Actually Its a 504 Gateway Timeout I guess...

Connection timeouts occur when:
� The IP address for the requested server is successfully found
� Connection establishment packets are dispatched to the IP address
� The destination address deliberately ignores or does not receive them
Similar to connection timeout is Connection Refused, but in this case the destination system is actually sending packets back saying "go away, there is no service running on the port you are trying to connect to"

Your packets are just being lost.. either the system or some intermediate system is firewalled.. if you can't connect using telnet, a browser or some other app, its a network problem, not java's..

[ December 03, 2008: Message edited by: Mantaker Here ]
[ December 03, 2008: Message edited by: Mantaker Here ]
[ December 03, 2008: Message edited by: �Mantaker� ]
The more the fruits of knowledge become accessible to men, the more widespread is the decline of god's and religious belief...<br /> <br />- Mantaker ..
Thanks for your reply, i came to know that the problem is from the server side, can you please tell me the way to configure the server.because in the server side i am using the IIS6.0, then i am unable to get the response.if the server is tomcat then i am not facing any problem.I can able to get the response.
I tried to include the mime type and also, but the use was nill.Please reply me as soon as possible.
once again thanks for your quick reply
lakshman
SCJP, SCWCD.
|Asking Good Questions|
Let me know what you wanna do? Actually, If it is http request alone, You can use tomcat itself .. But comparing IIS with tomcat is unfair .. You can Interface Tomcat with IIS (Bridge) .. For that, You'll find umpteen number of resources on the web .. I personally suggest you to use the tomcat..
But, Need some more clarity about the problem!!
Thank you ..
[ December 04, 2008: Message edited by: Raja Raja Chozhan M A ]
The more the fruits of knowledge become accessible to men, the more widespread is the decline of god's and religious belief...<br /> <br />- Mantaker ..
You can even use an initial or initials for the first name if you like (but not the last).
So you need another update

[ December 04, 2008: Message edited by: Amit Ghorpade ]
SCJP, SCWCD.
|Asking Good Questions|
The problem is the server is already established one.I am working on the Mobile version of the application.So i can't change the server which is running already.
The server application is .net application.I checked both phone log files and iis log files, in the IIS log files.
In the phone log file it is giving the exception as
java.net.socketException: connection refused
in the iis log file, some bytes were missing from delivering.So i am really confused at this point of time, on the way i have to proceed.Can you please guide me , thanks for your help in advance
lakshman

In my opinion Raja Chozhan will not lead to any problems

SCJP, SCWCD.
|Asking Good Questions|
Originally posted by Amit Ghorpade:
Yes until someone else thinks that Rajaraja is fake![]()
We're not out to give anyone a hard time here. We're just trying to be professional (even if our mascot is a moth-eaten hunting trophy!).
A "real-looking" name is all we ask. Providing it's truly real and not the name of a celebrity, fictitious character, deity, or other blatant poke in the eye at our dignity. And even those are OK if you can convince us it's not a pseudonym. After all, sometimes people really do have names like that!
One reason we have the naming policy is that first and foremost the JavaRanch is supposed to be a place where you can ask really stupid questions (in some people's opinion, anyway) and still get a respectful answer. "Handles" or pseudonyms provide cover for flamers, so by rejecting such things, we encourage civil discussion. And civil discussion is altogether too rare these days no matter where you go.
Anyway, to address the actual question: A connection timeout can occur for a number of reasons. If the network interface is down, if DNS is required, but the name cannot be resolved, if a data transmission is in progress and stalls due to lack of response from the other end or noise on the channel (more common on mobile devices than on hardwired networks).
Usually you can track this back to a root cause. It's always a good idea to check the stack trace for a "caused by" exception.
An IDE is no substitute for an Intelligent Developer.
� What IDE are you using?
� If you need to connect the client (Mobile) to an IIS server, then why did you connect it to tomcat? There is no need of doing it even for testing purposes I guess..
� Well, can you post the piece of code which made the exception arise?
thanks
[ December 06, 2008: Message edited by: Rajaraja Chozhan ]
The more the fruits of knowledge become accessible to men, the more widespread is the decline of god's and religious belief...<br /> <br />- Mantaker ..
Hey guys .. Rajaraja chozhan is my real name ..
Glad to know

SCJP, SCWCD.
|Asking Good Questions|
You've awakend a "zombie" thread. All these people have probably been laid off and moved on to other companies by now. You really should have started your own thread instead.
However, the number one reason for a "Connection timed out" error is lack of ability to connect. Whether it's desktop web browser or mobile device web service, the problem is the same. Usually, either access is blocked (because of a firewall) or there's no network path. In cases of mobile devices, this is often because the device doesn't have a telephone-service provided internet connection.
An IDE is no substitute for an Intelligent Developer.

it's a teeny, tiny, wafer thin ad:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
|