# csup connection reset



## irzyxel (Feb 28, 2010)

In advance, sorry I am a noob. Had a box many years ago and it ran about a year 24/7 till the box died. I've since forgotten almost everything and I'm starting over now. 

I hope this is posted in the correct place. I'm trying to run csup on a fresh install of 8.0-RELEASE.

After trying many, many times it managed to go through once successfully. 
I've tried all the mirrors many times. I've looked up what information I could find on the issue and what I've found indicates a break in the communication somewhere. The box is behind a NAT router.
Things I've tried are: forwarding 5999, DMZ, checking local security options. I have not tried enabling DHCP and connecting directly to the cable modem.

This is what I get:


```
# csup -L 2 /root/ports-supfile
Parsing supfile "/root/ports-supfile"
Connecting to cvsup1.FreeBSD.org
Connected to 72.233.193.64
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
Receiver: connection reset by peer
Will retry at 09:53:38
^C
```


Can anyone give me some pointers as to finding the issue with this? Thanks!


----------



## sixtydoses (Feb 28, 2010)

Try a different host. Override with `-h`.

e.g.:

```
cvsup -g -L 2 -h cvsup10.FreeBSD.org /root/ports-supfile
```


----------



## irzyxel (Feb 28, 2010)

I get the same 

```
Receiver: Connection reset by peer
```


----------



## FBSDin20Steps (Feb 28, 2010)

Did you try...


```
# csup ports-supfile
```

assuming that you are in your root dir.


----------



## irzyxel (Feb 28, 2010)

From /root:


```
# csup ports-supfile
Connected to 72.233.193.64
Receiver: Connection reset by peer
Will retry at 11:03:22
^C
#
```

I have tried the other addresses in the cvsup "Primary Mirror Sites" list (i.e. cvsup1. through cvsup18.FreeBSD.org) and I get the same message using any of the following:

from /root
`csup ports-supfile`
^with my own -supfile

or normally from /usr/ports
`# csup -L 2 -h cvsup2.FreeBSD.org /usr/share/examples/cvsup/ports-supfile`
^as the handbook shows

`# csup -g -L 2 -h cvsup10.FreeBSD.org /root/ports-supfile`

All Connected to, then 
	
	



```
Receiver: Connection reset by peer
```


----------



## FBSDin20Steps (Feb 28, 2010)

Can you show us your ports-supfile?


----------



## irzyxel (Feb 28, 2010)

Here is what is not commented out:


```
*default host=cvsup1.FreeBSD.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix
*default compress
ports-all
```


----------



## FBSDin20Steps (Feb 28, 2010)

I don't know where you come from, but you can use your country code like eg. 
*default host=cvsup.nl.FreeBSD.org


----------



## irzyxel (Feb 28, 2010)

From /root

```
# csup -L 2 -h cvsup10.us.FreeBSD.org ports-supfile
Parsing supfile "ports-supfile"
Connecting to cvsup10.us.FreeBSD.org
Connected to 69.147.83.48
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
Receiver: Connection reset by peer
Will retry at 14:25:03
^C
#
```


----------



## DutchDaemon (Feb 28, 2010)

irzyxel -> *Posting and Editing in the FreeBSD Forums*


----------



## FBSDin20Steps (Feb 28, 2010)

What you can do is to restart your network services with:


```
# /etc/rc.d/netif forcerestart
# /etc/rc.d/routing forcerestart
```

and try csup again...


----------



## irzyxel (Feb 28, 2010)

Sorry DutchDaemon.

