LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to strace? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-strace-4175444378/)

qwertyjjj 01-06-2013 11:46 AM

how to strace?
 
I have a problem setting up pptpd. I get an input / output errorin the logs.
A torubleshooter suggestes this:
Quote:

Symptom: on a PPTP server running pptpd, the following message may appear when all incoming tunnel requests fail:

pptpd[5740]: GRE: read(fd=5,buffer=804dc00,len=8196) from PTY failed: status = -1 error = Input/output error

Diagnosis: pppd was started by pptpd but was unable to operate, and so terminated quickly. pptpd tried to read data from pppd but found none. There are many reasons why pppd could have failed, but the most likely are configuration file errors.

pptpd incorrectly hides all pppd error output. This is a defect and should be fixed. It apparently doesn't even wait for and report the pppd exit status.

Solution: check the configuration files. A simple typo will cause this error. It is easy to have pppd tell you where the typo is. Here is how:

Try running pppd against the configuration files in the same way that pptpd would run it. If you strace the pptpd, you can detect the command line given to pppd (just after it says "launching pppd"), and then you can run that command manually in a shell to see what objections pppd has to the options.

When we did an strace just now, we got this line that was valuable;

12704 execve("/usr/sbin/pppd", ["/usr/sbin/pppd", "local", "file", "/etc/ppp/pptpd-options", "50", "10.0.1.1:10.0.1.3"], [/* 18 vars */]) = 0

1/ How do I run ppd against a config file &
2/ How do I do a strace?

unSpawn 01-06-2013 01:54 PM

Quote:

Originally Posted by qwertyjjj (Post 4864034)
How do I run ppd against a config file

You don't. Try http://pptpclient.sourceforge.net/ho...is.phtml#debug instead and next time please mark text you didn't write yourself (basically ninety nine per cent of your post).

qwertyjjj 01-06-2013 02:39 PM

Quote:

Originally Posted by unSpawn (Post 4864087)
You don't. Try http://pptpclient.sourceforge.net/ho...is.phtml#debug instead and next time please mark text you didn't write yourself (basically ninety nine per cent of your post).

but do i enable pppd debug or pptpd?
it is pptpd trying to start the pppd so i am not sure how it is calling it

unSpawn 01-06-2013 03:40 PM

Quote:

Originally Posted by qwertyjjj (Post 4864105)
but do i enable pppd debug or pptpd?

For Pptpd see 'man pptpd' (see "--debug") and for pppd see 'man pppd' ("debug dump"). Just like the first sentence below the "How to enable debug logging?" says.


All times are GMT -5. The time now is 11:57 AM.