Gnus development mailing list
 help / color / mirror / Atom feed
* Problems using nntp-open-via-rlogin-and-telnet
@ 2004-03-23  9:10 Steinar Bang
  2004-03-23 11:19 ` Katsumi Yamaoka
  0 siblings, 1 reply; 17+ messages in thread
From: Steinar Bang @ 2004-03-23  9:10 UTC (permalink / raw)


Platform: Intel Pentium M, debian sarge (testing/unstable),
	  GNU Emacs 21.3.1 (i386-pc-linux-gnu, X toolkit) of 2003-10-31 on raven, modified by Debian
	  No Gnus v0.2 (CVS gnus updated on March 19)

I have the following entry in my ~/.gnus.el:

(setq gnus-select-method
    '(nntp "news.chello.no"
           (nntp-address "news.chello.no")
           (nntp-via-address "somemachine.dyndns.org")
           (nntp-via-user-name "someuser")
           (nntp-via-rlogin-command "ssh")
           (nntp-via-rlogin-command-switches ("-x" "-t"))
	   (nntp-end-of-line "\n")
	   (nntp-telnet-command "nc")
           (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)))

But this setting doesn't work.  Trying to use "nc", it immediately
fails.  Trying to use "telnet", it hangs until I press `C-g', and then
it fails in pretty much the same way as with "nc".

More details:

With the nntp-telnet-command setting above, ie. using "nc", the
following text is written to the minibuffer:
  Unable to open nntp:news.chello.no, go offline? (y or n)
when I press `y', I get the message
  nntp (news.chello.no) open error: ''.  Continue? (y or n)
when I press `y' on that, Gnus proceeds with gmane and an nnimap
server. 

If I do a "ps axu | grep nc" on the via machine after this, I see no
process running.

Without the nntp-telnet-command setting, ie. using "telnet", Gnus just
hangs until I press `C-g'.

If I do a "ps axu | grep telnet" on the via machine, I see a line like
this: 
  someuser        8504  0.1  0.9  2852 1240 pts/5    S    09:56   0:00 telnet -8

When I press `C-g', I get the following message in the minibuffer:
 Please answer y or n. Unable to open nntp:news.chello.no, go offline? (y or n)
when I press `y', I get the message
  nntp (news.chello.no) open error: ''.  Continue? (y or n)
when I press `y' on that, Gnus proceeds with gmane and an nnimap
server.

The "telnet -8" process is still running on the via machine after this.

The text written to *Messages* is the same for both "nc" and "telnet":
 Reading /home/someuser/.newsrc.eld...
 Opening nntp server on news.chello.no...
 Denied server
 Opening nntp server on news.chello.no...failed

The " *nntpd*" buffer contains the following text:
211 6 1 6 mail.misc

(I have an nnml group called mail.misc to handle mail sent locally on
this machine, but I have no idea of why this ends up in the *nntpd*
buffer) 

I have set public keys for the user in the authorized_keys file on the
via machine, so that I can run commands without any login prompt.

Trying telnet manually:
 $ ssh -x -t somemachine.dyndns.org telnet -8 news.chello.no nntp
 Trying 212.83.64.229...
 Connected to amstwist00.chello.com.
 Escape character is '^]'.
 200 Welcome to the Chello Norway News Service (Twister v1.2.0)
I type `quit', and get
 205 GoodBye
 Connection closed by foreign host.
 Connection to somemachine.dyndns.org closed.

Trying nc manually:
 $ ssh -x -t somemachine.dyndns.org nc news.chello.no nntp
 200 Welcome to the Chello Norway News Service (Twister v1.2.0)
but here nothing I type seems to get to the NNTP server, so I can't do
type `quit' to end the session.

All help appreciated!

Thanx!


- Steinar




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problems using nntp-open-via-rlogin-and-telnet
  2004-03-23  9:10 Problems using nntp-open-via-rlogin-and-telnet Steinar Bang
@ 2004-03-23 11:19 ` Katsumi Yamaoka
  2004-03-23 12:28   ` Steinar Bang
  2004-04-10 20:32   ` netcat supported in nntp-open-via-rlogin-and-telnet? (Was: Problems using nntp-open-via-rlogin-and-telnet) Steinar Bang
  0 siblings, 2 replies; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-03-23 11:19 UTC (permalink / raw)


Hi,

>>>>> In <873c80yllq.fsf@dod.no>
>>>>>	Steinar Bang <sb@dod.no> wrote:

> I have the following entry in my ~/.gnus.el:

> (setq gnus-select-method
>     '(nntp "news.chello.no"
>            (nntp-address "news.chello.no")
>            (nntp-via-address "somemachine.dyndns.org")
>            (nntp-via-user-name "someuser")
>            (nntp-via-rlogin-command "ssh")
>            (nntp-via-rlogin-command-switches ("-x" "-t"))
> 	   (nntp-end-of-line "\n")
> 	   (nntp-telnet-command "nc")
>            (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)))

> But this setting doesn't work.  Trying to use "nc", it immediately
> fails.  Trying to use "telnet", it hangs until I press `C-g', and then
> it fails in pretty much the same way as with "nc".