Note: I do not have FreeBSD firewalls setup/running yet. It was more like second on my list behind being able to ssh into the box from the LAN so I can go upstairs and configure everything else using the laptop(so the woman doesn't yell at me to come sit next to her while she watches dumb tv shows).

I can ssh into the box from itself, to itself. Doesn't say a lot, but it's not nothing. Using putty from another machine just hangs until it times out. My only real changes to anything so far from the default installation have been enabling sshd in /etc/rc.conf and from port 22 to port 25. Oh, and disabling root login.

```
/etc/rc.d/sshd status
sshd is running as pid 1893
```

I'm typing all this up on another pc, so I am trying to not make any typos. 
My problems started with sshd and from there I started checking into the rest of the box such as updating my ports and found the connection issue with csup.

It seems I somewhat got off subject, but I figured if there's a problem with being able to ssh into the box it could open some thoughts as to my connection problem with csup?
Okay, so continuing on I changed my network configuration to DHCP. Power cycled the modem to wipe it's MAC memory of the router and restarted the FreeBSD box with it connected directly to the cable modem.
Sent some pings out to google.com for sanity sake to verify I have internet connectivity. Opened FreeBSD.org with lynx. Works. Works. 
I ran csup to the entire list of mirros twice and still returns with same Connection reset as my prior posts.

I turned DHCP off and set static connecting to my router again.

Here is ifconfig output with my generic LAN settings.

```
$ ifconfig vge0
vge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
        ether 00:50:8d:d1:d5:bd
        inet 192.168.1.20 netmask 0xffffff00 broadcast 192.168.1.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
```

Okay, this I don't get. Why? Because on bootup it says:

```
Setting hostname: somestuff.
vge0: link state changed to DOWN
Starting Network: vge0.
vge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
        ether 00:50:8d:d1:d5:bd
        inet 192.168.1.20 netmask 0xffffff00 broadcast 192.168.1.255
        media: Ethernet autoselect (none)
        status: no carrier
add net default: gateway 192.168.1.1
```

Why do boot and ifconfig not match? It looks like on boot the system doesn't see the cable plugged in, yet when I run ifconfig it does? Am I just retarded?


----------



## FBSDin20Steps (Mar 1, 2010)

Maybe you have a corrupt port in your /usr/ports. Remove your ports collection with:

```
# rm -rf /usr/ports
```
and start over with csup. Hope this helps.


----------



## irzyxel (Mar 1, 2010)

`# rm -rf /usr/ports`
Created directory. Ran csup from ports. It ran for roughly 5min and got to 

```
Checkout ports/editors/omegaT/pkg-plist
Receiver: Connection reset by peer
Will retry at 02:59:34
```
I tried several more times using other mirrors and ended up where I was originally.

```
# csup -L 2 -h cvsup13.FreeBSD.org /root/ports-supfile
Parsing supfile "/root/ports-supfile"
Connecting to cvsup13.FreeBSD.org
Connected to 143.106.51.13
Server software version: SNAP_16_1h
Negotiating file attribute support
Exchanging collection information
Establishing multiplexed-mode data connection
Running
Receiver: Connection reset by peer
```

I found why sshd wasn't working, sendmail(I feel dumb). I had no practical reason to run sshd on 25, so I changed it to an unused port. So that makes posting information here much easier.


----------



## FBSDin20Steps (Mar 1, 2010)

I found this http://unix.derkeiler.com/Mailing-Lists/FreeBSD/current/2010-01/msg00032.html for you.


----------



## irzyxel (Mar 1, 2010)

Nice info. Thank you! 
I am going to check on that later today when I have some free time. 
My plan eventually is to setup my box as a gateway. Now I think I would be better off getting two new nics and not using the current on-board at all.


```
# pciconf -lcv
vge0@pci0:0:14:0:       class=0x020000 card=0x1415147b chip=0x31191106 rev=0x11 hdr=0x00
    vendor     = 'VIA Technologies Inc'
    device     = ''Velocity' Gigabit Ethernet Controllers (VT6120/VT6121/VT6122)'
    class      = network
    subclass   = ethernet
    cap 01[50] = powerspec 2  supports D0 D1 D2 D3  current D0
```


----------



## irzyxel (Mar 2, 2010)

There is a patch: vge.busdama.diff3
I attempted to use this patch, however it didn't help. 
I'm just going to disable the on-board vge nic and go to the store today and buy a new card. I've never been one to spend a lot of time on driver issues. It's too easy to waste so much time on driver problems. Honestly.
Can mark this as solved.


----------



## FBSDin20Steps (Mar 2, 2010)

You can do this yourself...  http://forums.freebsd.org/showpost.php?p=66152&postcount=2


----------



## irzyxel (Mar 2, 2010)

FAQ: Editing and Deleting your Posts
I am not a regular user yet, so I cannot.


----------



## irzyxel (Mar 2, 2010)

Just to add a bit of finality to this issue...

I dropped the new nic in. It's a KT8 board. The thing wouldn't even post. I messed with it till I could get into the bios. 
Disabled the on-board nic and firewire to free up some resources. The thing would post, but not recognize the RAM. 
I removed the x-fi card, which I didn't need, and enabled on-board sound(if I even use it later). Then it would recognize the RAM. It booted to login and what do you know? I have a mouse. Hah! I find that really amusing since it's at the top of the "I don't need this" list. Odd that it didn't work before and now it does, but whatever.

Anyway, continuing on I commented out a couple of lines in the /etc/rc.conf and tried
`# csup -L 2 /root/ports-supfile`
It's working like a charm now without any issues. So problem literally solved now.


----------



## FBSDin20Steps (Mar 2, 2010)

Good to hear, man. Enjoy FreeBSD


----------



## irzyxel (Mar 3, 2010)

Something to note: After csup had finished, I was trying to install some ports. I kept getting errors referring to /usr/ports/distfiles
One package said a file needed to be in that "folder", so figure I'll take a look as I have the file that's supposed to be cp there.
`# cd /usr/ports/distfiles`
Error it isn't a directory? Why isn't it? Something not right out-of-the-box?
Bahh!
Okay... Me being a noob, I have no idea why it's broken, what the problem is, or how to fix it. So I guess!
I say what the heck, worst I can do is have to reinstall right?
`# rm /usr/ports/distfiles`
`# mkdir /usr/ports/distfiles`
Alright, lets see what happens now!
`# cd /usr/ports/audio/something_random`
`# make install clean`
Bingo! We're in business! Installed a couple of things and now it's working...again.


----------

