# "Cannot read configuratioon file '/dev/fd/63'"

## cedric007

Hello all,

This is my first post on the forum.

I have been using Gentoo for 6 months now, everything was just -FINE-  :Wink: 

I however now come across the following problem and cannot connect to the internet anymore:

```

#/etc/init.d/rp-pppoe start

```

does nothing anymore except a TIME OUT after a few seconds and nothing at all in the system logs  :Sad: 

Looking at the scripts I have seen that I can set DEBUG to 1 using:-

```

#export DEBUG=1

```

and now 'rp-pppoe start' tells me more, it says:

 *Quote:*   

> 
> 
> *** Running in debug mode...please be patient...
> 
> /usr/sbin/adsl-connect: Cannot read configuratioon file '/dev/fd/63'
> ...

 

The directory /dev/fd did not exist so I have created it as root ... It does not fix the problem

I have re-run adsl-setup, checked everything I could think of, but I am not yet good enough to diagnose and fix this issue - I d'ont have a clue and am well sad because I cannot get internet to work anymore - PLEASE HELP

BTW I have emerged the latest stable version or ppp and rp-pppoe

----------

## NeddySeagoon

cedric007,

Whatever points to the config file

```
 /dev/fd/63
```

 is corrupt. That would be your 64th floppy drive.

I'm not a

```
 /usr/sbin/adsl-connect
```

user but I suspect that its a script rather than a binary program.

Can you read it with less?

----------

## cedric007

Here is adsl-start

