🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
9 messages
9 total messages Started by Eric Edwards Wed, 25 Sep 2002 22:27
How to tap into an NNTP session for debugging?
#60681
Author: Eric Edwards
Date: Wed, 25 Sep 2002 22:27
17 lines
1672 bytes
I'm trying to debug a Net::NNTP script that talks to INN on localhost.
Something strange is happening after submitting an article but I can't
figure out what.  

When talking to remote servers, I can use snoop (Solaris packet sniffer)
to watch the transaction.  I've squashed many a bug that way.  
Unfortunately, snoop doesn't seem to have any way of watching local
traffic.

Does anyone know how a tap might be implemented?  I've tried just
debugging Net::NNTP, but it is convoluted enough that I couldn't my tap
to work reliably and without screens full of scrolling errors.

-- 
Use the From: header.  Sending mail to ese002@news8.exile.org 
or ese002@news7.exile.org will only result in frustration.
Re: How to tap into an NNTP session for debugging?
#60680
Author: Klaas
Date: Wed, 25 Sep 2002 23:08
22 lines
2159 bytes
After careful consideration, Eric Edwards muttered:

> I'm trying to debug a Net::NNTP script that talks to INN on localhost.
> Something strange is happening after submitting an article but I can't
> figure out what.  
> 
> When talking to remote servers, I can use snoop (Solaris packet
> sniffer) to watch the transaction.  I've squashed many a bug that way.
>  Unfortunately, snoop doesn't seem to have any way of watching local
> traffic.
> 
> Does anyone know how a tap might be implemented?  I've tried just
> debugging Net::NNTP, but it is convoluted enough that I couldn't my
> tap to work reliably and without screens full of scrolling errors.

I don't know what the loopback interface is called in Solaris, but in
FreeBSD I can use 'tcpdump -i lo0' successfully.  tcpdump can be used to
view the contents of packets, if snoop doesn't support specification of
the loopback interface. 

-Mike
Re: How to tap into an NNTP session for debugging?
#60682
Author: Eric Edwards
Date: Wed, 25 Sep 2002 23:26
25 lines
2194 bytes
On 25 Sep 2002 23:08:22 GMT, Klaas <spamhole@klaas.ca> wrote:
>> When talking to remote servers, I can use snoop (Solaris packet
>> sniffer) to watch the transaction.  I've squashed many a bug that way.
>>  Unfortunately, snoop doesn't seem to have any way of watching local
>> traffic.
>
>I don't know what the loopback interface is called in Solaris, but in
>FreeBSD I can use 'tcpdump -i lo0' successfully.  tcpdump can be used to
>view the contents of packets, if snoop doesn't support specification of
>the loopback interface. 

I think loopback is implemented differently in Solaris.  Although 
netstat shows lo0 existing:

root@myhost~ snoop -d lo0
snoop: /dev/lo: No such file or directory

I've also tried snooping directing my script to talk to the network card
(le0).  It runs but but only external traffic is displayed.  There is
probably a bypass for local traffic.

-- 
Use the From: header.  Sending mail to ese002@news8.exile.org 
or ese002@news7.exile.org will only result in frustration.
Re: How to tap into an NNTP session for debugging?
#60683
Author: Eric Edwards
Date: Wed, 25 Sep 2002 23:30
27 lines
2383 bytes
On Wed, 25 Sep 2002 22:29:47 GMT, Cypherpunk@nyc.rr.com <Cypherpunk@nyc.rr.com> wrote:
>In comp.unix.solaris Eric Edwards <ese002@news9.exile.org> wrote:
>>   I'm trying to debug a Net::NNTP script that talks to INN on localhost.
>>   Something strange is happening after submitting an article but I can't
>>   figure out what.  
>>   
>>   When talking to remote servers, I can use snoop (Solaris packet sniffer)
>>   to watch the transaction.  I've squashed many a bug that way.  
>>   Unfortunately, snoop doesn't seem to have any way of watching local
>>   traffic.
>>   
>>   Does anyone know how a tap might be implemented?  I've tried just
>>   debugging Net::NNTP, but it is convoluted enough that I couldn't my tap
>>   to work reliably and without screens full of scrolling errors.
>
>Proxy it through another boxen back to local for debugging?

No other boxes available.

As far as I know, no NNTP proxies available anywhere.  In theory one
could be cobbled together with netcat, some bailing twine, and spit. 
But I'd never know where the bugs were.

-- 
Use the From: header.  Sending mail to ese002@news8.exile.org 
or ese002@news7.exile.org will only result in frustration.
Re: How to tap into an NNTP session for debugging?
#60685
Author: Andrew Gabriel
Date: Thu, 26 Sep 2002 00:38
23 lines
2080 bytes
In article <slrnap4hgd.lq1.ese002@spica.exile.org>,
	ese002@news9.exile.org (Eric Edwards) writes:
> I think loopback is implemented differently in Solaris.  Although 
> netstat shows lo0 existing:
> 
> root@myhost~ snoop -d lo0
> snoop: /dev/lo: No such file or directory

