Chat System: ConnectException: Connection timed out: connect

Hi There,
I am developing a chat system as part of a University project.
To explain what I have implemented:
I have three java classes;
1. Chat Server class which is constantly listening for incoming socket connection on a particular socket:
while (true)
Socket client = server.accept ();
System.out.println ("Accepted from " + client.getInetAddress ());
ChatHandler c = new ChatHandler (client);
c.start ();
2. Chat Handler class uses a thread for each client to handle multiple clients:
public ChatHandler (Socket s) throws IOException
this.s = s;
i = new DataInputStream (new BufferedInputStream (s.getInputStream ()));
o = new DataOutputStream (new BufferedOutputStream (s.getOutputStream ()));
public void run ()
try
handlers.addElement (this);
while (true)
String msg = i.readUTF ();
broadcast (msg);
catch (IOException ex)
ex.printStackTrace ();
finally
handlers.removeElement (this);
try
s.close ();
catch (IOException ex)
ex.printStackTrace();
protected static void broadcast (String message)
synchronized (handlers)
Enumeration e = handlers.elements ();
while (e.hasMoreElements ())
ChatHandler c = (ChatHandler) e.nextElement ();
try
synchronized (c.o)
c.o.writeUTF (message);
c.o.flush ();
catch (IOException ex)
c.stop ();
3. Chat Client class which has a simple GUI and sends messages to the server to be broadcasted to all other clients on the same socket port:
public ChatClient (String title, InputStream i, OutputStream o)
super (title);
this.i = new DataInputStream (new BufferedInputStream (i));
this.o = new DataOutputStream (new BufferedOutputStream (o));
setLayout (new BorderLayout ());
add ("Center", output = new TextArea ());
output.setEditable (false);
add ("South", input = new TextField ());
pack ();
show ();
input.requestFocus ();
listener = new Thread (this);
listener.start ();
public void run ()
try
while (true)
String line = i.readUTF ();
output.appendText (line + "\n");
catch (IOException ex)
ex.printStackTrace ();
finally
listener = null;
input.hide ();
validate ();
try
o.close ();
catch (IOException ex)
ex.printStackTrace ();
public boolean handleEvent (Event e)
if ((e.target == input) && (e.id == Event.ACTION_EVENT)) {
try {
o.writeUTF ((String) e.arg);
o.flush ();
} catch (IOException ex) {
ex.printStackTrace();
listener.stop ();
input.setText ("");
return true;
} else if ((e.target == this) && (e.id == Event.WINDOW_DESTROY)) {
if (listener != null)
listener.stop ();
hide ();
return true;
return super.handleEvent (e);
public static void main (String args[]) throws IOException
Socket s = new Socket ("192.168.2.3",4449);
new ChatClient ("Chat test", s.getInputStream (), s.getOutputStream ());
On testing this simple app on my local host I have launched several instances of ChatClient and they interact perfectly between each other.
Although when i test this app by launching ChatClient on another machine (using a wi-fi network connection at home), on the other machine that tries to connect to the hosting server (my machine) i get a "connection timed out" on the chatClient machine.
I have added the port and ip addresses in concern to the exceptions to by-pass the firewall but i am still getting the timeout.
Any suggestions?
Thanks!

Format your code with [ code ] tag pair.
If you are a young university student I don't understand why current your code uses so many of
too-too-too old APIs including deprecated ones.
For example, DataInput/OutputStream should never be used for text I/Os because they aren't
always reliable.
Use Writers and Readers in modern Java programming
Here's a simple and standard chat program example:
(A few of obsolete APIs from your code remain here, but they are no problem.
Tested both on localhost and a LAN.)
/* ChatServer.java */
import java.io.*;
import java.util.*;
import java.net.*;
public class ChatServer{
  ServerSocket server;
  public ChatServer(){
    try{
      server = new ServerSocket(4449);
      while (true){
        Socket client = server.accept();
        System.out.println("Accepted from " + client.getInetAddress());
        ChatHandler c = new ChatHandler(client);
        c.start ();
    catch (IOException e){
      e.printStackTrace();
  public static void main(String[] args){
    new ChatServer();
class ChatHandler extends Thread{
  static Vector<ChatHandler> handlers = new Vector<ChatHandler>();
  Socket s;
  BufferedReader i;
  PrintWriter o;
  public ChatHandler(Socket s) throws IOException{
    this.s = s;
    i = new BufferedReader(new InputStreamReader(s.getInputStream()));
    o = new PrintWriter
     (new BufferedWriter(new OutputStreamWriter(s.getOutputStream())));
  public void run(){
    try{
      handlers.addElement(this);
      while (true){
        String msg = i.readLine();
        broadcast(msg);
    catch (IOException ex){
      ex.printStackTrace();
    finally{
      handlers.removeElement(this);
      try{
        s.close();
      catch (IOException e){
        e.printStackTrace();
  protected static void broadcast(String message){
    synchronized (handlers){
      Enumeration e = handlers.elements();
      while (e.hasMoreElements()){
        ChatHandler c = (ChatHandler)(e.nextElement());
        synchronized (c.o){
          c.o.println(message);
          c.o.flush();
/* ChatClient.java */
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.io.*;
public class ChatClient extends JFrame implements Runnable{
  Socket socket;
  JTextArea output;
  JTextField input;
  BufferedReader i;
  PrintWriter o;
  Thread listener;
  JButton endButton;
  public ChatClient (String title, Socket s){
    super(title);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    socket = s;
    try{
      i = new BufferedReader(new InputStreamReader(s.getInputStream()));
      o = new PrintWriter
       (new BufferedWriter(new OutputStreamWriter(s.getOutputStream())));
    catch (IOException ie){
      ie.printStackTrace();
    Container con = getContentPane();
    con.add (output = new JTextArea(), BorderLayout.CENTER);
    output.setEditable(false);
    con.add(input = new JTextField(), BorderLayout.SOUTH);
    con.add(endButton = new JButton("END"), BorderLayout.NORTH);
    input.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent ae){
        o.println(input.getText());
        o.flush();
        input.setText("");
    endButton.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent ev){
        try{
          socket.close();
        catch (IOException ie){
          ie.printStackTrace();
        System.exit(0);
    setBounds(50, 50, 500, 500);
    setVisible(true);
    input.requestFocusInWindow();
    listener = new Thread(this);
    listener.start();
  public void run(){
    try{
      while (true){
        String line = i.readLine();
        output.append(line + "\n");
    catch (IOException ex){
      ex.printStackTrace();
    finally{
      o.close();
  public static void main (String args[]) throws IOException{
    Socket sock = null;
    String addr = "127.0.0.1";
    if (args.length > 0){
      addr = args[0];
    sock = new Socket(addr, 4449);
    new ChatClient("Chat Client", sock);
}

Similar Messages

  • Cannot download IOS5 keeps timing out, Cannot download IOS5 keeps timing out

    Help!!  Keep trying to download IOS5 (currently using 3). Has got to stage where downloads, says processing file and then says "system timed out try again". This has been going on for weeks now and system hasn't timed out, help???

    fixitrod wrote:
    The error message came when i was dnloading itunes 8 that an important component was missing and warned that if i continued with the install there might be problems. well the installation completed but when i went to download the iphone 2.1 update the download interrupts and i get a "timed out" error. i turned off anything that could possibly start. screensavers etc but don't know what could cause this firewalls
    Try doing what dynamite said by installing itunes 8. Maybe do a google about the error. Ring microsoft or last resort is a reformat.

  • WebService Consuming Message Error: ConnectException: Connection timed out:

    Hi experts,
    I'm using NWDS to consume an external WebSevice and after create an iView on EP6.
    First I created a Deployable WebService and deployed it on the server, so I created a Java Application to call this WS using the following code:
    <i>public class JQSRedirect extends HttpServlet {
         protected void doGet(
              HttpServletRequest request,
              HttpServletResponse response)
              throws ServletException, IOException {
              PrintWriter pw = response.getWriter();
              try{
                   String applicationID = "XXXX";
                   String passwordID = "XXXXX";
                   String userID = "XXXXXX";
                   String redirectURL = "http://XXXXXXX/preportal.aspx?token={";
                   String token = "";
                   InitialContext in = new InitialContext();
                   NJQSService nJQSService = (NJQSService)in.lookup("wsclients/proxies/sap.com/jqsWebService/ng.com.xxxx.jqsWebServiceProxy");
              NJQSServiceSoap njqsPort = nJQSService.getLogicalPort();
                   GetTokenN getTokenN = new GetTokenN();
    +token = njqsPort.getTokenN(userID, applicationID, passwordID);
                   pw.write("token: " + token);
              catch(Exception e) {
                   pw.write(e.toString());
                   e.printStackTrace();
         protected void doPost(
              HttpServletRequest request,
              HttpServletResponse response)
              throws ServletException, IOException {
              //TODO : Implement
    }</i>
    When I'm testing , the system display the follow message: <b>java.rmi.RemoteException: Service call exception; nested exception is: java.net.ConnectException: Connection timed out: connect</b>
    How to correct this error?
    Regards,
    Armando

    Hi,
    I found a reason for the previous error, I setted up the firewall rules and it works, but now we have another error message:
    java.rmi.RemoteException: Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (405) Method Not Allowed. The requested URL was:"http://193.122.30.8/XXXXXXXX/NJQS/njqsservice.wsdl"
    I made some researchs on the SDN and another sites of Internet that suggests a proxy configuration, but I don't have proxy on my server.
    Any Idea that can help me?
    Regards,
    Armando

  • I can't connect to Wi-Fi - keeps timing out. No problem connecting from other laptops / phones. Stopped working after I did a system upgrade. What can I do?

    I can't connect to Wi-Fi - keeps timing out. No problem connecting from other laptops / phones. Stopped working after I did a system upgrade. What can I do? I am on OS X Yosemite.

    Take each of the following steps that you haven't already tried, until the problem is resolved. Some of these steps are only possible if you have control over the wireless router.
    Step 1
    Turn Wi-Fi off and back on.
    Step 2
    Restart the router and the computer. Many problems are solved that way.
    Step 3
    Change the name of the wireless network, if applicable, to eliminate any characters other than letters and digits. You do that on your router via its web page, if it's not an Apple device, or via AirPort Utility, if it is an Apple device.
    Step 4
    Run the Network Diagnostics assistant.
    Step 5
    In OS X 10.8.4 or later, run Wireless Diagnostics and fix the issues listed in the Summary, if any.
    Step 6
    Back up all data before proceeding.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Enter the name of your wireless network in the search box. You should have one or more "AirPort network password" items with that name. Make a note of the name and password, then delete all the items. Quit Keychain Access. Turn Wi-Fi off and then back on. Reconnect to the network.
    Step 7
    You may need to change other settings on the router. See the guidelines linked below:
    Recommended settings for Wi-Fi routers and access points
    Potential sources of interference
    Step 8
    Make a note of all your settings for Wi-Fi in the Network preference pane, then delete the connection from the connection list and recreate it with the same settings. You do this by clicking the plus-sign icon below the connection list, and selecting Wi-Fi as the interface in the sheet that opens. Select Join other network from the Network Name menu, then select your network. Enter the password when prompted and save it in the keychain.
    Step 9
    Reset the System Management Controller (SMC).

  • I have tried to update the operating system on my ipad several times without success.  Each time it reaches 353.2mb of 353.2mb and starts to process the file.  Nothing happens and then I get a message saying the network connection has timed out.

    I have tried to update the operating system on my ipad several times without success.  Each time it reaches 353.2mb of 353.3mb and starts to process the file.  Nothing happens and then I get a message saying the network connection has timed out.  The network is still connected.

    Have you tried temporarily turning off your firewall and antivirus software whilst the download is happening ? A number of people on here have had success downloading it after doing so.

  • FTPS receiver side - Connection problem:connection timed out: connect

    Hi experts,
    I must connect to an external server to send files with FTPS.
    I have created receiver CC with connection security: FTPS for control and data connection
    Command order: TLS, USER, PASS, PBSZ, PROT
    Connect mode: per file transfer
    port : 990 (given by third part)
    data connection: passive (suggested by third part)
    My problem is that communication channel raise a connection timed out error, see below for log.
    I've already followed the steps suggested by this thread:
    FTPS Transfer Failing with Connection Timeout
    but no luck.
    Thanks
    Fabio Boni
    2011-05-18 12:21:01 Success Connecting to FTP server "ftps.xxx.xxx.it"
    2011-05-18 12:21:02 Success Write to FTP server "ftps.xxx.xxx.it", directory "/in", -> file "Delivery20110518-122102-155.xml"
    2011-05-18 12:21:02 Success Transfer: "BIN" mode, size 1760 bytes, character encoding -
    2011-05-18 12:21:23 Error Attempt to process file failed with java.net.ConnectException: Connection timed out: connect
    2011-05-18 12:21:23 Error Exception caught by adapter framework: Connection timed out: connect
    2011-05-18 12:21:23 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Connection timed out: connect: java.net.ConnectException: Connection timed out: connect
    2011-05-18 12:21:23 Error Delivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Connection timed out: connect: java.net.ConnectException: Connection timed out: connect.

    As Fabio said, the file adapter log return this log:
    2011-05-18 12:21:01 Success Connecting to FTP server "ftps.xxx.xxx.it"
    2011-05-18 12:21:02 Success Write to FTP server "ftps.xxx.xxx.it", directory "/in", -> file "Delivery20110518-122102-155.xml"
    2011-05-18 12:21:02 Success Transfer: "BIN" mode, size 1760 bytes, character encoding -
    2011-05-18 12:21:23 Error Attempt to process file failed with java.net.ConnectException: Connection timed out: connect
    Seem that FTP access into server is executed successfully and adapter write file, but raise timeout exception.

  • OpenMarket sms api gives "Connection timed out: connect"

    Hello All,
    I am new to web applications with sms services.
    I am trying to send sms from my java application to mobile device. But I am getting below error.
    Aug 25, 2010 10:55:58 AM com.eha.sms.ema.EMACMMessageSendProxy init
    INFO: Move to send the receiver initialization.
    Destination address = +**********
    Source addres = +*****
    Sending message to Simplewire...
    REQUEST XML ==
    <?xml version="1.0" ?>
    <request version="3.0" protocol="wmp" type="submit">
         <user agent="Java/SMS/2.9.16"/>
         <account id="******************" password="***************"/>
         <option type="production"/>
         <source ton="0" address="+*****"/>
         <destination ton="0" address="+**********"/>
         <message udhi="false" text="Hello World!"/>
    </request>
    protocol: http
    remote host: ******Some site given to us by open market people that opens on browser**********
    remote port: 8080
    remote file: /wmp
    {main} [10:55:58.722] Conn: added module com.simplewire.http.RetryModule
    {main} [10:55:58.725] Conn: added module com.simplewire.http.AuthorizationModule
    {main} [10:55:58.726] Conn: added module com.simplewire.http.DefaultModule
    {main} [10:55:58.747] Conn: Creating Socket: smsc-01.openmarket.com:8080
    {main} [10:56:19.759] Conn: 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.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at com.simplewire.http.HTTPConnection$_A.run(Unknown Source)
    Message was not sent!
    Error Code: 106
    Error Description: A connection could not be established with the Simplewire network. Connection timed out: connect
    Error Resolution:
    The code I am using is as below.
    private void config()
              Properties properties = new Properties();
              InputStream smscmReceiver = EMACMMessageSendProxy.class.getClassLoader().getResourceAsStream("sms.properties");
              try
                   properties.load(smscmReceiver);
                   System.out.println(properties.getProperty("SMS.SubscriberID").trim());
                   System.out.println(properties.getProperty("SMS.Password").trim());
                   System.out.println(properties.getProperty("SMS.DestinationAddress").trim());
                   System.out.println(properties.getProperty("SMS.SourceAddress").trim());
                   SMS sms = new SMS();
                   // subscriber settings
                   sms.setRemoteHost(" ******Some site given to us by open market people that opens on browser**********");
                   sms.setDebugMode(true);
                   sms.setRemotePort(8080);
                   sms.setSubscriberID(properties.getProperty("SMS.SubscriberID").trim());
                   sms.setSubscriberPassword(properties.getProperty("SMS.Password").trim());
                   // Message Settings
                   sms.setDestinationAddr(properties.getProperty("SMS.DestinationAddress").trim());          // recipient of message
                   sms.setSourceAddr(properties.getProperty("SMS.SourceAddress").trim());               // originator of message
                   sms.setMsgText("Hello World!");
                   System.out.println("Sending message to Simplewire...");
                   // submit message and check results
                   if (sms.submit())
                        System.out.println("Message was sent!");
         System.out.println("Ticket ID: " + sms.getMsgTicketID());
                   else
                        System.out.println("Message was not sent!");
                        System.out.println("Error Code: " + sms.getErrorCode());
                        System.out.println("Error Description: " + sms.getErrorDesc());
                        System.out.println("Error Resolution: " + sms.getErrorResolution() + "\n");
              } catch (IOException e)
              log.error("Load profile sms.properties failed to send Move.", e);
    I am using windows 7 and the required info from the java code is picked up from a property file.
    destination address is a "+" sign followed by cell number of client in US and I am in diff country.
    source code I am using is "+" sign followed by a short code given by client.
    I am also not aware what short codes are for.
    I am also not sure whether I am passing correct parameters.
    I just followed a demo code from the api's sample file. (open market api......swsms-2.9.16 is the jar used.).
    would like to know If destination address can be my cell number.
    The open market people have configured the demo short code for our SMS messaging account.
    This feature will allow us to test our platform to send and receive SMS messages
    while we are waiting for our dedicated short code.
    Mobile Originated messages MUST start with our assigned keyword(s) to be routed to you.
    We have a few keywords but don't know how to use them.
    Please help!
    Thanks in advance.
    Edited by: Vish_1x1 on Aug 24, 2010 11:06 PM

    I had a same problem.
    It was definately URL and SOAP Action Problem.
    Also, I didnt configure the Proxy too.
    Please dont waste more time in looking inot other configs.
    Just give a careful look at Target URL and SOAP Action, again and again.
    Sweta , Please make this question Answerd , it will be useful for other users.
    And Bahvesh Deserves good points..
    Thanks ,
    Deo.

  • Connection refused to host: connection timed out

    I have been struggling with this problem a couple of days now so I really hope someone can help me. I am trying to get rmi to work in a NAT environment. We use a firewall, so I have opened port 1099 and 2020 which I use as a fixed port for communication (just to be sure it is not a firewall thing); I use the following code:
    //server
    public class ComputeEngine extends UnicastRemoteObject
    implements Compute
    public ComputeEngine() throws RemoteException {
    super();
    public String getMessage() {
    return "you have successfully connected to the server";
    public static void main(String[] args) {
    if (System.getSecurityManager() == null) {
    System.setSecurityManager(new RMISecurityManager());
    try {
    String port = args[0];
    try {
    RMISocketFactory.setSocketFactory(new FixedPortRMISocketFactory(Integer.parseInt(port)));
    } catch (IOException e) {
    e.printStackTrace();
    LocateRegistry.createRegistry( 1099 );
    catch (RemoteException e1) {
    e1.printStackTrace();
    String name = "rmi://localhost/Compute";
    try {
    Compute engine = new ComputeEngine();
    Naming.rebind(name, engine);
    System.out.println("ComputeEngine bound");
    while(true); //stay alive
    } catch (Exception e) {
    System.err.println("ComputeEngine exception: " + e.getMessage());
    e.printStackTrace();
    public Socket createSocket(String host, int port)
    throws IOException {
    System.out.println("creating socket to host : " + host + " on port " + port);
    return new Socket(host, port);
    * Create a server socket on the specified port (port 0 indicates
    * an anonymous port) and writes out some debugging info
    * @param port the port number
    * @return the server socket on the specified port
    * @exception IOException if an I/O error occurs during server socket
    * creation
    * @since JDK1.1
    public ServerSocket createServerSocket(int port)
    throws IOException {
    port = (port == 0 ? portnumber : port);
    System.out.println("creating ServerSocket on port " + port);
    return new ServerSocket(port);
    //client
    public class ComputePi {
    public static void main(String args[]) {
    if (System.getSecurityManager() == null) {
    System.setSecurityManager(new RMISecurityManager());
    try {
    String name = "rmi://" + args[0] + "/Compute";
    Compute comp = (Compute) Naming.lookup(name);
    System.out.println("connected to server");
    System.out.println(comp.getMessage());
    } catch (Exception e) {
    System.err.println("ComputePi exception: " + e.getMessage());
    e.printStackTrace();
    I start the client with:
    java -Djava.security.policy=policy.all -jar client.jar 194.2.4.6:1099
    I start the server with:
    java -Djava.rmi.server.codebase="file:/C:\RMI\\server.jar" -Djava.rmi.server.hostname="194.2.4.6" -Djava.security.policy=policy.all -jar server.jar 2020
    As you can see I set the "-Djava.rmi.server.hostname" property which should be a solution to the NAT problem. However I keep getting the following exception!!??!!:
    ComputePi exception: Connection refused to host: 194.2.4.6; nested exception is:
         java.net.ConnectException: Connection timed out: connect
    java.rmi.ConnectException: Connection refused to host: 194.2.4.6; 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.newCall(Unknown Source)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at java.rmi.Naming.lookup(Unknown Source)
         at client.ComputePi.main(ComputePi.java:14)
    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.<init>(Unknown Source)
         at java.net.Socket.<init>(Unknown Source)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
         ... 7 more
    Can anyone help me with this, please??????
    kind regards,
    Christiaan

    Yes, i can ping it from the client.
    I have also noticed that when i run my server with the option -Djava.rmi.server.hostname=IP the applications stops automatically after a few minuts...
    I'm not using nothing about codebase. I have the stub and skel classes in server and client machines..
    I add the complete exception:
    Client exception: java.rmi.ConnectException: Connection refused to host: external_IP; nested exception is:
    java.net.ConnectException: Connection timed out: connect
    java.rmi.ConnectException: Connection refused to host: external_IP; nested exception is:
    java.net.ConnectException: Connection timed out: connect
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
    at example.hello.Server_Stub.sayHello(Unknown Source)
    at example.hello.Client.main(Client.java:55)
    Caused by: java.net.ConnectException: Connection timed out: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
    at java.net.Socket.connect(Socket.java:426)
    at java.net.Socket.connect(Socket.java:376)
    at java.net.Socket.<init>(Socket.java:291)
    at java.net.Socket.<init>(Socket.java:119)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
    SocketFactory.java:22)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
    SocketFactory.java:128)
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
    ... 5 more

  • "Connection timed out" with HttpClient.

    Hi,
    My goal is to consume a web service using Apache AXIS. This web service uses Integrated Windows Authentication.
    I use IE have configured Proxy server address and Proxy server port using IE's Tools -> Internet Options -> Connections Tab -> LAN Settings -> Proxy serer.
    If type the webservice endpoint address of the form http://239.271.380.120/serveme/WS.asmx in my browser then I see in my browser "You are not authorized to view this page .. HTTP Error 401.2 - Unauthorized: Access is denied due to server configuration. Internet Information Services (IIS)" but there is another client in another network who is getting a login dialog to enter domain\\username and password when he types the web service endpoint address in the browser. This makes me think that either the so called another client is in the same domain as the web service provider and I am not.
    Anway, I tried to write standalone HttpClient (I use commons-httpclient-3.0-rc3, commons-codec-1.3, commons-logging-1.0.4) program NTCredentialsClient.java like below :
    NTCredentialsClient.java
    import org.apache.commons.httpclient.*;
    import org.apache.commons.httpclient.auth.*;
    import org.apache.commons.httpclient.methods.*;
    public class NTCredentialsClient {
         public static void main(String args[]) {
              HttpClient client = new HttpClient();
              NTCredentials credentials = new NTCredentials("user1", "password1", "MYDESKTOP", "domain1");
              AuthScope authScope = new AuthScope("20.222.335.37", 3128);
              client.getState().setCredentials(authScope, credentials);
              //client.getState().setCredentials(AuthScope.ANY, credentials);
              GetMethod get = new GetMethod("http://239.271.380.120/serveme/WS.asmx");
              get.setDoAuthentication(true);
              try {
                   int status = client.executeMethod(get);
                   System.out.println(status);
                   get.getResponseBodyAsStream();
                   // print the status and response
                    System.out.println(status + "\n" + get.getResponseBodyAsString());
              catch (Exception e) {
                   e.printStackTrace();
              finally {
                   get.releaseConnection();
    ------------------------------------------------------------------In the above program, user1, password1, domain1 are details given by my service provider and
    MYDESKTOP is my local machine name from which I am running the above program. 20.222.335.37
    is my proxy server address and 3128 is my proxy server port. Now when I run the above
    program I get this exception :
    Aug 16, 2005 12:43:45 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
    INFO: I/O exception caught when processing request: Connection timed out: connect
    Aug 16, 2005 12:43:46 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
    INFO: Retrying request
    Aug 16, 2005 12:44:11 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
    INFO: I/O exception caught when processing request: Connection timed out: connect
    Aug 16, 2005 12:44:11 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
    INFO: Retrying request
    Aug 16, 2005 12:44:37 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
    INFO: I/O exception caught when processing request: Connection timed out: connect
    Aug 16, 2005 12:44:37 PM org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
    INFO: Retrying request
    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.SocksSocketImpl.connect(Unknown Source)
            at java.net.Socket.connect(Unknown Source)
            at java.net.Socket.connect(Unknown Source)
            at java.net.Socket.<init>(Unknown Source)
            at java.net.Socket.<init>(Unknown Source)
            at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:79)
            at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:121)
            at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:704)
            at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:382)
            at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:168)
            at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
            at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
            at NTCredentialsClient.main(NTCredentialsClient.java:28)
    ------------------------------------------------------------------Can anyone please tell me whether the configurations I have made in my above client program are correct or is there anything that I am overlooking. Also, in the above program for AuthScope constructor, do I need to pass web service server adderss and port OR my local proxy address and local proxy port as constructor arguments ?
    Please suggest ...
    Thanks & Regards,
    Kr.

    You will need to define your proxy settings. In java, these are provided as system properties:
    System.setProperty("http.proxyHost", "<proxy>");
    System.setProperty("http.proxyPort", "<port>");
    If your proxy uses HTTP authentication, you will need to define a few more system properties, which I don't know off the top of my head. This should actually get you connected with the web server, but as for the 302 error, you'll probably need to contact the system administrator.
    Cheers
    Todd.

  • Connection timed out when try to connect orb through iiop

    I have been trying to test a very basic corba example in weblogic 11g, it narrows an orb sucessfully with naming service, but I got connection timed out error when trying to call a function in the orb. My weblogic and my source code are on the same machine and I connect it with browser(coz it is a web application), so I doubt if it is firewall issues, but I could be wrong. I appericate so much if anyone can help.
    Here is the error message I got, you can see I listed all the objects in the naming service and I am able to locate Hello object:
    >
    Context: weblogic
    Object: Hello
    Context: javax
    Obtained a handle on server object: oraclecorba._HelloStub:Delegate(532227) [weblogic.iiop.IOR[IDL:oraclecorba/Hello:1.0] @xx.x.xx.xxx:xxxx, <0, null>]
    org.omg.CORBA.COMM_FAILURE: Connection timed out vmcid: 0x0 minor code: 0 completed: No
    at weblogic.iiop.Utils.mapToCORBAException(Utils.java:885)
    at weblogic.corba.idl.RemoteDelegateImpl.request(RemoteDelegateImpl.java:311)
    at org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:431)
    at oraclecorba._HelloStub.sayHello(_HelloStub.java:18)
    at oracle.demo.corba.MyJSPHelper.jspSayHello(MyJSPHelper.java:71)
    at jsp_servlet._pages.__corbajsp._jspService(__corbajsp.java:92)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3594)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.net.ConnectException: Connection timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:519)
    at weblogic.socket.SocketMuxer.newSocket(SocketMuxer.java:342)
    at weblogic.socket.ChannelSocketFactory.createSocket(ChannelSocketFactory.java:79)
    at weblogic.socket.BaseAbstractMuxableSocket.createSocket(BaseAbstractMuxableSocket.java:133)
    at weblogic.iiop.MuxableSocketIIOP.newSocket(MuxableSocketIIOP.java:266)
    at weblogic.iiop.MuxableSocketIIOP.createSocket(MuxableSocketIIOP.java:253)
    at weblogic.socket.BaseAbstractMuxableSocket.connect(BaseAbstractMuxableSocket.java:106)
    at weblogic.iiop.MuxableSocketIIOP.connect(MuxableSocketIIOP.java:238)
    at weblogic.iiop.MuxableSocketIIOP.createConnection(MuxableSocketIIOP.java:222)
    at weblogic.iiop.EndPointManager.createEndPoint(EndPointManager.java:464)
    at weblogic.iiop.EndPointManager.findOrCreateEndPoint(EndPointManager.java:239)
    at weblogic.iiop.EndPointManager.findOrCreateEndPoint(EndPointManager.java:256)
    at weblogic.iiop.IIOPRemoteRef.locateIORForRequest(IIOPRemoteRef.java:383)
    at weblogic.corba.idl.RemoteDelegateImpl.getInvocationIOR(RemoteDelegateImpl.java:535)
    at weblogic.corba.idl.RemoteDelegateImpl.request(RemoteDelegateImpl.java:256)
    ... 19 more
    >
    Here are my source code
    Server side
    package oracle.demo.corba;
    import oraclecorba.Hello;
    import oraclecorba.HelloHelper;
    import org.omg.CORBA.ORB;
    import org.omg.CosNaming.Binding;
    import org.omg.CosNaming.BindingIteratorHolder;
    import org.omg.CosNaming.BindingListHolder;
    import org.omg.CosNaming.BindingType;
    import org.omg.CosNaming.NameComponent;
    import org.omg.CosNaming.NamingContext;
    import org.omg.CosNaming.NamingContextExt;
    import org.omg.CosNaming.NamingContextExtHelper;
    import org.omg.CosNaming.NamingContextPackage.NotFound;
    import org.omg.PortableServer.POA;
    import org.omg.PortableServer.POAHelper;
    import weblogic.common.T3ServicesDef;
    public class ORBStartup{
         private T3ServicesDef t3servicesdef;
         public void setServices(T3ServicesDef t3servicesdef)
            this.t3servicesdef = t3servicesdef;
         public static void main(String[] args)
            throws Exception
             try{
                  args = new String[4];
                  args[0] = "-ORBInitialHost";
                  args[1] = "some_address";
                  args[2] = "-ORBInitialPort";
                  args[3] = "8056";
                  System.out.println("...............startup...........");
                   // Create a new object request broker
                   ORB orb = ORB.init( args, null );
                   // get the root POA
                   POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
                   // Activate PersistentPOA's POAManager, Without this
                   // All calls to Persistent Server will hang because POAManager
                   // will be in the 'HOLD' state.
                   rootpoa.the_POAManager().activate();
                // instantiate the servant
                   CorbaHelloImpl helloImpl = new CorbaHelloImpl();
                   helloImpl.setORB(orb);
                   org.omg.CORBA.Object helloObj = rootpoa.servant_to_reference(helloImpl);
                   Hello HelloRef = HelloHelper.narrow(helloObj);
               //  Resolve RootNaming context and bind a name for the servant.
                 // NOTE: If the Server is persistent in nature then using Persistent
                 // Name Service is a good choice. Even if ORBD is restarted the Name
                 // Bindings will be intact. To use Persistent Name Service use
                 // 'NameService' as the key for resolve_initial_references() when
                 // ORBD is running.
                   org.omg.CORBA.Object ncObj = orb.resolve_initial_references("NameService");
                   //This line works ONLY for INS(jdk 14 naming service)
                   // Since we have only an object reference, we must
                   // cast it to a NamingContext. We use a helper
                  // class for this purpose
                   NamingContextExt ncRef = NamingContextExtHelper.narrow( ncObj );
                   String name = "Hello";
                   NameComponent path[] = ncRef.to_name( name );
                   try {
                        ncRef.rebind( path, HelloRef );
                   } catch( org.omg.CosNaming.NamingContextPackage.NotFound nf ) {
                        NameComponent[] tmpName = new NameComponent[path.length-1];
                        for (int i=0; i < path.length-1; i++) { tmpName[i] = path; }
                        createContextPath(ncRef, tmpName);
                        ncRef.bind(path, HelloRef);
         BindingListHolder bl = new BindingListHolder();
         BindingIteratorHolder blIt= new BindingIteratorHolder();
         ncRef.list(1000, bl, blIt);
         Binding bindings[] = bl.value;
         for (int i=0; i < bindings.length; i++) {
         int lastIx = bindings[i].binding_name.length-1;
         // check to see if this is a naming context
         if (bindings[i].binding_type == BindingType.ncontext) {
         System.err.println( "Context: " +
         bindings[i].binding_name[lastIx].id);
         } else {
         System.err.println("Object: " +
         bindings[i].binding_name[lastIx].id);
                   System.out.println( name + " for INS ready and waiting ...");
                   // the server is now ready to receive the client request
                   orb.run();
              } catch (Exception e) {
                   System.err.println("ERROR: " + e);
                   //e.printStackTrace(System.out);
                   throw e;
              System.out.println("HelloServer Exiting ...");
    public static void createContextPath(NamingContext nc, NameComponent[] name)
         throws org.omg.CORBA.UserException {
         try {
              nc.bind_new_context(name);
         } catch (NotFound nf) {
              for( int len = name.length - nf.rest_of_name.length + 1;
                   len <= name.length; len++ )
                   NameComponent[] tmpName = new NameComponent[len];
                   for (int i=0; i < len; i++) { tmpName[i] = name[i]; }
                   nc.bind_new_context(tmpName);
    Client side:
    package oracle.demo.corba;
    import oraclecorba.Hello;
    import oraclecorba.HelloHelper;
    import org.omg.CORBA.ORB;
    import org.omg.CosNaming.Binding;
    import org.omg.CosNaming.BindingIteratorHolder;
    import org.omg.CosNaming.BindingListHolder;
    import org.omg.CosNaming.BindingType;
    import org.omg.CosNaming.NamingContextExt;
    import org.omg.CosNaming.NamingContextExtHelper;
    public class MyJSPHelper
         public static String jspSayHello(String in)
              String rc = "";
              try
                   ORB orb = ORB.init();
                   // get the root naming context
                   org.omg.CORBA.Object objRef;
                   objRef = orb.resolve_initial_references("NameService");
                   // Use NamingContextExt instead of NamingContext. This is
                   // part of the Interoperable naming Service.
                   NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
                   /*for(int i =0; i<orb.list_initial_services().length; i++)
                        rc += orb.list_initial_services()+": ";
                        System.err.println(orb.list_initial_services()[i]);
         BindingListHolder bl = new BindingListHolder();
         BindingIteratorHolder blIt= new BindingIteratorHolder();
         ncRef.list(1000, bl, blIt);
         Binding bindings[] = bl.value;
         for (int i=0; i < bindings.length; i++) {
         int lastIx = bindings[i].binding_name.length-1;
         // check to see if this is a naming context
         if (bindings[i].binding_type == BindingType.ncontext) {
         System.err.println( "Context: " +
         bindings[i].binding_name[lastIx].id);
         } else {
         System.err.println("Object: " +
         bindings[i].binding_name[lastIx].id);
                   // resolve the Object Reference in Naming
                   String name = "Hello";
                   Hello helloImpl = HelloHelper.narrow(ncRef.resolve_str(name));
                   System.err.println("Obtained a handle on server object: " + helloImpl);
    //Hello helloImpl = HelloHelper.narrow(orb.string_to_object("corbaname:iiop:some_address:8056#Hello")); also tried that, but got the same problem
                   rc = helloImpl.sayHello(in); //<----failed here
              catch(Exception e)
                   // TODO Auto-generated catch block
                   rc += e.toString();
                   e.printStackTrace();
              return rc;
    Edited by: user8904224 on 27/04/2010 23:06

    Don't mean to add to the possible confusion here, but most newer routers (Apple included) allow their users to "hide" their network, so it's also very possible and likely in an apartment situation that you can pick up interference from a network that you or Air Radar cannot "see".
    So, trying to find the "right" channel becomes a bit more of guessing game.
    Understand that you need "g" for your devices. For the future though, you might watch the Air Radar screen for channels in the 36-48 and 149-161 range to see how much less activity is going on there.

  • Connection timed out: connect at com.sun.mail.imap.IMAPStore.protocolConne

    Hi ,
    Recently, my team need to work with javamail. Here I got a problem: when I run the application in my personal home network , it goes on very well. When I run the program in my company env, it gives error info:
    Exception in thread "main" javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
    nested exception is:
    java.net.ConnectException: Connection timed out: connect
    at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1706)
    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:525)
    at javax.mail.Service.connect(Service.java:313)
    The resource is :
    import java.security.Security;
    import java.util.Date;
    import java.util.Properties;
    import javax.mail.Authenticator;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    *Use Gmail
    public class GmailSender {
    public static void main(String[] args) throws AddressException, MessagingException {
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
    // Get a Properties object
    Properties props = System.getProperties();
    //Add proxy for GmailSender
    //especially here, I am not sure whether the proxy really works. In home network, it needn't proxy to run successfully.
    // props.setProperty("proxySet","true");
    // props.setProperty("socksProxyHost","148.87.19.20"); // This IP address is our proxy server address
    // props.setProperty("socksProxyPort","80");
    props.setProperty("mail.smtp.host", "smtp.gmail.com");
    props.setProperty("mail.smtp.socketFactory.class", SSL_FACTORY);
    props.setProperty("mail.smtp.socketFactory.fallback", "false");
    props.setProperty("mail.smtp.port", "465");
    props.setProperty("mail.smtp.socketFactory.port", "465");
    props.put("mail.smtp.auth", "true");
    final String username = "XXX";
    final String password = "XXX";
    Session session = Session.getDefaultInstance(props, new Authenticator(){
    protected PasswordAuthentication getPasswordAuthentication() {
    return new PasswordAuthentication(username, password);
    // -- Create a new message --
    Message msg = new MimeMessage(session);
    // -- Set the FROM and TO fields --
    msg.setFrom(new InternetAddress(username + "@gmail.com"));
    msg.setRecipients(Message.RecipientType.TO,
    InternetAddress.parse("[email protected]",false));
    msg.setSubject("Hello");
    msg.setText("How are you");
    msg.setSentDate(new Date());
    Transport.send(msg);
    System.out.println("Message sent.");
    Will you please help me to review my code and give me some suggestions ?

    No point looking at the code. The error message says the code can't connect to the server you are trying to connect to, so presumably there's a firewall or something like that preventing the connection. Talk to your network people.

  • Flpclient error (connection timed out)

    Hi
    I am trying to access a webserver to download a file to my local machine. When I run the file, I am getting java.net.ConnectException...connection timed out. But if i use SSH SECURE SHELL client. I can log into the remote webserver and see the files. I wonder why my program is not getting connected. here is the code.
    import java.io.*;
    import sun.net.ftp.FtpClient;
    import java.lang.*;
    public class Download {
    public static void main(String[] args) {
    FtpClient fc;
    String filename = "test1.txt";
    String hostname = "www.mydevelopmentserver.com";
    String username = "ftptest";
    String password = "testing";
    String directory = "/mydata/home/work";
    try {
    fc = new FtpClient(hostname);
    fc.login(username, password);
    fc.binary();
    fc.cd(directory);
    InputStream theFile = fc.get(filename);
    int i = 0;
    FileOutputStream fos = new FileOutputStream(filename);
    System.out.println("getting file");
    while ((i = theFile.read()) != -1) {
    fos.write((byte) i);
    fc.closeServer();
    fos.close();
    catch (IOException e) {
    System.err.println(e);
    I am not providing the port any where. Could that be the problem...How can i provide the port?? with the hostname??
    Thanks

    I have used sockets for connection . I don't understand how do you like connect but you can use socket for a good connection :
    public class client
    Socket server1;
    InputStream inputnet;
    OutputStream outnet;
    String username;
    String host;
    public connect()
    try
    server1 = new Socket(host, 1111);
    catch( IOException e)
    return false;
    Please send me your comments;
    MIguel
    }

  • My e-mails are not sending. "connection to SMTP server timed out." How do I get this working?

    As of yesterday, I am receiving e-mails fine; however, unable to send. Everytime I try to send an e-mail, I get "Sending of message failed. The message could not be sent because the connection to SMTP server (my mail address) timed out. Try again or contact your network administrator.
    I received help from lunarpages (they host my domain); however, they were unable to resolve the issue. They suggested something is blocking IP, or need to update Thunderbird, or there's a firewall there...
    Help!!!
    My clients are waiting for responses to e-mails!
    Thank you.

    To diagnose problems with Thunderbird, try one of the following:
    *Restart Thunderbird with add-ons disabled (Thunderbird Safe Mode). On the Help menu, click on "Restart with Add-ons Disabled". If Thunderbird works like normal, there is an Add-on or Theme interfering with normal operations. You will need to re-enable add-ons one at a time until you locate the offender.
    *Restart the operating system in '''[http://en.wikipedia.org/wiki/Safe_mode safe mode with Networking]'''. This loads only the very basics needed to start your computer while enabling an Internet connection. Click on your operating system for instructions on how to start in safe mode: [http://windows.microsoft.com/en-us/windows-8/windows-startup-settings-including-safe-mode Windows 8], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-7 Windows 7], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-vista Windows Vista], [http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/boot_failsafe.mspx?mfr=true" Windows XP], [http://support.apple.com/kb/ht1564 OSX]
    ; If safe mode for the operating system fixes the issue, there's other software in your computer that's causing problems. Possibilities include but not limited to: AV scanning, virus/malware, background downloads such as program updates.

  • TCP active open: Failed connect()    Error: Connection timed out SMTP

    Hi,
    Messaging server version is,
    ./imsimta version
    Sun Java(tm) System Messaging Server 6.2-6.01 (built Apr 3 2006)
    libimta.so 6.2-6.01 (built 11:20:35, Apr 3 2006)
    SunOS bglbbmr1-a-fixed 5.9 Generic_118558-28 sun4u sparc SUNW,Sun-Fire-V440
    17-Dec-2008 10:47:40.08 1730.8e.741
    tcp_local Q 4 [email protected] rfc822;[email protected] [email protected] /mta/queue/queue/tcp_local/013/ZUg0i1t9I0ZG~.00 <[email protected]>; TCP active open: Failed connect() Error: Connection timed out SMTP/xyz.my-domain.in
    I have been getting this above error on my mail server from last
    4-5 days. I am getting complaints from end users that the users can't
    send any mails using Outlook but I did check with my test user I can
    send mail by using webmail.
    The Failed MX lookup Errors also getting in my logs the error detail given bellow.
    17-Dec-2008 10:47:39.65 1730.91.737
    tcp_local - Y TCP|0.0.0.0||209.85.143.114|25 SMTP/airtelmail.in/aspmx.l.google.com
    17-Dec-2008 10:47:39.92 1754.41.255
    tcp_notify - Y SMTP/infomedia18.in/infomedia18.in
    17-Dec-2008 10:47:39.92 1754.41.256
    tcp_notify Q 7 rfc822;[email protected] [email protected] /mta/queue/queue/tcp_notify/017/ZXg0i1t3U_ZoD.00 <[email protected]>; Failed MX lookup; try again later
    17-Dec-2008 10:47:39.94 1754.41.257
    tcp_notify Q 6 rfc822;[email protected] [email protected] /mta/queue/queue/tcp_notify/010/ZXg0i1t3U_ZoF.00 <0KBZ003MRGU7MQ30@my-domain> Failed MX lookup; try again later
    I tried stopping and starting msg service using stop-msg and start-msg to sort out this above problem but no result. :(
    When I do check the tcp_local queue it has been growing every day as well the tcp_notification queue also.
    /opt/SUNWmsgsr/sbin/imsimta qm su
    Messages
    Channel Queued Size (Kb) Oldest
    tcp_notify 10741 1080610.61 16 Dec, 00:59:24
    tcp_local 8334 733849.31 15 Dec, 00:19:00
    tcp_lmtpcn 0 0.00
    tcp_be 0 0.00
    reprocess 0 0.00
    process 0 0.00
    conversion 0 0.00
    Totals 19075 1814459.92
    This queues are increasing day by day.
    One more thing is that I cant see a service/channel called CONVERSION running on my server when i do use this command.
    ps -aef | grep conversion
    root 6144 6000 0 11:14:28 pts/1 0:00 grep conversion
    When i try to start it using imsimta qm utility, output shows as
    qm.maint>; start conversion
    QM-I-STARTED, channel was not stopped
    qm.maint>;
    Later I stopped and started conversion channel
    qm.maint>; stop conversion
    QM-I-STOPPED, channel stopped
    qm.maint>; start conversion
    QM-I-STARTED, channel started
    qm.maint>;
    I can see that on other servers the conversion channel is running and few msges are in queue. I do have other servers which running the same messaging server. But I am not getting why don't on this server. Where both servers having the same configuration.
    Please, help me to sort out this issue.
    Thanks in advance....
    BSK

    Thanks Mr. Shane,
    The server which is running conversion channel.
    ps -eaf|grep conversion
    mailserv 16824 8472 3 17:08:11 ? 0:48 /opt/SUNWmsgsr/lib/conversion
    mailserv 28728 8472 0 17:17:30 ? 0:00 /opt/SUNWmsgsr/lib/conversion
    root 1057 26387 0 17:18:12 pts/1 0:00 grep conversion
    more /opt/SUNWmsgsr/config/conversions
    in-channel=*; in-type=application; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=x-zip-compressed; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=image; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=audio; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=video; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    Following entry from /opt/SUNWmsgsr/lib/config-templates/imta_tailor
    IMTA_CONVERSION_FILE=<msg.RootPathUNIX>/config/conversions
    The server which doesnt show running conversion channel
    #more /opt/SUNWmsgsr/config/conversions
    !in-channel=*; in-type=*; in-subtype=*; in-disposition=*;
    ! parameter-symbol-0=NAME; parameter-copy-0=*;
    ! dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    ! message-header-file=2; original-header-file=1;
    ! override-header-file=1; override-option-file=1;
    ! command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=application; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=x-zip-compressed; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=image; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=audio; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    in-channel=*; in-type=video; in-subtype=*; in-disposition=*;
    parameter-symbol-0=NAME; parameter-copy-0=*;
    dparameter-symbol-0=FILENAME; dparameter-copy-0=*;
    message-header-file=2; original-header-file=1;
    override-header-file=1; override-option-file=1;
    command="/opt/SUNWmsgsr/private/virusscan.sh"
    Following entry from /opt/SUNWmsgsr/lib/config-templates/imta_tailor
    IMTA_CONVERSION_FILE=<msg.RootPathUNIX>/config/conversions
    Is this above information u r asking?
    As u wrote erlier, the conversion channel works some times and some times doesn't work.
    Thanks lot...
    BSKADAM

  • Connection to server on port 25 timed out

    Can't send mail. Connection to the server "smtp.ca.astound.net" on port 25 timed out.
    I keep getting this error when sending mail. I can receive mail but just can't send.
    I noticed this problem sometime after installing the Security Update 2006-005, Security Update 2006-007 and Airport Firmware Update 5.7. I don't know that any of these are the cause but I'm trying to provide as much detail surrounding the problem as I can. I had been receiving and sending mail with no problem for the several years that I've had this set up and now I can't send mail.
    I am using a 17" Powerbook running OS 10.3.9 and connecting wirelessly to an Airport Extreme. I'm using Apple Mail as my email software, but I have also tried to send through Entourage with no luck. I am using an email account and SMTP server provided by my ISP. I also have an old iMac running 10.3.5 that is wired directly to the Airport. I have an email account set up on the iMac and can't send from there either.
    My ISP (Astound), who handles the cable modem, has said that they haven't made any recent changes on their side and confirmed with me that my account settings are correct. I even deleted my account and rebuilt it with no success. Although I am able to send email through webmail using my ISP's website. Based on that test they say that there aren't any problems on their side.
    Are there some settings on the airport that may be affecting this? Any ideas on what I'm missing? I'm baffled.
    PowerBook G4 17in, 1GHz   Mac OS X (10.3.9)  

    Go to Apple Menu > System Preferences > Network, choose Network Port Configurations from the Show popup menu, and make sure that the configuration used to connect to Internet appears at the top of the list.
    Also, try using a different method to connect to Internet, if possible, or connecting the computer to Internet as directly as possible, i.e. bypassing any routers that might be present, using an ethernet cable instead of wireless, etc., and see whether that makes a difference.
    It could very well be that the problems are related to having installed a system update, usually not because of the update itself, but rather as a result of not having installed it properly, or having ignored Apple’s "Important: Please read before installing" warnings, etc.
    Some (but not all) of the problems caused by not having installed an update properly can be fixed by (properly) reinstalling it. If you suspect a particular update could have a bearing on this, proceed as follows.
    Verify/repair the startup disk (not just permissions), as described here:
    The Repair functions of Disk Utility: what's it all about?
    After having fixed all filesystem issues, if any, reinstall any updates that may not have been installed properly. In some cases, it may also be necessary or convenient to reinstall the Combo Update for the type of computer and the version of Mac OS X you’re using, unless this is the version of Mac OS X that came with your computer:
    Mac OS X 10.3.9 Combo Update
    Take a look at the following articles for guidelines on how to properly install system updates:
    Troubleshooting installation and software updates
    Installing software updates
    Basically, you should verify/repair the startup disk before installing the update, no applications should be running while installing it, and you may experience unexpected results if you have third-party system software modifications (not normal applications) installed.

Maybe you are looking for

  • What is the best Macbook for me? (Music producer)

    Hello. I'm looking for the perfect Macbook for which I can use for recording vocals and producing instrumental beats. It is highly important that the music software, which I use, will run smoothly and quickly. Thanks a lot and I hope you can help!

  • ABAP WD - Dump Perform in program

    Hi forum, I've a dump that I'm not able to solve. The problem is that I had a perform in program with 2 parameter and I changed it with 3 parameters. I had adjusted all the code for this form in a subroutine pool program type. The command call is.   

  • Message type and Process Code for 940 IDoc

    Hi, what Message type and Process Code can be used for 940 IDoc when a SHPMNT05 IDoc is being used. We are using SHPADV message, SHPM process code for ASN. Can I use the SHPMNT message type for 940? thanks, Kumar.

  • Does the iPad support Function keys natively, not through another program?

    I have my Operations department which needs to access a couple of customer databases through the web using a java applet. I do not want them to have to come to the office so we got them a netbook, but I was hoping that the iPad would be a better solu

  • How to transfer itunes library to new computer

    Got a new computer.   I thought when I downloaded Itunes onto it that my music library would be available once I logged in but it is not.  How do I get the my music from itunes onto this computer instead of my old computer I have already authorized t