This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Error: Socket was forcibly closed by remote host


Hi all

The problem with the socket forcibly closing was solved. We were running our
BOOTP server on a host with IP address 192.168.144.XXX and it was assigning
an IP address 192.168.128.YYY. As soon as we changed it to 192.168.144.YYY,
the problem disappeared. HOWEVER, the board still doesn't take the IP
address assigned.

We even tried running the BOOTP desktop from a host with IP address
192.168.128.XXX, but the problem persists.

-------------------------------------------------------------------

SIOCSIFADDR: Device not configured
BOOTP/DHCP failed on eth0
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
BOOTP[eth1] op: REQUEST
       htype: Ethernet
        hlen: 6
        hops: 0
         xid: 0x0
        secs: 0
       flags: 0x0
       hw_addr: 00:a0:1e:01:07:b1
     client IP: 0.0.0.0
         my IP: 0.0.0.0
     server IP: 0.0.0.0
    gateway IP: 0.0.0.0
  options:
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode

--------------------------------------------------------------------

Well, this is what the BOOTP Desktop support guy suggested and we followed
it up:

---------------------------------------------------------------------

> > "BOOTP Desktop encountered an error while reading from socket.The system
> > error is: An existing connection was forcibly closed by the remote
host."
> >
> >   We are using your BOOTP Desktop v1.5 for testing our products. As part
> > of the software initialization, our network code is supposed to send a
> > BOOTP request to the server and use the IP address returned by it. When
> > we run the code however, the BOOTP desktop receives the BOOTP request
and
> > even transmits the IP address (we can see this from the BOOTP Desktop
> > window; it says something like "Entry found, successfully replied"). But
> > then it flashes a dialog saying something like "Error: Socket was
> > Forcibly Closed by Remote Host". And then when we check the IP address
of
> > our board, we find it's using 0.0.0.0, despite the BOOTP server having
> > returned a proper IP address.
> >
> >   Could you tell us under what exact conditions is this error message
> > displayed by your BOOTP desktop? This would help us understand the
> > problem better.

I believe that this error is typically caused by ICMP packets being sent to
the BOOTP server. One possibility is that you have closed your socket before
receiving the reply? If that happened, then you'd see a valid BOOTP packet
from the server to the client, but the client would find that no program was
listening on the destination port, and would generate an
ICMP-port-unreachable back to the server.

Grab a copy of Ethereal (www.ethereal.com) and do a packet trace of this
activity. Look for ICMP packets sent by your client. Also, you can send me
that trace and I'll have a look at it to see if I can find anything.

- Bud

Bud Millwood
Weird Solutions, Inc.

---------------------------------------------------------------------

Well we grabbed the network data with Ethereal when the BOOP procedure was
going on. We see that the board sends out the BOOTP request and the host
responds with a BOOTP reply. But the board still isn't taking the IP
address! Nothing seems wrong from the Ethereal capture data. However, we see
that two more BOOTP broadcasts follow the server BOOTP reply, from IP
addresses 10.3.2.12 and 10.1.2.11! Where are these coming from?

This is what we're investigating currently.

[ATTACHED FILES CONTAIN ETHEREAL CAPTURE DATA - SEE IN ETHEREAL]

ethereal1.txt - BOOTP server assigning 192.168.144.XXX IP address

ethereal2.txt - BOOTP server assigning 192.168.128.XXX IP address

Thanks for your help, all you guys!

Regards

Chandrashekhar Padiyar

----------------------------------------------------------------------

----- Original Message -----
From: "Andrew Lunn" <andrew@lunn.ch>
To: "Vijay Padiyar" <vijay_padiyar@hotmail.com>
Cc: "eCos Support" <ecos-discuss@sources.redhat.com>
Sent: Wednesday, September 29, 2004 5:13 PM
Subject: Re: [ECOS] Error: Socket was forcibly closed by remote host


> On Wed, Sep 29, 2004 at 04:50:31PM +0530, Vijay Padiyar wrote:
> > Hi Andrew
> >
> > In our current setup, the Redboot monitor gets its IP address from a
DHCP
> > server probably (it's certainly not our BOOTP server) coz the IP address
> > keeps on varying.
> >
> > Whereas for the application image, we're using BOOTP to get the IP
address
> > and we have our BOOTP server installed on a computer on the network. So
the
> > IP addresses for Redboot and the application are different. However, the
two
> > IP addresses are from different subnets. The IP address assigned by DHCP
to
> > Redboot is something like 192.168.128.210 (last part varies) and the IP
> > address configured by us in our BOOTP server is 192.168.144.200. Could
the
> > different subnets (192.168.128.xxx and 192.168.144.xxx) be causing any
> > problems by any chance??
>
> It should not cause this problem. You might have problems later if
> your gateway is not configured correctly to have two subnets on one
> physical net.
>
> > Everything else is as you've suggested it should be. Thanks for your
help!
>
> Look at the sources for your bootp server. Find out what it means by
> the error it is giving. bootp is based on UDP, so there is no
> connection between the client and the server, so the error seems
> strange to me. Understanding the error will probably get you a big
> step towards finding the problem.
>
>         Andrew
>

Attachment: ethereal2.txt
Description: Text document

Attachment: ethereal1.txt
Description: Text document

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]