# mpd5 fails to start at system boot.



## Blinky (Oct 27, 2011)

Hello,

I have an internet connection over VPN and I am using mpd5 (pptp_client). After booting FreeBSD 8.2 I get errors in mpd5 log:

```
Oct 27 19:12:51  mpd: Multi-link PPP daemon for FreeBSD
Oct 27 19:12:51  mpd:  
Oct 27 19:12:51  mpd: process 1122 started, version 5.5 (root@10.3.71.103 16:22 20-Sep-2011)
Oct 27 19:12:51  mpd: Label 'startup' not found
Oct 27 19:12:51  mpd: [B1] Bundle: Interface ng0 created
Oct 27 19:12:51  mpd: mpd.conf:55: Error in 'set pptp peer vpn.hds'
Oct 27 19:12:51  mpd: [L1] Link: OPEN event
Oct 27 19:12:51  mpd: [L1] LCP: Open event
Oct 27 19:12:51  mpd: [L1] LCP: state change Initial --> Starting
Oct 27 19:12:51  mpd: [L1] LCP: LayerStart
Oct 27 19:12:51  mpd: [L1] PPTP call failed
Oct 27 19:12:51  mpd: [L1] Link: DOWN event
Oct 27 19:12:51  mpd: [L1] LCP: Down event
Oct 27 19:12:51  mpd: [L1] Link: reconnection attempt 1 in 2 seconds
Oct 27 19:12:53  mpd: [L1] Link: reconnection attempt 1
Oct 27 19:12:53  mpd: [L1] PPTP call failed
Oct 27 19:12:53  mpd: [L1] Link: DOWN event
Oct 27 19:12:53  mpd: [L1] LCP: Down event
Oct 27 19:12:53  mpd: [L1] Link: reconnection attempt 2 in 2 seconds
Oct 27 19:12:55  mpd: [L1] Link: reconnection attempt 2
Oct 27 19:12:55  mpd: [L1] PPTP call failed
Oct 27 19:12:55  mpd: [L1] Link: DOWN event
Oct 27 19:12:55  mpd: [L1] LCP: Down event
Oct 27 19:12:55  mpd: [L1] Link: reconnection attempt 3 in 2 seconds
Oct 27 19:12:57  mpd: [L1] Link: reconnection attempt 3
Oct 27 19:12:57  mpd: [L1] PPTP call failed
Oct 27 19:12:57  mpd: [L1] Link: DOWN event
Oct 27 19:12:57  mpd: [L1] LCP: Down event
Oct 27 19:12:57  mpd: [L1] Link: reconnection attempt 4 in 4 seconds
Oct 27 19:13:01  mpd: [L1] Link: reconnection attempt 4
Oct 27 19:13:01  mpd: [L1] PPTP call failed
Oct 27 19:13:01  mpd: [L1] Link: DOWN event
Oct 27 19:13:01  mpd: [L1] LCP: Down event
Oct 27 19:13:01  mpd: [L1] Link: reconnection attempt 5 in 2 seconds
Oct 27 19:13:03  mpd: [L1] Link: reconnection attempt 5
Oct 27 19:13:03  mpd: [L1] PPTP call failed
Oct 27 19:13:03  mpd: [L1] Link: DOWN event
Oct 27 19:13:03  mpd: [L1] LCP: Down event
Oct 27 19:13:03  mpd: [L1] Link: reconnection attempt 6 in 3 seconds
Oct 27 19:13:06  mpd: [L1] Link: reconnection attempt 6
Oct 27 19:13:06  mpd: [L1] PPTP call failed
Oct 27 19:13:06  mpd: [L1] Link: DOWN event
Oct 27 19:13:06  mpd: [L1] LCP: Down event
.........
```
After restarting mpd5 everything works good.

Here is mpd.conf:

```
default:
        load pptp_client

pptp_client:
        create bundle static B1
        set iface route default
        set ipcp ranges 0.0.0.0/0 0.0.0.0/0
        set ipcp yes vjcomp
        set iface idle 0
        set iface enable tcpmssfix

# Enable MPPE
        set bundle enable compression
        set ccp yes mppc
        set mppc yes e128
        set bundle enable crypt-reqd
        set mppc yes stateless
        
        create link static L1 pptp
        set link action bundle B1
        
        set link no pap chap eap
        set link disable chap 
        set link accept chap

        set auth disable internal
        set auth authname "PPPuser"
        set auth password "password"
        set link yes acfcomp protocomp
        set link max-redial 0
        set link mtu 1460
        set link keep-alive 20 75
        set pptp peer vpn.domain.com
        open
```

I solved this problem by adding "sleep 3" to the /usr/local/etc/rc.d/mpd5 script, but it's not a good solution. Is there a better solution?

Sorry for my bad english.


----------



## ecazamir (Oct 28, 2011)

What do you have on 55th line of mpd.conf?
Your log has: 

```
Oct 27 19:12:51  mpd: mpd.conf:55: Error in 'set pptp peer vpn.hds'
```
But i see no 'set pptp peer vpn.hds' on the configuration.
If the peer host is specified by name, perhaps it would help setting the peer by IP address.


----------



## Blinky (Oct 29, 2011)

ecazamir said:
			
		

> What do you have on 55th line of mpd.conf?
> Your log has:
> 
> ```
> ...


vpn.hds is real address of pptp server, i forgot change it to vpn.domain.com when writing post (so, vpn.hds == vpn.domain.com), sorry.


----------