```

#!/bin/bash

# Generated automatically from adsl-start.in by configure.

#***********************************************************************

#

# adsl-start

#

# Shell script to bring up an ADSL connection

#

# Copyright (C) 2000 Roaring Penguin Software Inc.

#

# $Id: adsl-start.in,v 1.8 2002/04/09 17:28:39 dfs Exp $

#

# This file may be distributed under the terms of the GNU General

# Public License.

#

# LIC: GPL

#

# Usage: adsl-start [config_file]

#        adsl-start interface user [config_file]

# Second form overrides USER and ETH from config file.

# If config_file is omitted, defaults to /etc/ppp/pppoe.conf

#

#***********************************************************************

# From AUTOCONF

prefix=/usr

exec_prefix=${prefix}

# Paths to programs

CONNECT=${exec_prefix}/sbin/adsl-connect

ECHO=/bin/echo

IFCONFIG=/sbin/ifconfig

# Set to "C" locale so we can parse messages from commands

LANG=C

export LANG

# Defaults

CONFIG=/etc/ppp/pppoe.conf

USER=""

ETH=""

ME=`basename $0`

# Must be root

if [ "`/bin/id -u`" != 0 ] ; then

    $ECHO "$ME: You must be root to run this script" >& 2

    exit 1

fi

# Debugging

if [ "$DEBUG" = "1" ] ; then

    $ECHO "*** Running in debug mode... please be patient..."

    DEBUG=/tmp/pppoe-debug-$$

    export DEBUG

    mkdir $DEBUG

    if [ "$?" != 0 ] ; then

   $ECHO "Could not create directory $DEBUG... exiting"

   exit 1

    fi

    DEBUG=$DEBUG/pppoe-debug.txt

    # Initial debug output

    $ECHO "---------------------------------------------" > $DEBUG

    $ECHO "* The following section contains information about your system" >> $DEBUG

    date >> $DEBUG

    $ECHO "Output of uname -a" >> $DEBUG

    uname -a >> $DEBUG

    $ECHO "---------------------------------------------" >> $DEBUG

    $ECHO "* The following section contains information about your network" >> $DEBUG

    $ECHO "* interfaces.  The one you chose for PPPoE should contain the words:" >> $DEBUG

    $ECHO "* 'UP' and 'RUNNING'.  If it does not, you probably have an Ethernet" >> $DEBUG

    $ECHO "* driver problem." >> $DEBUG

    $ECHO "Output of ifconfig -a" >> $DEBUG

    $IFCONFIG -a >> $DEBUG

    $ECHO "---------------------------------------------" >> $DEBUG

    if [ "`uname -s`" = "Linux" ] ; then

        $ECHO "* The following section contains information about kernel modules" >> $DEBUG

   $ECHO "* If the module for your Ethernet card is 'tulip', you might" >> $DEBUG

   $ECHO "* want to look for an updated version at http://www.scyld.com" >> $DEBUG

   $ECHO "Output of lsmod" >> $DEBUG

   lsmod >> $DEBUG

   $ECHO "---------------------------------------------" >> $DEBUG

    fi

    $ECHO "* The following section lists your routing table." >> $DEBUG

    $ECHO "* If you have an entry which starts with '0.0.0.0', you probably" >> $DEBUG

    $ECHO "* have defined a default route and gateway, and pppd will" >> $DEBUG

    $ECHO "* not create a default route using your ISP.  Try getting" >> $DEBUG

    $ECHO "* rid of this route." >> $DEBUG

    $ECHO "Output of netstat -n -r" >> $DEBUG

    netstat -n -r >> $DEBUG

    $ECHO "---------------------------------------------" >> $DEBUG

    $ECHO "Contents of /etc/resolv.conf" >> $DEBUG

    $ECHO "* The following section lists DNS setup." >> $DEBUG

    $ECHO "* If you can browse by IP address, but not name, suspect" >> $DEBUG

    $ECHO "* a DNS problem." >> $DEBUG

    cat /etc/resolv.conf >> $DEBUG

    $ECHO "---------------------------------------------" >> $DEBUG

    $ECHO "* The following section lists /etc/ppp/options." >> $DEBUG

    $ECHO "* You should have NOTHING in that file." >> $DEBUG

    $ECHO "Contents of /etc/ppp/options" >> $DEBUG

    cat /etc/ppp/options >> $DEBUG 2>/dev/null

    $ECHO "---------------------------------------------" >> $DEBUG

else

    DEBUG=""

fi

# Sort out command-line arguments

case "$#" in

    1)

   CONFIG="$1"

   ;;

    3)

   CONFIG="$3"

   ;;

esac

# In Gentoo, CONFIG is a named pipe when adsl is started by the

# network scripts.  Testing -r is allowed; testing -f is not.

if [ ! -r "$CONFIG" ] ; then

    $ECHO "$ME: Cannot read configuration file '$CONFIG'" >& 2

    exit 1

fi

# Read the named pipe (/dev/fd/foo) into a variable so we can use it

# again later (since reading once from the pipe will exhaust it)

CONFREAD=$(<$CONFIG)

eval "$CONFREAD"

# Check for command-line overriding of ETH and USER

case "$#" in

    2|3)

   ETH="$1"

   USER="$2"

   ;;

esac

# Check for pidfile

if [ -r "$PIDFILE" ] ; then

    PID=`cat "$PIDFILE"`

    # Check if still running

    kill -0 $PID > /dev/null 2>&1

    if [ $? = 0 ] ; then

   $ECHO "$ME: There already seems to be an ADSL connection up (PID $PID)" >& 2

   exit 1

    fi

    # Delete bogus PIDFILE

    rm -f "$PIDFILE" "$PIDFILE.pppd" "$PIDFILE.pppoe" "$PIDFILE.start"

fi

echo $$ > $PIDFILE.start

# Start the connection in the background unless we're debugging

if [ "$DEBUG" != "" ] ; then

    $CONNECT <(echo "$CONFREAD")

    exit 0

fi

$CONNECT <(echo "$CONFREAD") >/dev/null 2>&1 &

CONNECT_PID=$!

if [ "$CONNECT_TIMEOUT" = "" -o "$CONNECT_TIMEOUT" = 0 ] ; then

    exit 0

fi

# Don't monitor connection if dial-on-demand

if [ "$DEMAND" != "" -a "$DEMAND" != "no" ] ; then

    exit 0

fi

# Monitor connection

TIME=0

while [ true ] ; do

    ${exec_prefix}/sbin/adsl-status <(echo "$CONFREAD") >/dev/null 2>&1

    # Looks like the interface came up

    if [ $? = 0 ] ; then

   # Print newline if standard input is a TTY

   tty -s && $ECHO " Connected!"

   exit 0

    fi

    if test -n "$FORCEPING" ; then

   $ECHO -n "$FORCEPING"

    else

   tty -s && $ECHO -n "$PING"

    fi

    sleep $CONNECT_POLL

    TIME=`expr $TIME + $CONNECT_POLL`

    if [ $TIME -gt $CONNECT_TIMEOUT ] ; then

   break

    fi

done

$ECHO "TIMED OUT" >& 2

# Timed out!  Kill the adsl-connect process and quit

kill $CONNECT_PID > /dev/null 2>&1

# Clean up PIDFILE(s)

rm -f "$PIDFILE" "$PIDFILE.pppd" "$PIDFILE.pppoe" "$PIDFILE.start"

exit 1

```

Here is adsl-connect

```

#!/bin/sh

# Generated automatically from adsl-connect.in by configure.

#***********************************************************************

#

# adsl-connect

#

# Shell script to connect to an ADSL provider using PPPoE

#

# Copyright (C) 2000 Roaring Penguin Software Inc.

#

# $Id: adsl-connect.in,v 1.23 2002/04/09 17:28:39 dfs Exp $

#

# This file may be distributed under the terms of the GNU General

# Public License.

#

# LIC: GPL

#

# Usage: adsl-connect [config_file]

#        adsl-connect interface user [config_file]

# Second form overrides USER and ETH from config file.

# If config_file is omitted, defaults to /etc//ppp/pppoe.conf

#

#***********************************************************************

# From AUTOCONF

prefix=/usr

exec_prefix=${prefix}

localstatedir=/var

# Paths to programs

IFCONFIG=/sbin/ifconfig

PPPD=/usr/sbin/pppd

SETSID=/usr/bin/setsid

PPPOE=${exec_prefix}/sbin/pppoe

LOGGER="/usr/bin/logger -t `basename $0`"

# Set to "C" locale so we can parse messages from commands

LANG=C

export LANG

# Must be root

if test "`/bin/id -u`" != 0 ; then

    echo "$0: You must be root to run this script" >& 2

    exit 1

fi

if test "$SETSID" != "" -a ! -x "$SETSID"; then

    SETSID=""

fi

CONFIG=/etc//ppp/pppoe.conf

USER=""

ETH=""

# Sort out command-line arguments

case "$#" in

    1)

    CONFIG="$1"

    ;;

    3)

    CONFIG="$3"

    ;;

esac

# In Gentoo, CONFIG is a named pipe when adsl is started by the

# network scripts.  Testing -r is allowed; testing -f is not.

if test ! -r "$CONFIG" ; then

    echo "$0: Cannot read configuration file '$CONFIG'" >& 2

    exit 1

fi

# Read the named pipe (/dev/fd/foo) into a variable so we can use it

# again later (since reading once from the pipe will exhaust it)

CONFREAD=$(<$CONFIG)

eval "$CONFREAD"

PPPOE_PIDFILE="$PIDFILE.pppoe"

PPPD_PIDFILE="$PIDFILE.pppd"

# Check for command-line overriding of ETH and USER

case "$#" in

    2|3)

    ETH="$1"

    USER="$2"

    ;;

esac

# Check that config file is sane

if test "$USER" = "" ; then

    echo "$0: Check '$CONFIG' -- no setting for USER" >& 2

    exit 1

fi

if test "$ETH" = "" ; then

    echo "$0: Check '$CONFIG' -- no setting for ETH" >& 2

    exit 1

fi

PPPD_PID=0

# Catch common error

if test "$DEBUG" = "1" ; then

    echo "*** If you want to use DEBUG, invoke adsl-start, not adsl-connect."

    exit 1

fi

if test "$DEBUG" != "" ; then

    if test "$LINUX_PLUGIN" != "" ; then

   echo "Cannot use DEBUG mode and LINUX_PLUGIN at the same time."

   echo "Kernel-mode PPPoE is experimental and unsupported."

   exit 1

    fi

    echo "* The following section identifies your Ethernet interface" >> $DEBUG

    echo "* and user name.  Some ISP's need 'username'; others" >> $DEBUG

    echo "* need 'username@isp.com'.  Try both" >> $DEBUG

    echo "ETH=$ETH; USER=$USER" >> $DEBUG

    echo "---------------------------------------------" >> $DEBUG

fi

# MTU of Ethernet card attached to modem MUST be 1500.  This apparently

# fails on some *BSD's, so we'll only do it under Linux

if test `uname -s` = Linux ; then

    $IFCONFIG $ETH up mtu 1500

    # For 2.4 kernels.  Will fail on 2.2.x, but who cares?

    modprobe ppp_generic > /dev/null 2>&1

    modprobe ppp_async > /dev/null 2>&1

    modprobe ppp_synctty > /dev/null 2>&1

    if test -n "$LINUX_PLUGIN" ; then

   modprobe pppox > /dev/null 2>&1

   modprobe pppoe > /dev/null 2>&1

    fi

fi

if test "$SYNCHRONOUS" = "yes" ; then

    PPPOE_SYNC=-s

    PPPD_SYNC=sync

   # Increase the chances of it working on Linux...

    if test `uname -s` = Linux ; then

   modprobe n_hdlc > /dev/null 2>&1

    fi

else

    PPPOE_SYNC=""

    PPPD_SYNC=""

fi

if test -n "$ACNAME" ; then

    ACNAME="-C $ACNAME"

fi

if test -n "$SERVICENAME" ; then

    SERVICENAMEOPT="-S $SERVICENAME"

else

    SERVICENAMEOPT=""

fi

if test "$CLAMPMSS" = "no" ; then

    CLAMPMSS=""

else

    CLAMPMSS="-m $CLAMPMSS"

fi

# If DNSTYPE is SERVER, we must use "usepeerdns" option to pppd.

if test "$DNSTYPE" = "SERVER" ; then

    PEERDNS=yes

    USEPEERDNS=yes

fi

if test "$PEERDNS" = "yes" ; then

    PEERDNS="usepeerdns"

else

    PEERDNS=""

fi

# Backward config file compatibility -- PEERDNS used to be USEPEERDNS

if test "$USEPEERDNS" = "yes" ; then

    PEERDNS="usepeerdns"

fi

if test "$USEPEERDNS" = "no" ; then

    PEERDNS=""

fi

# Backward config file compatibility

if test "$DEMAND" = "" ; then

    DEMAND=no

fi

if test "$DEMAND" = "no" ; then

    DEMAND=""

else

    DEMAND="demand persist idle $DEMAND 10.112.112.112:10.112.112.113 ipcp-accept-remote ipcp-accept-local connect true noipdefault ktune"

fi

case "$FIREWALL" in

    STANDALONE)

    . /etc/ppp/firewall-standalone

    ;;

    MASQUERADE)

    . /etc/ppp/firewall-masq

    ;;

esac

# If we're using kernel-mode PPPoE on Linux...

if test "$LINUX_PLUGIN" != "" ; then

    PLUGIN_OPTS="plugin $LINUX_PLUGIN"

    if test -n "$SERVICENAME" ; then

   PLUGIN_OPTS="$PLUGIN_OPTS rp_pppoe_service $SERVICENAME"

    fi

    # Interface name MUST BE LAST!!

    PLUGIN_OPTS="$PLUGIN_OPTS $ETH"

    modprobe pppoe > /dev/null 2>&1

fi

if test "$DEFAULTROUTE" != "no" ; then

    DEFAULTROUTE="defaultroute"

else

    DEFAULTROUTE=""

fi

# Standard PPP options we always use

PPP_STD_OPTIONS="$PLUGIN_OPTS noipdefault noauth default-asyncmap $DEFAULTROUTE hide-password nodetach $PEERDNS mtu 1492 mru 1492 noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp user $USER lcp-echo-interval $LCP_INTERVAL lcp-echo-failure $LCP_FAILURE $PPPD_EXTRA"

# Jigger DNS if required...

if test "$DNSTYPE" = "SERVER" ; then

    # Sorry, dude...

    rm -f /etc/resolv.conf

    ln -s /etc/ppp/resolv.conf /etc/resolv.conf

elif test "$DNSTYPE" = "SPECIFY" ; then

    # Sorry, dude...

    rm -f /etc/resolv.conf

    echo "nameserver $DNS1" > /etc/resolv.conf

    if test -n "$DNS2" ; then

   echo "nameserver $DNS2" >> /etc/resolv.conf

    fi

fi

# PPPoE invocation

PPPOE_CMD="$PPPOE -p $PPPOE_PIDFILE -I $ETH -T $PPPOE_TIMEOUT -U $PPPOE_SYNC $CLAMPMSS $ACNAME $SERVICENAMEOPT $PPPOE_EXTRA"

if test "$DEBUG" != "" ; then

    if test "$DEMAND" != "" ; then

   echo "(Turning off DEMAND for debugging purposes)"

   DEMAND=""

    fi

    echo "* The following section shows the pppd command we will invoke" >> $DEBUG

    echo "pppd invocation" >> $DEBUG

    echo "$SETSID $PPPD pty '$PPPOE_CMD' $PPP_STD_OPTIONS $PPPD_SYNC debug" >> $DEBUG

    echo "---------------------------------------------" >> $DEBUG

    $SETSID $PPPD pty "$PPPOE_CMD -D $DEBUG-0" \

   $PPP_STD_OPTIONS \

   $PPPD_SYNC \

   debug >> $DEBUG 2>&1

    echo "---------------------------------------------" >> $DEBUG

    echo "* The following section is an extract from your log." >> $DEBUG

    echo "* Look for error messages from pppd, such as" >> $DEBUG

    echo "* a lack of kernel support for PPP, authentication failure" >> $DEBUG

    echo "* etc." >> $DEBUG

    if test -f "/var/log/messages" ; then

   echo "Extract from /var/log/messages" >> $DEBUG

   grep 'ppp' /var/log/messages | tail -150 >> $DEBUG

    elif test -f "/var/adm/messages"; then

   echo "Extract from /var/adm/messages" >> $DEBUG

   grep 'ppp' /var/adm/messages | tail -150 >> $DEBUG

    else

        echo "Can't find messages file (looked for /var/{log,adm}/messages" >> $DEBUG

    fi

    date >> $DEBUG

    echo "---------------------------------------------" >> $DEBUG

    echo "* The following section is a dump of the packets" >> $DEBUG

    echo "* sent and received by rp-pppoe.  If you don't see" >> $DEBUG

    echo "* any output, it's an Ethernet driver problem.  If you only" >> $DEBUG

    echo "* see three PADI packets and nothing else, check your cables" >> $DEBUG

    echo "* and modem.  Make sure the modem lights flash when you try" >> $DEBUG

    echo "* to connect.  Check that your Ethernet card is in" >> $DEBUG

    echo "* half-duplex, 10Mb/s mode.  If all else fails," >> $DEBUG

    echo "* try using pppoe-sniff." >> $DEBUG

    echo "rp-pppoe debugging dump" >> $DEBUG

    cat $DEBUG-0 >> $DEBUG

    rm -f $DEBUG-0

    for i in 1 2 3 4 5 6 7 8 9 10 ; do

   echo ""

   echo ""

   echo ""

    done

    echo "*** Finished debugging run.  Please review the file"

    echo "*** '$DEBUG' and try to"

    echo "*** figure out what is going on."

    echo "***"

    echo "*** Unfortunately, we can NO LONGER accept debugging"

    echo "*** output for analysis.  Please do not send this to"

    echo "*** Roaring Penguin; it is too time-consuming for"

    echo "*** us to deal with all the analyses we have been sent."

    exit 0

fi

echo $$ > $PIDFILE

while [ true ] ; do

    if test "$OVERRIDE_PPPD_COMMAND" != "" ; then

   $SETSID $OVERRIDE_PPPD_COMMAND &

   echo "$!" > $PPPD_PIDFILE

    elif test "$LINUX_PLUGIN" != "" ; then

   $SETSID $PPPD $PPP_STD_OPTIONS $DEMAND &

   echo "$!" > $PPPD_PIDFILE

    else

   $SETSID $PPPD pty "$PPPOE_CMD" \

       $PPP_STD_OPTIONS \

       $DEMAND \

       $PPPD_SYNC &

   echo "$!" > $PPPD_PIDFILE

    fi

    wait

    if test "$RETRY_ON_FAILURE" = "no" ; then

   exit

    fi

    # Run /etc/ppp/adsl-lost if it exists

    test -x /etc/ppp/adsl-lost && /etc/ppp/adsl-lost

    # Re-establish the connection

    $LOGGER -p daemon.notice \

        "ADSL connection lost; attempting re-connection."

    # Wait a bit in case a problem causes tons of log messages :-)

    sleep 5

done

```

These files, I have not modifed them - I guess portage has last time I emerged ...  I am not a computer person so it is very difficult for me to look into these files  :Sad: 

I hope this will help you to help me  :Smile: 

Thanks

----------

## Rawk

I've also had time out problems, but allthough I've had an connection.

Replacing

```

CF_BASE='basename $CONFIG' 

PIDFILE="/var/run/$CF_BASE-adsl.pid"

```

in /etc/ppp/pppoe.conf with

```

PIDFILE="/var/run/adsl.pid"

```

solved the problem.

----------

