New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http.TestClient and TestRedirect FAIL: Get http://www.google.com/robots.txt: unexpected EOF #20

Closed
gopherbot opened this Issue Nov 11, 2009 · 28 comments

Comments

Projects
None yet
5 participants
@gopherbot
Copy link

gopherbot commented Nov 11, 2009

by lcgong:

What steps will reproduce the problem?
1. ./all.bash
2.
3.

What is the expected output? What do you see instead?


--- FAIL: http.TestClient
    Get http://www.google.com/robots.txt: read
tcp:10.112.1.82:54219->216.239.61.104:80: connection reset by peer
--- FAIL: http.TestRedirect
    Get http://codesearch.google.com/: unexpected EOF
FAIL


What is your $GOOS?  $GOARCH?
linux/386

Which revision are you sync'ed to?  (hg log -l 1)

3973:aa68d0be67fa

Please provide any additional information below.
@agl

This comment has been minimized.

Copy link
Contributor

agl commented Nov 11, 2009

Comment 1:

This is typically caused by a firewall. Note, however, that everything is already 
built and installed at this stage. You can also add http to the NOTEST list in 
src/pkg/Makefile to skip this test.

Status changed to Accepted.

@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Nov 11, 2009

Comment 2 by lcgong:

done
thanks
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Nov 11, 2009

Comment 3 by weilyyoung:

I met the similar issue. I know everything has been successfully built and installed. 
But I wonder what is the root cause of the "unexpected EOF"? Thanks.
Here's my output:
--- FAIL: http.TestClient
    Get http://www.google.com/robots.txt: unexpected EOF
--- FAIL: http.TestRedirect
    Get http://codesearch.google.com/: unexpected EOF
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Nov 11, 2009

Comment 4 by michael.jones:

weilyyoung, do you have a firewall enabled on your computer that blocks these http 
requests? As was answered above, if you disable this you should be OK or if you can't 
disable it, then disable the test as explained. I disabled my OS X firewall and the
tests 
passed.
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Nov 12, 2009

Comment 6 by weilyyoung:

Hi, Michael. I'm running ubuntu 9.10 and all firewalls (iptables) are disabled (double 
checked with iptables -L -n). 
lcgong's issue is "connection reset by peer" which should be related to the firewall. 
But why "unexpected EOF" is related to firewall? I use firefox to get the URL, it works 
well. So may be some issue in this test code.
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Nov 12, 2009

Comment 7 by weilyyoung:

I attached 2 capture files. The "httpTestClientFail.pcap" contains the packet sequence 
when trying to get the robot.txt file from google. It seems the connection is 
incorrectly FIN and RST by the server. 
But in "googleRobot.pcap" file, it contains the packets when I tried using FireFox for 
http://www.google.com/robot.txt. It seems everything is correct. 
Not sure why google's server doesn't allow the HTTP GET from "go client".

Attachments:

  1. httpTestClientFail.pcap (1275 bytes)
  2. googleRobot.pcap (2898 bytes)
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Nov 12, 2009

Comment 8 by ptw007:

Just a little more information to pass along. It's not my work, it's others and I am
just the mediator.  I now how to fit things together but I can't create the technology
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Nov 12, 2009

Comment 9 by subhrangshus:

I am having a problem with the printer test:
--- FAIL: printer.Test
How can I switch off this part in the Makefile.
BTW, if has everything been installed if I have reached rhis far ? Then I won't 
bother.
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Nov 12, 2009

Comment 10 by subhrangshus:

Went past the printer error by including it in the NOTEST list.
Now I am getting the following error:
--- FAIL: tar.TestReader
        test 0: Unexpected error: open testdata/gnu.tar: error 530
        test 1: Unexpected error: open testdata/star.tar: error 530
        test 2: Unexpected error: open testdata/v7.tar: error 530
--- FAIL: tar.TestPartialRead
        Unexpected error: open testdata/gnu.tar: error 530
--- FAIL: tar.TestWriter
        test 0: Unexpected error: open testdata/writer.tar: error 530
        test 1: Unexpected error: open testdata/writer-big.tar: error 530