Yes - lo0 is an internal feature of IP - there is no real interface
or device you can snoop.

> I've also tried snooping directing my script to talk to the network card
> (le0).  It runs but but only external traffic is displayed.  There is
> probably a bypass for local traffic.

Traffic sent to interface addresses is looped through lo0.

Try using the -r and -w options on truss.

-- 
Andrew Gabriel
Consultant Software Engineer
Re: How to tap into an NNTP session for debugging?
#60687
Author: Curt Welch
Date: Thu, 26 Sep 2002 00:43
26 lines
2254 bytes
ese002@news9.exile.org (Eric Edwards) wrote:
> I'm trying to debug a Net::NNTP script that talks to INN on localhost.
> Something strange is happening after submitting an article but I can't
> figure out what.
>
> When talking to remote servers, I can use snoop (Solaris packet sniffer)
> to watch the transaction.  I've squashed many a bug that way.
> Unfortunately, snoop doesn't seem to have any way of watching local
> traffic.
>
> Does anyone know how a tap might be implemented?  I've tried just
> debugging Net::NNTP, but it is convoluted enough that I couldn't my tap
> to work reliably and without screens full of scrolling errors.

Add printfs?

Write your own proxy and run it though that on the same box and add printfs
to your own proxy?

Stop using your own server and use one on the net and try to reproduce the
problem and then use snoop to look at the trafic?

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: How to tap into an NNTP session for debugging?
#60688
Author: Klaas
Date: Thu, 26 Sep 2002 00:51
32 lines
2434 bytes
After careful consideration, Eric Edwards muttered:

> On 25 Sep 2002 23:08:22 GMT, Klaas <spamhole@klaas.ca> wrote:
>>> When talking to remote servers, I can use snoop (Solaris packet
>>> sniffer) to watch the transaction.  I've squashed many a bug that 
way.
>>>  Unfortunately, snoop doesn't seem to have any way of watching local
>>> traffic.
>>
>>I don't know what the loopback interface is called in Solaris, but in
>>FreeBSD I can use 'tcpdump -i lo0' successfully.  tcpdump can be used 
to
>>view the contents of packets, if snoop doesn't support specification of
>>the loopback interface. 
> 
> I think loopback is implemented differently in Solaris.  Although 
> netstat shows lo0 existing:
> 
> root@myhost~ snoop -d lo0
> snoop: /dev/lo: No such file or directory
> 
> I've also tried snooping directing my script to talk to the network 
card
> (le0).  It runs but but only external traffic is displayed.  There is
> probably a bypass for local traffic.
> 

If you're willing to allow external connections, I could set up a 
redirect on my system.  Email is klaas at cs dot dal dot ca

-Mike
Re: How to tap into an NNTP session for debugging?
#60690
Author: Jeffrey M. Vinocur
Date: Thu, 26 Sep 2002 01:10
17 lines
1888 bytes
In article <slrnap4ho8.lq1.ese002@spica.exile.org>,
Eric Edwards <ese002@news9.exile.org> wrote:
>
>As far as I know, no NNTP proxies available anywhere.  In theory one
>could be cobbled together with netcat, some bailing twine, and spit. 
>But I'd never know where the bugs were.

A completely transparent TCP proxy will do.  For example, you can
run `ssh -R 9999:this:119 that` where "this" is the current
machine (which you run the news server on) and "that" is any
other random machine you have access to, and then point your
client at port 9999 on "that" and sniff the traffic.  (Between
"that" and the server it will be encrypted by ssh, but between
the client and "that" you can sniff it just fine.)


Re: How to tap into an NNTP session for debugging?
#60703
Author: AlfredReibenschuh
Date: Thu, 26 Sep 2002 06:34
30 lines
2283 bytes
On Wed, 25 Sep 2002 22:27:35 +0000 (UTC), ese002@news9.exile.org (Eric Edwards)
wrote:

>I'm trying to debug a Net::NNTP script that talks to INN on localhost.
>Something strange is happening after submitting an article but I can't
>figure out what.  
>
>When talking to remote servers, I can use snoop (Solaris packet sniffer)
>to watch the transaction.  I've squashed many a bug that way.  
>Unfortunately, snoop doesn't seem to have any way of watching local
>traffic.
>
>Does anyone know how a tap might be implemented?  I've tried just
>debugging Net::NNTP, but it is convoluted enough that I couldn't my tap
>to work reliably and without screens full of scrolling errors.

$nntp = Net::NNTP->new("my-news.server.com", Debug=>2);

this will print the session to stderr.


regards,
  __              _       
 / _|_ __ ___  __| | ___    geek
| |_| '__/ _ \/ _` |/ _ \ 
|  _| | |  __/ (_| | (_) |  linux, aix, solaris, *bsd
|_| |_|  \___|\__,_|\___/   apache, mysql, perl, php

        http://www.penguin.at0.net/~fredo/
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads