9front - general discussion about 9front
 help / color / mirror / Atom feed
* telnet to port (and webfs debug)
@ 2015-02-12 11:02 Giacomo Tesio
  2015-02-12 16:30 ` [9front] " BurnZeZ
       [not found] ` <aac0a09f031f8116539031cf2d9a179a@felloff.net>
  0 siblings, 2 replies; 5+ messages in thread
From: Giacomo Tesio @ 2015-02-12 11:02 UTC (permalink / raw)
  To: 9front, Fans of the OS Plan 9 from Bell Labs

Hi, I'm having an hard time to debug a problem with http clients in
plan9/qemu (actually 9front, but I guess my questions apply to all
plan9 versions).

DNS and ping works properly, just http fails.

I suspect it's a proxy issue. I have set httpproxy environment
variable but with no success: both hget and mothra doesn't works.

I can connect to the qemu host webserver on port 80 and receive the
proper page, but for any other address I can't obtain a response.

The proxy does not log any access.

Now, to debug this issue, I'd like to telnet the proxy port and
manually forge an http request.

However I can't understand hot to specify a port reading man telnet.

What's plan9 equivalent of

   telnet www.google.com 80



Giacomo


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

* Re: [9front] telnet to port (and webfs debug)
  2015-02-12 11:02 telnet to port (and webfs debug) Giacomo Tesio
@ 2015-02-12 16:30 ` BurnZeZ
       [not found] ` <aac0a09f031f8116539031cf2d9a179a@felloff.net>
  1 sibling, 0 replies; 5+ messages in thread
From: BurnZeZ @ 2015-02-12 16:30 UTC (permalink / raw)
  To: 9front

> I suspect it's a proxy issue. I have set httpproxy environment
> variable but with no success: both hget and mothra doesn't works.
webfs is the one that needs to know about httpproxy, so set it before starting webfs
mothra and hget know nothing about it
They just interact with webfs files

> What's plan9 equivalent of
>    telnet www.google.com 80
telnet tcp!www.google.com!80
It's something like, proto!addr!service
There's a little more to it though, so see dial(2)


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

* Re: [9fans] telnet to port (and webfs debug)
       [not found] ` <aac0a09f031f8116539031cf2d9a179a@felloff.net>
@ 2015-02-13  8:50   ` Giacomo Tesio
       [not found]     ` <398e2886ff265a8839050c31589508d0@felloff.net>
  0 siblings, 1 reply; 5+ messages in thread
From: Giacomo Tesio @ 2015-02-13  8:50 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs, 9front

I did already tried this, but without success, but I tried it again
just to be sure, still without success.

I tried to telnet the proxy with telnet tcp!host!port and it worked as
expected ("GET http://www.google.com" printed its bloated html).

This limit the issue boundaries to webfs (since, as far as I can see,
hget is "just" a wrapper of it), since both squid and the tcp stack
proved to work properly.


The problem is, I can't figure out how to debug webfs. Any tip?

Note that it worked once, a few days ago, when I managed to sysupdate
(setting http_proxy.host in /usr/glenda/.hgrc).



Giacomo



2015-02-12 17:27 GMT+01:00  <cinap_lenrek@felloff.net>:
> the httpproxy variable is read by webfs on startup only. webfs is usually
> started in your $home/lib/profile to provide http client service.
>
> just setting httpproxy before running hget or mothra has no
> effect on the proxy setting unless you start a new webfs instance.
>
> so try:
>
> httpproxy=http://proxy:port
> webfs
> hget http://www.google.com/
>
> when that works, set the httpproxy variable at the top of your
> $home/lib/profile before webfs is started to make it permanent.
>
> --
> cinap
>


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

* Re: [9fans] telnet to port (and webfs debug)
       [not found]     ` <398e2886ff265a8839050c31589508d0@felloff.net>
@ 2015-02-13  9:59       ` Giacomo Tesio
  2015-02-23  6:41         ` [9front] " cinap_lenrek
  0 siblings, 1 reply; 5+ messages in thread
From: Giacomo Tesio @ 2015-02-13  9:59 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs, 9front

Ok fixed. The problem was plain stupid: I did not prepended "http://"
to httpproxy, setting it to just proxy:port.

However, I noted that webfs -d option is not documented. Nor is the
need to prepend http:// to httpproxy (I suppose however that this
could be taken as default).
Whenever I'll find my way to acme and plan9 I'll send you a patch...


Thanks you all for your help!


Giacomo


2015-02-13 10:11 GMT+01:00  <cinap_lenrek@felloff.net>:
> heres how it should look like (tuttle.9hal:8888 is my proxy servr):
>
> term% httpproxy=http://tuttle.9hal:8888 webfs -d; hget http://google.com
> clientctl: url http://google.com
> http(0): GET http://google.com/
> hdial [1] tcp!tuttle.9hal!8888
> -> GET http://google.com/ HTTP/1.1
> Host: google.com
> User-Agent: Mozilla/5.0 (compatible; hjdicks)
> Connection: keep-alive
> Referer: http://google.com/
> Accept: */*
>
> <- HTTP/1.1 302 Found
>
> --
> cinap
>


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

* Re: [9front] Re: [9fans] telnet to port (and webfs debug)
  2015-02-13  9:59       ` Giacomo Tesio
@ 2015-02-23  6:41         ` cinap_lenrek
  0 siblings, 0 replies; 5+ messages in thread
From: cinap_lenrek @ 2015-02-23  6:41 UTC (permalink / raw)
  To: 9front

i made webfs now error when $httppoxy is invalid instead
of silently ignoring it.

--
cinap


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

end of thread, other threads:[~2015-02-23  6:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-12 11:02 telnet to port (and webfs debug) Giacomo Tesio
2015-02-12 16:30 ` [9front] " BurnZeZ
     [not found] ` <aac0a09f031f8116539031cf2d9a179a@felloff.net>
2015-02-13  8:50   ` [9fans] " Giacomo Tesio
     [not found]     ` <398e2886ff265a8839050c31589508d0@felloff.net>
2015-02-13  9:59       ` Giacomo Tesio
2015-02-23  6:41         ` [9front] " cinap_lenrek

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).