> More details:

[...]

I'm just using nntp-open-via-rlogin-and-telnet to connect to
some foreign news servers.  Here is my setting for Gmane:

(nntp "gmane"
      (nntp-address "news.gmane.org")
      (nntp-end-of-line "\n")
      (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
      (nntp-via-address "intermediate.host")
      (nntp-via-rlogin-command "ssh")
      (nntp-via-rlogin-command-switches ("-C" "-t" "-e" "none")))

It is not for gnus-select-method but for one of servers.  I can
connect to all servers using the same setting except for the
"name" and nntp-address.  Furthermore, I tried several
intermediate hosts and confirmed all they could be used.  It is
not helpful to you, though.

I don't use nc, but nntp-end-of-line seems to need to be set as
"\r\n" for nc.  The ("-e" "none") switch disables any escape
characters to ssh.  And, er, the "-t" switch may possibly be
harmful in some environments, although you wrote that's ok when
testing it manually...
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Problems using nntp-open-via-rlogin-and-telnet
  2004-03-23 11:19 ` Katsumi Yamaoka
@ 2004-03-23 12:28   ` Steinar Bang
  2004-04-10 20:24     ` How to debug nntp-open-via-rlogin-and-telnet? Steinar Bang
  2004-04-10 20:32   ` netcat supported in nntp-open-via-rlogin-and-telnet? (Was: Problems using nntp-open-via-rlogin-and-telnet) Steinar Bang
  1 sibling, 1 reply; 17+ messages in thread
From: Steinar Bang @ 2004-03-23 12:28 UTC (permalink / raw)


>>>>> Katsumi Yamaoka <yamaoka@jpl.org>:

> I'm just using nntp-open-via-rlogin-and-telnet to connect to
> some foreign news servers.  Here is my setting for Gmane:

I'll do a line by line comparison with my entry for news.chello.no,
and do some thinking aloud while doing it.  (the questions are mostly
to myself, but anyone that knows the answers to any of them, please
feel free to respond...! :-) )

> (nntp "gmane"
>       (nntp-address "news.gmane.org")

I've got the equivalent of these two lines.  I'm using the same string
both places.  Could this be a potential problem?

>       (nntp-end-of-line "\n")

I've got this one.

>       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)

I've got this one.

>       (nntp-via-address "intermediate.host")

And this

>       (nntp-via-rlogin-command "ssh")

And this.

>       (nntp-via-rlogin-command-switches ("-C" "-t" "-e" "none")))

And this one's different.  The "-x" in my list, is to suppress some
warnings from the X forwarding, which I've got turned on by default.

The "-t" is default, and means "Force pseudo-tty allocation".  I've no
idea why this is important and correct, but appearently it is.

The "-C" means compress all traffic over SSH using the gzip
algorithm. 

The "-e" "none" means:
> [snip!]  The ("-e" "none") switch disables any escape
> characters to ssh. [snip!]

Hm... that's a difference to my setup.  I think I'll try changing that
first.  Also, switch off the use of "nc", because you say:

> [snip!] I don't use nc, but nntp-end-of-line seems to need to be set
> as "\r\n" for nc.

OK... I've changed the setting to look like this:
(setq gnus-select-method
    '(nntp "news.chello.no"
           (nntp-address "news.chello.no")
           (nntp-via-address "somemachine.dyndns.org")
           (nntp-via-user-name "someuser")
           (nntp-via-rlogin-command "ssh")
           (nntp-via-rlogin-command-switches ("-x" "-t" "-e" "none"))
	   (nntp-end-of-line "\n")
           (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)))