FAIL
make[1]: *** [test] Error 1
make[1]: Leaving directory `/go/src/pkg/archive/tar'
make: *** [archive/tar.test] Error 2
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Nov 13, 2009

Comment 11 by nathanollerenshaw:

google seems to block certain IPs/networks from accessing it's website. I think its a
bad idea to rely on network connectivity to build, anyway. My network at work doesn't
have any route to the internet, for example.
Maybe, start a local server, and talk to that.
@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Nov 14, 2009

Comment 12:

Issue #177 has been merged into this issue.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Nov 15, 2009

Comment 14:

Issue #199 has been merged into this issue.

@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Nov 15, 2009

Comment 15 by pmetzger:

Just encountered this while building on OS X. Merely adding http to NOTEST caused
another network related test to fail. It seems that it would be better if the build
infrastructure didn't assume that the build machine is on the internet and has no
packet filter on.
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Nov 16, 2009

Comment 16 by dujinfang:

not a firewall problem. Last time I run into this problem but can get the url with
curl without problem.
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Nov 18, 2009

Comment 17 by luger.lee:

Does the way to solve it has been found ?
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Dec 1, 2009

Comment 18 by fatih.tokus:

a
@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Dec 2, 2009

Comment 19:

Labels changed: added packagechange.

@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Dec 3, 2009

Comment 20 by codedread:

After updating my go source after a week, I'm now getting the following error when
building on OSX:
make[2]: Entering directory `/Users/jschill1/Documents/go/src/pkg/net'
6g -o _gotest_.6 dnsclient.go dnsconfig.go dnsmsg.go fd.go fd_darwin.go ip.go
ipsock.go net.go parse.go port.go sock.go tcpsock.go udpsock.go unixsock.go   
dialgoogle_test.go ip_test.go net_test.go parse_test.go port_test.go server_test.go
timeout_test.go
rm -f _test/net.a
gopack grc _test/net.a _gotest_.6 
make[2]: Leaving directory `/Users/jschill1/Documents/go/src/pkg/net'
--- FAIL: net.TestUDPServer
    TestPacket udp 0.0.0.0 127.0.0.1
    TestPacket udp  127.0.0.1
    TestPacket udp [::] [::ffff:127.0.0.1]
    TestPacket udp [::] 127.0.0.1
    TestPacket udp 0.0.0.0 [::ffff:127.0.0.1]
    TestPacket udp 0.0.0.0 127.0.0.1
    TestPacket udp  127.0.0.1
    TestPacket udp [::] [::ffff:127.0.0.1]
    TestPacket udp [::] 127.0.0.1
    TestPacket udp 0.0.0.0 [::ffff:127.0.0.1]
    fd.Read() = 0, read udp:127.0.0.1:52711->127.0.0.1:52710: resource temporarily
unavailable (want 0, nil)
FAIL
make[1]: *** [test] Error 1
Is it related?
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Mar 26, 2010

Comment 21 by dharithri:

today I pulled the go code and tried to build I got this error.
make[2]: Leaving directory `/home/sun/go/src/pkg/go/printer'
--- FAIL: printer.Test
        open testdata/empty.input: error 530
        open testdata/comments.input: error 530
        open testdata/comments.input: error 530
        open testdata/linebreaks.input: error 530
        open testdata/expressions.input: error 530
        open testdata/expressions.input: error 530
        open testdata/declarations.input: error 530
        open testdata/statements.input: error 530
FAIL
make[1]: *** [test] Error 1
make[1]: Leaving directory `/home/sun/go/src/pkg/go/printer'
make: *** [go/printer.test] Error 2
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Jun 3, 2010

Comment 22 by omerkilic:

Perhaps for those of us behind proxy servers the environment variable 'http_proxy'
could be used to prevent the error message?
Failing that, I would like to echo #11's suggestion of starting a local server and
talking to that.
@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Sep 17, 2010

Comment 23:

Issue #1115 has been merged into this issue.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Sep 17, 2010

Comment 24:

Issue #1117 has been merged into this issue.

@rsc

This comment has been minimized.

Copy link
Contributor

rsc commented Oct 11, 2010

Comment 25:

This is still not fixed, but you can disable all dependence on the outside network by
using
export DISABLE_NET_TESTS=1
before running all.bash.
@mark-summerfield

This comment has been minimized.

Copy link

mark-summerfield commented Oct 12, 2010

Comment 26:

It may not be fixed but it isn't (& hasn't been) a problem for a week or two now. I
don't even seem to need to set DISABLE_NET_TESTS=1. I just do hg pull;hg update release;
cd src; ./all.bash & everything seems to build & tests run fine.
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Oct 19, 2010

Comment 27 by workitharder:

I get the exact error as in the OP, but there is no firewall.
We do have a proxy, which wget handles correctly:
$ env | grep -i proxy
ftp_proxy=http://fooproxy:74
https_proxy=http://fooproxy:74
http_proxy=http://fooproxy:74
no_proxy=localhost,127.0.0.0/8
$ wget http://google.com/robots.txt
--20:44:38--  http://google.com/robots.txt
Resolving fooproxy... 339.95.250.47
Connecting to svlproxy|339.95.250.47|:74... connected.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: http://www.google.com/robots.txt [following]
--20:44:38--  http://www.google.com/robots.txt
Connecting to svlproxy|339.95.250.47|:74... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: `robots.txt'
    [ <=>                                                                    ] 5,173       --.-K/s   in 0s     
20:44:38 (183 MB/s) - `robots.txt' saved [5173]
$ md5sum robots.txt 
51bc0b6be58f56db2180b6c73a8c66ff  robots.txt
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Oct 19, 2010

Comment 28 by rsc@swtch.com:

@workitharder: you have issue #53.
@gopherbot

This comment has been minimized.

Copy link
Author

gopherbot commented Jan 28, 2011

Comment 29 by hoka@hokapoka.com:

I too am getting this on an x86 that was updated & tested about 2 weeks ago that's using
any form of proxy. 
Here's some of the log :
-----------------------------------------------------------------
make[2]: Leaving directory `/home/andrew/gosource/src/pkg/http'
make[2]: Entering directory `/home/andrew/gosource/src/pkg/http'
/home/andrew/bin/8g -o _gotest_.8 chunked.go client.go dump.go fs.go lex.go persist.go
request.go response.go server.go status.go transfer.go url.go  client_test.go
lex_test.go readrequest_test.go request_test.go requestwrite_test.go response_test.go
responsewrite_test.go url_test.go
rm -f _test/http.a
/home/andrew/bin/gopack grc _test/http.a _gotest_.8 
make[2]: Leaving directory `/home/andrew/gosource/src/pkg/http'
--- FAIL: http.TestRedirect
    Get(http://codesearch.google.com/) got status 200 at http://codesearch.google.com/, want 200 at http://www.google.com/codesearch
FAIL
make[1]: *** [test] Error 1
make[1]: Leaving directory `/home/andrew/gosource/src/pkg/http'
make: *** [http.test] Error 2
---------------------------------------------------------------
I'm getting a different issue on a separate network using x64. The tests in ./all.bash
script just hangs at this test: 
gopack grc _test/net.a _gotest_.6
These were newly installed linux machines.  Before I saw this post I tested the
installation of Go with a very simple "hello world", which worked fine.
That being said, the export DISABLE_NET_TESTS=1 you suggested Russ allows the tests to
complete w/o hitch.
@bradfitz

This comment has been minimized.

Copy link
Member

bradfitz commented Apr 15, 2011

Comment 30:

Package http no longer uses the external network:
http://code.google.com/p/go/source/detail?r=b8d901732d17

Labels changed: added pkg-http.

Owner changed to @bradfitz.

Status changed to Fixed.

@gopherbot gopherbot added the pkg-http label Apr 15, 2011

minux pushed a commit to minux/goios that referenced this issue Feb 27, 2015

cmd/7g: fix unary OMINUS
Fixes golang#20

Unary OMINUS was all messed up, so port over the 5g version. In the process the unused uop: label and code was found to be unused.

minux pushed a commit to minux/goios that referenced this issue Feb 27, 2015

cmd/7g: fix x := a / (-1)
Fixes golang#20
Fixes golang#19

Also includes a fix for the compiler segfault. Minux says that MOV R0, R0 might get eaten by the peep opt, which is probably true, but I'm not sure if the defer magic happens before peep or not.

@golang golang locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.