Server misconfiguration on sqlflow.org?
justinclift opened this issue · 3 comments
Looking into a failure report for go get sqlflow.org/gohive
, the problem looks like some form of server misconfiguration.
This is the initial failure info, when the command should instead work ok:
$ go get -v sqlflow.org/gohive
Fetching https://sqlflow.org/gohive?go-get=1
https fetch failed: Get http://sql-machine-learning.github.io/gohive/?go-get=1: redirected from secure URL https://sql-machine-learning.github.io/gohive?go-get=1 to insecure URL http://sql-machine-learning.github.io/gohive/?go-get=1
package sqlflow.org/gohive: unrecognized import path "sqlflow.org/gohive" (https fetch: Get http://sql-machine-learning.github.io/gohive/?go-get=1: redirected from secure URL https://sql-machine-learning.github.io/gohive?go-get=1 to insecure URL http://sql-machine-learning.github.io/gohive/?go-get=1)
Digging into it more, the problem seems to be the server responding with a http location for https requests, and a https location for http requests:
HTTPS request
(redirected to a http location to load instead)
$ curl -i "https://sql-machine-learning.github.io/gohive?go-get=1"
HTTP/1.1 301 Moved Permanently
Server: GitHub.com
Content-Type: text/html
Strict-Transport-Security: max-age=31556952
Location: http://sql-machine-learning.github.io/gohive/?go-get=1
Access-Control-Allow-Origin: *
Expires: Thu, 09 May 2019 07:03:26 GMT
Cache-Control: max-age=600
X-GitHub-Request-Id: 71E2:744E:23B214:26381D:5CD3CED1
Content-Length: 178
Accept-Ranges: bytes
Date: Thu, 09 May 2019 07:05:06 GMT
Via: 1.1 varnish
Age: 591
Connection: keep-alive
X-Served-By: cache-syd18920-SYD
X-Cache: HIT
X-Cache-Hits: 1
X-Timer: S1557385506.260295,VS0,VE1
Vary: Accept-Encoding
X-Fastly-Request-ID: 64100d91a2b4cf1eeac4c2b6d05e610a4faf7224
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
HTTP request
(the reverse happens here)
$ curl -i "http://sql-machine-learning.github.io/gohive?go-get=1"
HTTP/1.1 301 Moved Permanently
Content-Type: text/html
Server: GitHub.com
Location: https://sql-machine-learning.github.io/gohive?go-get=1
X-GitHub-Request-Id: 6912:5C86:24B09:2A08D:5CD3D168
Content-Length: 178
Accept-Ranges: bytes
Date: Thu, 09 May 2019 07:06:17 GMT
Via: 1.1 varnish
Age: 0
Connection: keep-alive
X-Served-By: cache-mel19025-MEL
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1557385577.439003,VS0,VE441
Vary: Accept-Encoding
X-Fastly-Request-ID: f4978bb45c34760148499e8bf85197c40ff6fa1a
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
At a guess, it should probably either be a matching protocol, or just giving https locations back regardless. Either way, the current approach doesn't seem right. 😉
Hi @justinclift , thank you for letting us know this problem.
I tried to run go get sqlflow.org/gohive twice. The first run failed but the second run succeeded.
yi.w@US-183229-MP x $ go get sqlflow.org/gohive
package sqlflow.org/gohive: unrecognized import path "sqlflow.org/gohive" (https fetch: Get http://sql-machine-learning.github.io/gohive/?go-get=1: EOF)
yi.w@US-183229-MP x $ go get -v sqlflow.org/gohive
Fetching https://sqlflow.org/gohive?go-get=1
Parsing meta tags from https://sqlflow.org/gohive?go-get=1 (status code 200)
get "sqlflow.org/gohive": found meta tag get.metaImport{Prefix:"sqlflow.org/gohive", VCS:"git", RepoRoot:"https://github.com/sql-machine-learning/gohive"} at https://sqlflow.org/gohive?go-get=1
sqlflow.org/gohive (download)
sqlflow.org/gohive/thrift
sqlflow.org/gohive/hiveserver2
sqlflow.org/gohive
I have no idea why it worked and didn't work.
I did the following to configure the server:
- Configured Google Domain to make sqflow.org points to https://sql-machine-learning.github.io.
- Created repo https://github.com/sql-machine-learning/sql-machine-learning.github.io to have the content of the Web site.
- At the root directory of the repo, I put a Git submodule /gohive pointing to the repo https://github.com/sql-machine-learning/gohive.
- In the root directory of https://github.com/sql-machine-learning/gohive, I created the /index.html file generated by https://github.com/bramp/goredirects.
I just checked that the Web site is successfully published:
Yeah, I'm not sure either. Thinking about it more, it seems like the problem is with the "sql-machine-learning.github.io" server returning the incorrect location.
eg a problem with the GitHub infrastructure
This is probably going to need a support ticket created with GitHub itself 😦, as the problem seems to be theirs to fix. 😉
This is very reasonable. I will put an eye on this problem, if it happens more I will create an issue for GitHub. Thank you for your interest in SQLFlow and for sharing all these.