But the behaviour is still the same (ie. hang until `C-h').

Next step is to lose the nntp-via-user-name setting:
(setq gnus-select-method
    '(nntp "news.chello.no"
           (nntp-address "news.chello.no")
           (nntp-via-address "somemachine.dyndns.org")
           (nntp-via-rlogin-command "ssh")
           (nntp-via-rlogin-command-switches ("-x" "-t" "-e" "none"))
	   (nntp-end-of-line "\n")
           (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)))

But the behaviour is still the same (ie. hang until `C-h').

The next thing is to make the order the same as yours:

(setq gnus-select-method
    '(nntp "news.chello.no"
           (nntp-address "news.chello.no")
	   (nntp-end-of-line "\n")
           (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
           (nntp-via-address "somehost.dyndns.org")
           (nntp-via-rlogin-command "ssh")
           (nntp-via-rlogin-command-switches ("-x" "-t" "-e" "none"))))

This didn't change things either.  I didn't really expect it to.

Next is to try removing the -t flag to ssh, ie.
(setq gnus-select-method
    '(nntp "news.chello.no"
           (nntp-address "news.chello.no")
	   (nntp-end-of-line "\n")
           (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
           (nntp-via-address "somemachine.dyndns.org")
           (nntp-via-rlogin-command "ssh")
           (nntp-via-rlogin-command-switches ("-x" "-e" "none"))))

This made it terminate by itself, after a while instead of hang, and
wait until a `C-g'.

Next is to try "nc" and remove the end of line of "\n":

(setq gnus-select-method
    '(nntp "news.chello.no"
           (nntp-address "news.chello.no")
	   (nntp-telnet-command "nc")
           (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
           (nntp-via-address "somemachine.dyndns.org")
           (nntp-via-rlogin-command "ssh")
           (nntp-via-rlogin-command-switches ("-x" "-e" "none"))))

Immediately prints unable to open message in the minibuffer.

Next is to try "nc" with the "-t" flag back in the rlogin switches:
(setq gnus-select-method
    '(nntp "news.chello.no"
           (nntp-address "news.chello.no")
	   (nntp-telnet-command "nc")
           (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
           (nntp-via-address "somemachine.dyndns.org")
           (nntp-via-rlogin-command "ssh")
           (nntp-via-rlogin-command-switches ("-x" "-t" "-e" "none"))))

Immediately prints unable to open message in the minibuffer.

The last thing to try is to make sure that there isn't the same string
used two places:

(setq gnus-select-method
    '(nntp "news"
           (nntp-address "news.chello.no")
	   (nntp-telnet-command "nc")
           (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
           (nntp-via-address "somemachine.dyndns.org")
           (nntp-via-rlogin-command "ssh")
           (nntp-via-rlogin-command-switches ("-x" "-t" "-e" "none"))))

But this one also immediately returns with the unable to open message
in the minibuffer.

Then I don't know what more to try...

Thanx!

- Steinar




^ permalink raw reply	[flat|nested] 17+ messages in thread

* How to debug nntp-open-via-rlogin-and-telnet?
  2004-03-23 12:28   ` Steinar Bang
@ 2004-04-10 20:24     ` Steinar Bang
  0 siblings, 0 replies; 17+ messages in thread
From: Steinar Bang @ 2004-04-10 20:24 UTC (permalink / raw)


[Both the current host, and the via host, are intel architecture
 machines, running debian sarge testing/unstable]

I'm trying to make nntp-open-via-rlogin-and-telnet work.  Doing the
commands manually from a shell works.  Gnus is stuck in startup, until
I press `C-g'.

Is there a a good way to debug this?

My default select method looks like this:

(setq gnus-select-method
      '(nntp "news"
	     (nntp-address "news.chello.no")
	     (nntp-end-of-line "\n")
	     (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
	     (nntp-via-address "somehost.dyndns.org")
	     (nntp-via-rlogin-command "ssh")
	     (nntp-via-rlogin-command-switches ("-x" "-C" "-t" "-e" "none"))))

When I start up Gnus (CVS with update done today), on GNU Emacs
21.3.1, Gnus is stuck until I press `C-g'.  

I see a process like this on the local machine:
   sb       20474  0.0  0.1  3644 1896 pts/6    S    21:47   0:00 /usr/bin/ssh -x -C -t -e none somehost.dyndns.org telnet -8

On the remote machine (ie. somehost.dyndns.org), I see a process like
this: 
   sb       28764  0.2  0.9  2852 1240 pts/5    S    22:16   0:00 telnet -8

The " *nntpd*" buffer contains the text:
211 5904 504 9292 gmane.text.docbook.apps

There's also an " *server news.chello.no nntp  *nntpd**" buffer, which
is empty.

Why are there two buffers?  Should they be empty?  The " *server..."
buffers for the other two nntp servers in my Gnus are also empty.

Thanx!


- Steinar




^ permalink raw reply	[flat|nested] 17+ messages in thread

* netcat supported in nntp-open-via-rlogin-and-telnet? (Was: Problems using nntp-open-via-rlogin-and-telnet)
  2004-03-23 11:19 ` Katsumi Yamaoka
  2004-03-23 12:28   ` Steinar Bang
@ 2004-04-10 20:32   ` Steinar Bang
  2004-04-11  1:03     ` netcat supported in nntp-open-via-rlogin-and-telnet? Katsumi Yamaoka
  1 sibling, 1 reply; 17+ messages in thread
From: Steinar Bang @ 2004-04-10 20:32 UTC (permalink / raw)


>>>>> Katsumi Yamaoka <yamaoka@jpl.org>:

> I don't use nc, but nntp-end-of-line seems to need to be set as
> "\r\n" for nc.  The ("-e" "none") switch disables any escape
> characters to ssh.  And, er, the "-t" switch may possibly be
> harmful in some environments, although you wrote that's ok when
> testing it manually...

Is netcat supported in the current nntp.el?  The code of the
nntp-open-via-rlogin-and-telnet function (see below), looks telnet
specific to me.  Ie. the wait for the telnet> prompt doesn't fit what
happens when using the nc (netcat) command.  Also netcat doesn't seem
to accept an
	open news.chello.no 119
command which is what the process-send-string call seems to be
sending. 

(defun nntp-open-via-rlogin-and-telnet (buffer)
  "Open a connection to an nntp server through an intermediate host.
First rlogin to the remote host, and then telnet the real news server
from there.

Please refer to the following variables to customize the connection:
- `nntp-pre-command',
- `nntp-via-rlogin-command',
- `nntp-via-rlogin-command-switches',
- `nntp-via-user-name',
- `nntp-via-address',
- `nntp-telnet-command',
- `nntp-telnet-switches',
- `nntp-address',
- `nntp-port-number',
- `nntp-end-of-line'."
  (let ((command `(,nntp-via-address
		   ,nntp-telnet-command
		   ,@nntp-telnet-switches))
	proc)
    (when nntp-via-user-name
      (setq command `("-l" ,nntp-via-user-name ,@command)))
    (when nntp-via-rlogin-command-switches
      (setq command (append nntp-via-rlogin-command-switches command)))
    (push nntp-via-rlogin-command command)
    (and nntp-pre-command
	 (push nntp-pre-command command))
    (setq proc (apply 'start-process "nntpd" buffer command))
    (save-excursion
      (set-buffer buffer)
      (nntp-wait-for-string "^r?telnet")
      (process-send-string proc (concat "open " nntp-address
					" " nntp-port-number "\n"))
      (nntp-wait-for-string "^\r*20[01]")
      (beginning-of-line)
      (delete-region (point-min) (point))
      (process-send-string proc "\^]")
      (nntp-wait-for-string "^r?telnet")
      (process-send-string proc "mode character\n")
      (accept-process-output proc 1)
      (sit-for 1)
      (goto-char (point-min))
      (forward-line 1)
      (delete-region (point) (point-max)))
    proc))


Thanx!


- Steinar




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: netcat supported in nntp-open-via-rlogin-and-telnet?
  2004-04-10 20:32   ` netcat supported in nntp-open-via-rlogin-and-telnet? (Was: Problems using nntp-open-via-rlogin-and-telnet) Steinar Bang
@ 2004-04-11  1:03     ` Katsumi Yamaoka
  2004-04-11 22:31       ` Steinar Bang
  0 siblings, 1 reply; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-04-11  1:03 UTC (permalink / raw)


>>>>> In <87ekqvy3oy.fsf_-_@dod.no> 
>>>>>	Steinar Bang <sb@dod.no> wrote:

> Is netcat supported in the current nntp.el?  The code of the
> nntp-open-via-rlogin-and-telnet function (see below), looks telnet
> specific to me.  Ie. the wait for the telnet> prompt doesn't fit what
> happens when using the nc (netcat) command.  Also netcat doesn't seem
> to accept an
> 	open news.chello.no 119
> command which is what the process-send-string call seems to be
> sending.

Oops, it doesn't seem to work with nc also to me.  Isn't it
possible to make it only for telnet?  Or we may have to provide
nntp-open-via-rlogin-and-nc.  I'll examine what we should do for
that, after tomorrow (I have no time today, sorry).  Of course
that anyone fixes it is welcomed.
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: netcat supported in nntp-open-via-rlogin-and-telnet?
  2004-04-11  1:03     ` netcat supported in nntp-open-via-rlogin-and-telnet? Katsumi Yamaoka
@ 2004-04-11 22:31       ` Steinar Bang
  2004-04-12  7:29         ` Katsumi Yamaoka
  0 siblings, 1 reply; 17+ messages in thread
From: Steinar Bang @ 2004-04-11 22:31 UTC (permalink / raw)


>>>>> Katsumi Yamaoka <yamaoka@jpl.org>:

> Oops, it doesn't seem to work with nc also to me.  Isn't it possible
> to make it only for telnet?  Or we may have to provide
> nntp-open-via-rlogin-and-nc. 

I guess splitting the function will make the simplest code, since the
behaviour of netcat and telnet are so dissimilar.

> I'll examine what we should do for that, after tomorrow (I have no
> time today, sorry).

Thanx!




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: netcat supported in nntp-open-via-rlogin-and-telnet?
  2004-04-11 22:31       ` Steinar Bang
@ 2004-04-12  7:29         ` Katsumi Yamaoka
  2004-04-12  9:04           ` Katsumi Yamaoka
                             ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-04-12  7:29 UTC (permalink / raw)


>>>>> In <87k70m5epf.fsf@dod.no>
>>>>>	Steinar Bang <sb@dod.no> wrote:

> I guess splitting the function will make the simplest code, since the
> behaviour of netcat and telnet are so dissimilar.

I've installed the nntp-open-via-rlogin-and-netcat function and
new server variables nntp-netcat-command and nntp-netcat-switches.
Those variables default to "nc" and nil respectively.

This article is posted to the gnus.ding newsgroup by the
following method:

(nntp "quimby2"
      (nntp-address "news.gnus.org")
      (nntp-end-of-line "\r\n")
      (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
      (nntp-via-address "intermediate host")
      (nntp-netcat-command "/home/yamaoka/bin/nc")
      (nntp-via-rlogin-command "ssh")
      (nntp-via-rlogin-command-switches ("-C" "-e" "none")))

Specifying nntp-end-of-line and nntp-netcat-command may be
needless because of the default values.  Also
nntp-via-rlogin-command-switches may not need to be specified
since the "-t" option is not required.

I will maintain the info document later.
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: netcat supported in nntp-open-via-rlogin-and-telnet?
  2004-04-12  7:29         ` Katsumi Yamaoka
@ 2004-04-12  9:04           ` Katsumi Yamaoka
  2004-04-13 10:28           ` Steinar Bang
  2004-05-14 19:55           ` Steinar Bang
  2 siblings, 0 replies; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-04-12  9:04 UTC (permalink / raw)


>>>>> In <b9yisg5irht.fsf@jpl.org> Katsumi Yamaoka wrote:

> I've installed the nntp-open-via-rlogin-and-netcat function and
> new server variables nntp-netcat-command and nntp-netcat-switches.
> Those variables default to "nc" and nil respectively.

I've changed those variable names to nntp-via-netcat-command
and nntp-via-netcat-switches.  Sorry.
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: netcat supported in nntp-open-via-rlogin-and-telnet?
  2004-04-12  7:29         ` Katsumi Yamaoka
  2004-04-12  9:04           ` Katsumi Yamaoka
@ 2004-04-13 10:28           ` Steinar Bang
  2004-04-13 10:47             ` Katsumi Yamaoka
  2004-05-14 19:55           ` Steinar Bang
  2 siblings, 1 reply; 17+ messages in thread
From: Steinar Bang @ 2004-04-13 10:28 UTC (permalink / raw)


>>>>> Katsumi Yamaoka <yamaoka@jpl.org>:

>>>>> In <87k70m5epf.fsf@dod.no>
>>>>>> Steinar Bang <sb@dod.no> wrote:

> I've installed the nntp-open-via-rlogin-and-netcat function and
> new server variables nntp-netcat-command and nntp-netcat-switches.
> Those variables default to "nc" and nil respectively.

Thanx!  I tried this, yesterday, with the following setting:

(setq gnus-select-method
      '(nntp "news"
	     (nntp-address "news.chello.no")
	     (nntp-end-of-line "\r\n")
	     (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
	     (nntp-via-address "somehost.dyndns.org")
	     (nntp-via-rlogin-command "ssh")
	     (nntp-via-rlogin-command-switches ("-x" "-C" "-e" "none"))))

I tried it with different values for the nntp-via-rlogin-command-switches.

It doesn't work in that I can open the server in the server buffer,
and browse the available groups.

But if I wait it out, it doesn't report a failure when opening the
server, and it is listed as "open" in the server buffer.  I also
immediately get error messages like "503 Service unavaiable" (because
I had more than five separate connections from the same IP address).

So I guess it sort of works, but is slo-o-o-ow.

I wonder why?

When I do an ssh to the somehost.dyndns.org doing 
	nc news.chello.no nntp
I immediately get back a response from the NNTP server.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: netcat supported in nntp-open-via-rlogin-and-telnet?
  2004-04-13 10:28           ` Steinar Bang
@ 2004-04-13 10:47             ` Katsumi Yamaoka
  2004-04-13 20:34               ` Steinar Bang
  0 siblings, 1 reply; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-04-13 10:47 UTC (permalink / raw)


>>>>> In <87fzb82muz.fsf@dod.no>
>>>>>	Steinar Bang <sb@dod.no> wrote:

> (setq gnus-select-method
>       '(nntp "news"
> 	     (nntp-address "news.chello.no")
> 	     (nntp-end-of-line "\r\n")
> 	     (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
> 	     (nntp-via-address "somehost.dyndns.org")
> 	     (nntp-via-rlogin-command "ssh")
> 	     (nntp-via-rlogin-command-switches ("-x" "-C" "-e" "none"))))

> I tried it with different values for the nntp-via-rlogin-command-switches.

> It doesn't work in that I can open the server in the server buffer,
> and browse the available groups.

> But if I wait it out, it doesn't report a failure when opening the
> server, and it is listed as "open" in the server buffer.  I also
> immediately get error messages like "503 Service unavaiable" (because
> I had more than five separate connections from the same IP address).

> So I guess it sort of works, but is slo-o-o-ow.

> I wonder why?

First I suspected XEmacs.  However, it actually works comfortably
in this way.

> When I do an ssh to the somehost.dyndns.org doing
> 	nc news.chello.no nntp
> I immediately get back a response from the NNTP server.

Hmm, I don't know what is a difference between them.  Could anyone
please double-check it?
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: netcat supported in nntp-open-via-rlogin-and-telnet?
  2004-04-13 10:47             ` Katsumi Yamaoka
@ 2004-04-13 20:34               ` Steinar Bang
  2004-04-13 22:48                 ` Katsumi Yamaoka
  0 siblings, 1 reply; 17+ messages in thread
From: Steinar Bang @ 2004-04-13 20:34 UTC (permalink / raw)


>>>>> Katsumi Yamaoka <yamaoka@jpl.org>:

>> So I guess it sort of works, but is slo-o-o-ow.

>> I wonder why?

> First I suspected XEmacs.  However, it actually works comfortably in
> this way.

I see the same problem in GNU Emacs 21.3.  Could it be something in my
setup?  Is there a good way to debug what's going on?

Why is my " *server news.chello.no nntp *nntpd**" buffer empty?  Is
that an indication of something?  The " *server news.gmane.org nntp  *nntpd**"
is also empty.

On a Gnus on a different machine, updated from CVS on March 11, both
buffers contains what looks like NNTP traffic.  The news.chello.no
setup on this other machine is different, bug the news.gmane.org setup
is identical.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: netcat supported in nntp-open-via-rlogin-and-telnet?
  2004-04-13 20:34               ` Steinar Bang
@ 2004-04-13 22:48                 ` Katsumi Yamaoka
  2004-04-13 23:10                   ` Katsumi Yamaoka
  2004-04-17 20:14                   ` Steinar Bang
  0 siblings, 2 replies; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-04-13 22:48 UTC (permalink / raw)


>>>>> In <87vfk3fwgv.fsf@dod.no>
>>>>>	Steinar Bang <sb@dod.no> wrote:

>>>>>> Katsumi Yamaoka <yamaoka@jpl.org>:

>>> So I guess it sort of works, but is slo-o-o-ow.

>>> I wonder why?

>> First I suspected XEmacs.  However, it actually works comfortably in
>> this way.

> I see the same problem in GNU Emacs 21.3.  Could it be something in my
> setup?  Is there a good way to debug what's going on?

Second, I suspect your ssh configuration.  There is the ssh.el
module in the os-utils XEmacs package.  It can be used in Emacs
as well.  Can you make a ssh connection to the intermediate host
using it?

M-x ssh RET hostname RET

then I get a shell window.  I am behind the socks5 firewall in
the office and my ssh configuration is slightly special.  Here
is the entry in my ~/.ssh/config file:

Host jpl.org
	CheckHostIP no
	Protocol 2
	ProxyCommand /usr/local/bin/connect -n %h %p

Where the connect program is used to pass ssh stream through the
firewall.  It is available at:

http://www.imasy.or.jp/~gotoh/ssh/connect.html

(It can also be used as a replacement of netcat.)

> Why is my " *server news.chello.no nntp *nntpd**" buffer empty?  Is
> that an indication of something?  The " *server news.gmane.org nntp  *nntpd**"
> is also empty.

> On a Gnus on a different machine, updated from CVS on March 11, both
> buffers contains what looks like NNTP traffic.  The news.chello.no
> setup on this other machine is different, bug the news.gmane.org setup
> is identical.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: netcat supported in nntp-open-via-rlogin-and-telnet?
  2004-04-13 22:48                 ` Katsumi Yamaoka
@ 2004-04-13 23:10                   ` Katsumi Yamaoka
  2004-04-17 20:14                   ` Steinar Bang
  1 sibling, 0 replies; 17+ messages in thread
From: Katsumi Yamaoka @ 2004-04-13 23:10 UTC (permalink / raw)


>>>>> In <b9ywu4jwl3f.fsf@jpl.org> Katsumi Yamaoka wrote:

> I am behind the socks5 firewall in the office and my ssh
> configuration is slightly special.

I've also tested the nntp-open-via-rlogin-and-netcat method
locally.  There is no firewalls, the ssh configuration is:

Host HostA
	ForwardX11 no
	Protocol 2

and the server setting is:

(nntp "LocalNewsServer"
      (nntp-address "LocalNewsServer")
      (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
      (nntp-via-address "HostA")
      (nntp-via-netcat-command "/some/where/bin/nc")
      (nntp-via-rlogin-command "ssh")
      (nntp-via-rlogin-command-switches ("-C" "-e" "none")))

There's no problem, sigh.
-- 
Katsumi Yamaoka <yamaoka@jpl.org>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: netcat supported in nntp-open-via-rlogin-and-telnet?
  2004-04-13 22:48                 ` Katsumi Yamaoka
  2004-04-13 23:10                   ` Katsumi Yamaoka
@ 2004-04-17 20:14                   ` Steinar Bang
  2004-04-22 20:08                     ` Steinar Bang
  1 sibling, 1 reply; 17+ messages in thread
From: Steinar Bang @ 2004-04-17 20:14 UTC (permalink / raw)


>>>>> Katsumi Yamaoka <yamaoka@jpl.org>:

> Second, I suspect your ssh configuration.  There is the ssh.el
> module in the os-utils XEmacs package.  It can be used in Emacs as
> well.  Can you make a ssh connection to the intermediate host using
> it?

> M-x ssh RET hostname RET

Yes.  Looks pretty much like a normal login.  The response time on my
typing is quick.

> then I get a shell window.  I am behind the socks5 firewall in
> the office and my ssh configuration is slightly special.  Here
> is the entry in my ~/.ssh/config file:
[snip!]

I've got nothing like that.  I have free passage on port 22.

> (It can also be used as a replacement of netcat.)

Ok.  Perhaps I'll look at it later.  But I'm starting to think my
problem is something other than netcat or telnet.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: netcat supported in nntp-open-via-rlogin-and-telnet?
  2004-04-17 20:14                   ` Steinar Bang
@ 2004-04-22 20:08                     ` Steinar Bang
  0 siblings, 0 replies; 17+ messages in thread
From: Steinar Bang @ 2004-04-22 20:08 UTC (permalink / raw)


>>>>> Steinar Bang <sb@dod.no>:

>>>>> Katsumi Yamaoka <yamaoka@jpl.org>:
>> Second, I suspect your ssh configuration.  There is the ssh.el
>> module in the os-utils XEmacs package.  It can be used in Emacs as
>> well.  Can you make a ssh connection to the intermediate host using
>> it?

>> M-x ssh RET hostname RET

> Yes.  Looks pretty much like a normal login.  The response time on my
> typing is quick.
[snip!]

Some more debugging.  I've run ethereal on the "via" machine.

 1. When the laptop in question is talking directly to the NNTP server,
    through NATing in the via machine
 2. Using nntp-open-via-login-and-netcat and nntp-end-of-line "\r\n"
 3. Using nntp-open-via-login-and-netcat and nntp-end-of-line "\n"


Case 1, talking directly to the NNTP server:
   Response: 200 Welcome to the Chello Norway News Service (Twister v1.2.0)
   Request: MODE READER
   Response: 200 Welcome to the Chello Norway News Service (Twister v1.2.0)


Case 2, talking over an SSH connection, and with "\r\n" as line sep:

   Response: 200 Welcome to the Chello Norway News Service (Twister v1.2.0)
   Request: MODE READER
   Request: 
   (the last request contains only a "0a", not "0d0a".  The "MODE
   READER" is also followed by just a "0a")

Case 3, talking over an SSH connection, and with "\n" as line sep:

   Response: 200 Welcome to the Chello Norway News Service (Twister v1.2.0)
   Request: MODE READER

I didn't expect case 3 to work.  I just tried it to see what
happened. 

I'm not sure what to conclude from case 2?  Where did the CR go?  Why
do I get an extra NNTP Request from the client, containing only a
single LF?  Is the CR somehow transformed into an extra LF?  If so,
who is the culprit?  Gnus?  SSH?  nc?

Thanx!


- Steinar





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: netcat supported in nntp-open-via-rlogin-and-telnet?
  2004-04-12  7:29         ` Katsumi Yamaoka
  2004-04-12  9:04           ` Katsumi Yamaoka
  2004-04-13 10:28           ` Steinar Bang
@ 2004-05-14 19:55           ` Steinar Bang
  2 siblings, 0 replies; 17+ messages in thread
From: Steinar Bang @ 2004-05-14 19:55 UTC (permalink / raw)


>>>>> Katsumi Yamaoka <yamaoka@jpl.org>:

> This article is posted to the gnus.ding newsgroup by the
> following method:

> (nntp "quimby2"
>       (nntp-address "news.gnus.org")
>       (nntp-end-of-line "\r\n")
>       (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
>       (nntp-via-address "intermediate host")
>       (nntp-netcat-command "/home/yamaoka/bin/nc")
>       (nntp-via-rlogin-command "ssh")
>       (nntp-via-rlogin-command-switches ("-C" "-e" "none")))

I did one more experiment.  I tried this exact entry (just removing
nntp-netcat-command, and replacing nntp-via-address), and I was able
to talk to gmane, without any problems.

I then copied this entry, and gave the copy the name "chello2", and
the nntp-address to "news.chello.no".  When I started gnus again, it
connected fine to "quimby2", but not to "chello2" (the exact
gnus-secondary-select-methods are appended to the end of this message).

So I guess news.chello.no is the culprit.

The news.chello.no server announces itself as:
200 Welcome to the Chello Norway News Service (Twister v1.2.0)

The news.gmane.org server announces itself as:
200 main.gmane.org InterNetNews NNRP server INN 2.3.2 ready (posting ok).

Does anyone else recognize similar problems with the "Twister" NNTP
server? 

Thanx!


- Steinar



======================8<===========================
The exact gnus-secondary-select-methods entries used:

	(nntp "quimby2"
	      (nntp-address "news.gmane.org")
	      (nntp-end-of-line "\r\n")
	      (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
	      (nntp-via-address "somemachine.dyndns.org")
	      (nntp-via-rlogin-command "ssh")
	      (nntp-via-rlogin-command-switches ("-C" "-e" "none")))
	(nntp "chello2"
	      (nntp-address "news.chello.no")
	      (nntp-end-of-line "\r\n")
	      (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
	      (nntp-via-address "somemachine.dyndns.org")
	      (nntp-via-rlogin-command "ssh")
	      (nntp-via-rlogin-command-switches ("-C" "-e" "none")))




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2004-05-14 19:55 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-23  9:10 Problems using nntp-open-via-rlogin-and-telnet Steinar Bang
2004-03-23 11:19 ` Katsumi Yamaoka
2004-03-23 12:28   ` Steinar Bang
2004-04-10 20:24     ` How to debug nntp-open-via-rlogin-and-telnet? Steinar Bang
2004-04-10 20:32   ` netcat supported in nntp-open-via-rlogin-and-telnet? (Was: Problems using nntp-open-via-rlogin-and-telnet) Steinar Bang
2004-04-11  1:03     ` netcat supported in nntp-open-via-rlogin-and-telnet? Katsumi Yamaoka
2004-04-11 22:31       ` Steinar Bang
2004-04-12  7:29         ` Katsumi Yamaoka
2004-04-12  9:04           ` Katsumi Yamaoka
2004-04-13 10:28           ` Steinar Bang
2004-04-13 10:47             ` Katsumi Yamaoka
2004-04-13 20:34               ` Steinar Bang
2004-04-13 22:48                 ` Katsumi Yamaoka
2004-04-13 23:10                   ` Katsumi Yamaoka
2004-04-17 20:14                   ` Steinar Bang
2004-04-22 20:08                     ` Steinar Bang
2004-05-14 19:55           ` Steinar Bang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).