Results 1 to 7 of 7

Thread: Connection Refused Exception with Redhat Linux

  1. #1
    mwilson is offline Registered User
    Name: Mark Wilson
    Organization: University of Rochester
    Project: Omega EP laser
    Join Date
    Jul 2005
    Location
    Rochester, NY
    Posts
    100

    Question Connection Refused Exception with Redhat Linux

    Hello,

    I have a service running on Redhat (uname -a: Linux lakeway 2.4.21-15.0.2.EL #1 Wed Jun 16 23:12:30 EDT 2004 i686 i686 i386 GNU/Linux), a client on Solaris 9.

    The service refuses the connection (everything works okay with the service on another Sun box). My sysadmin guy got this from snoop:

    [6] # snoop host lakeway
    Using device /dev/eri (promiscuous mode)
    cactus.lle.rochester.edu -> lakeway.lle.rochester.edu TCP D=10003 S=40826 Syn Seq=4178344468 Len=0 Win=32850 Options=<mss 1460,nop,wscale 3,nop,nop,tstamp 110355863 0,nop,nop,sackOK>
    lakeway.lle.rochester.edu -> cactus.lle.rochester.edu TCP D=40826 S=10003 Rst Ack=4178344469 Win=0
    cactus.lle.rochester.edu -> lakeway.lle.rochester.edu TCP D=10003 S=40827 Syn Seq=4178476356 Len=0 Win=32850 Options=<mss 1460,nop,wscale 3,nop,nop,tstamp 110355864 0,nop,nop,sackOK>
    lakeway.lle.rochester.edu -> cactus.lle.rochester.edu TCP D=40827 S=10003 Rst Ack=4178476357 Win=0

    No Ack is coming from the server, apparently.

    Does this mean I need to update my version of Redhat?

    BTW, I built Ice myself...

    Thanks!
    Mark
    Mark E. Wilson
    Lead Programmer/Analyst
    Omega EP Project
    Laboratory for Laser Energetics (www.lle.rochester.edu)
    University of Rochester
    Rochester, NY 14623

  2. #2
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi Mark,

    Can you run your client and server with the --Ice.Trace.Network=2 command line option and post the trace here? This should give us some clues on why your server isn't accepting the connection!

    Benoit.

  3. #3
    mwilson is offline Registered User
    Name: Mark Wilson
    Organization: University of Rochester
    Project: Omega EP laser
    Join Date
    Jul 2005
    Location
    Rochester, NY
    Posts
    100
    Hi Benoit,

    Here is what the server output:

    ./MSCServer --Ice.Trace.Network=2
    [ ./MSCServer: Network: attempting to bind to tcp socket 127.0.0.1:10003 ]
    [ ./MSCServer: Network: accepting tcp connections at 127.0.0.1:10003 ]

    Here is the client output:

    ./MSCClient --Ice.Trace.Network=2
    [ ./MSCClient: Network: trying to establish tcp connection to 172.20.32.8:10003 ]
    [ ./MSCClient: Network: trying to establish tcp connection to 172.20.32.8:10003 ]
    ./MSCClient: Network.cpp:545: Ice::ConnectionRefusedException:
    connection refused: Connection refused


    Hope this helps.

    Thanks,
    Mark
    Mark E. Wilson
    Lead Programmer/Analyst
    Omega EP Project
    Laboratory for Laser Energetics (www.lle.rochester.edu)
    University of Rochester
    Rochester, NY 14623

  4. #4
    benoit's Avatar
    benoit is online now ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Your server is listening on the loopback interface not on the network interface as shown by the traces. You need to change the configuration of your object adapter to get it to listen on the network interface instead. For example, the property:

    Code:
    HelloAdapter.Endpoints=tcp -h 72.20.32.8 -p 10003
    will configure the adapter named "HelloAdapter" to listen on the interface with the IP address 72.20.32.8 and the port 10003. See the Ice manual for more information on how to configure the object adapter endpoints.

    Let us know if you need more information!

    Benoit.

  5. #5
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    This also suggests that your Linux server is not properly configured.

    `hostname` should not return 'localhost' or 'localhost.localdomain', but a real hostname.
    See the property Ice.Default.Host in the Ice manual.

    Cheers,
    Bernard

  6. #6
    mwilson is offline Registered User
    Name: Mark Wilson
    Organization: University of Rochester
    Project: Omega EP laser
    Join Date
    Jul 2005
    Location
    Rochester, NY
    Posts
    100

    Smile

    Well, it works now. This is how I originally configured it in code:

    adapter_ = communicator()->createObjectAdapterWithEndpoints(
    "MSCAdapter",
    "tcp -h lakeway -p 10003");


    This is what I did to get it to work (in response to you guys):

    adapter_ = communicator()->createObjectAdapterWithEndpoints(
    "MSCAdapter",
    "tcp -h 172.20.32.8 -p 10003");

    and it works.

    Why didn't the first work? When I do 'host lakeway', I get 172.20.32.8.
    Mark E. Wilson
    Lead Programmer/Analyst
    Omega EP Project
    Laboratory for Laser Energetics (www.lle.rochester.edu)
    University of Rochester
    Rochester, NY 14623

  7. #7
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    Your original code is correct (even if he does not work ). It's really a network configuration problem on lakeway, most likely in /etc/hosts.

    `host lakeway` returns 172.20.32.8 when run from lakeway?

    Cheers,
    Bernard

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Ice Connection Refused Exception
    By aswani in forum Help Center
    Replies: 9
    Last Post: 08-12-2009, 02:27 AM
  2. Connection refused (ICE)
    By perkunas in forum Help Center
    Replies: 4
    Last Post: 08-10-2009, 07:09 AM
  3. Connection Refused
    By susannesch in forum Help Center
    Replies: 4
    Last Post: 06-25-2009, 10:52 AM
  4. ICE-E in MFC connection refused
    By Maestro Arohtar in forum Help Center
    Replies: 7
    Last Post: 06-03-2007, 05:08 AM
  5. No slice2java for Linux (no RedHat) at all
    By alvakoldo10 in forum Help Center
    Replies: 11
    Last Post: 10-19-2006, 04:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •