System Administration Guide: Resource Management and Network Services

How to Obtain Debugging Information for Chat Scripts

  1. Become superuser on the dial-out machine.

  2. Edit the /etc/ppp/peers/peer-name file for the peer to be called.

  3. Add -v as an argument to the chat command that is specified in connect option.


    connect "/usr/bin/chat -v -f /etc/ppp/chat-script-name"

  4. View chat script errors in the file /etc/ppp/connect-errors.

    The following is the main error that is seen with chat.


    Oct 31 08:57:13 deino chat[107294]: [ID 702911 local2.info] expect (CONNECT)
    Oct 31 08:57:58 deino chat[107294]: [ID 702911 local2.info] alarm
    Oct 31 08:57:58 deino chat[107294]: [ID 702911 local2.info] Failed

    The example shows timeout while waiting for a (CONNECT)string. When chat fails, you get the following message from pppd:


    Connect script failed

The next table lists common chat script errors and suggestions for fixing them.

Table 35-5 Common Chat Script Problems

Symptom 

Problem 

Solution 

pppd debug output contains Connect script failed

Your chat script supplies a user name and ssword. 


ogin: user-name
ssword: password

However, the peer you intended to connect to does not prompt for this information. 

  1. Delete the login and password from the chat script.

  2. Try to call the peer again.

  3. If you still get the message, call the ISP and ask them for the correct login sequence.

The /usr/bin/chat -v log contains the message: "expect (login:)" alarm read timed out

Your chat script supplies a user name and ssword. 


ogin: pppuser
ssword: \q\U

However, the peer you intend to connect to does not prompt for this information. 

  1. Delete the login and password from the chat script.

  2. Try to call the peer again.

  3. If you still get the message, call the ISP and ask them for the correct login sequence.

pppd debug output contains: possibly looped-back

The local machine or its peer is hanging at the command line and not running PPP. An incorrectly configured login name and password are in the chat script. 

  1. Delete the login and password from the chat script.

  2. Try to call the peer again.

  3. If you still get the message, call the ISP and ask them for the correct login sequence.

pppd debug output shows that LCP activates, but the link terminates soon afterward.

The password in the chat script might be incorrect. 

  1. Ensure that you have the correct password for the local machine.

  2. Check the password in the chat script and fix it if it is incorrect.

  3. Try to call the peer again.

  4. If you still get the message, call the ISP and ask them for the correct login sequence.

Text from the peer begins with a tilde (~). 

Your chat script supplies a user name and ssword. 


ogin: pppuser
ssword: \q\U

However, the peer you intend to connect to does not prompt for this information. 

  1. Delete the login and password from the chat script.

  2. Try to call the peer again.

  3. If you still get the message, call the ISP and ask them for the correct login sequence.

The modem hangs. 

Your chat script contains the following line to force the local machine to wait for the CONNECT message from the peer:


CONNECT "

Use the following line when you want the chat script to wait for CONNECT from the peer:


CONNECT \c

End the chat script with ~ \c.

pppd debug output contains: LCP: timeout sending Config-Requests

Your chat script contains the following line to force the local machine to wait for the CONNECT message from the peer:


CONNECT "

Use the following line when you want the chat script to wait for CONNECT from the peer:


CONNECT \c

End the chat script with ~ \c .

pppd debug output contains: Serial link is not 8-bit clean

Your chat script contains the following line to force the local machine to wait for the CONNECT message from the peer:


CONNECT "

Use the following line when you want the chat script to wait for CONNECT from the peer:


CONNECT \c

End the chat script with ~ \c.

pppd debug output contains: Loopback detected

Your chat script contains the following line to force the local machine to wait for the CONNECT message from the peer:


CONNECT "

Use the following line when you want the chat script to wait for CONNECT from the peer:


CONNECT \c

End the chat script with ~ \c.

pppd debug output contains: SIGHUP

Your chat script contains the following line to force the local machine to wait for the CONNECT message from the peer:


CONNECT "

Use the following line when you want the chat script to wait for CONNECT from the peer:


CONNECT \c

End the chat script with ~ \c.