× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Is it a name resolution issue? Is it found in DNS? Do you have
multiple interfaces on the server machine?

On Dec 6, 2007 6:42 PM, Chris Bipes <chris.bipes@xxxxxxxxxxxxxxx> wrote:
Make sure the server job is listening on a real IP and not the localhost
of 127.0.0.1 only.

Chris Bipes
Director of Information Services
CrossCheck, Inc.


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of keith
Sent: Thursday, December 06, 2007 3:00 PM
To: MIDRANGE-L@xxxxxxxxxxxx
Subject: 3425 ECONNREFUSED

i am having the following problem..i am trying to run a socket
communication between and 820 and an i5..the server and client connect
run fine as long as they are on the same machine..i am using the 820 as
the server and the i5 as client..when the client attempts to connect
with the server i get the following message 3425 ECONNREFUSED..this
happens no matter how i try to get the address..i have tried with
gethostbyname using the host name and also with inetaddr using the
actual ip address..i think there is some sort of configuration problem
but cannot find it..thought it was because the i5 had alwanynet set to
*no but that did not fix the problem..inetaddr gets an address but again

the same message..gethostbyname ends up with address of 0..netstatus
shows that the server is active and listening..

this has become a critical issue..can anyone help

the server is active and listening on socket 2000 which is the one i am
using..netstat *cnn shows this to be true on the server system which
every system i use for the server..

the only change to the client code from running client and server on the

same system is the change of

D servername s 255a inz('LOCALHOST')

to the actual server name..this is verified using navigator as being in
the table with the correct ip address..and is found by the
gethostbyname..there are no errors up to the point of actual connection
with the connect..this is when the econnrefused occurs..

now when gethostbyname is used it comes back with an address to go into
sinaddr of 0 when the ip address is coded in and inetaddr is used
sinaddr comes back with an actual number for the address..

i just found your code last night..i have been using the example in the
rpg redbook who knew and have used this same program setup before for
socket connections with no problems..but that was also using local host
and connecting with a pc connected as a workstation..not between two
as/400 or iseries..

i hope this makes it a bit more clear..

as i said i can run the client and server together on each individual
system using localhost for the server name with no problem..when i
change from i try to install and run server on one system and the client

on the other i get the econnrefused message and in every case whichever
system the server is shown in netstat as being up..running and
listening..
i made some changes to include inet_ntoa so i could check to see if i am

getting a correct address and ip number from the gethostbyname..i am..

the socketaddr data structure on the client side has the following
information

sinfamily of socketaddr = 2
sinport of socketaddr = 2000
sinaddr of socketaddr = 3232235876 which converts to 198.162.1.100 when
placed into inet_ntoa which is correct
sinzero of socketaddr = ' '

on the server machine the server is active and is waiting in debut mode
at the accept function..

netstat *cnn shows the server active and listening on port 2000

when the client issues the connect function it always gets the error
message 3425 connection refused..

as i said when i run the client and server on the same machine there are

no problems connecting even when the server name is used instead of
localhost..

i have checked many times in navigator and the server name is in the
table with the correct ip address..

so i dont know what is happening..

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.