Skip to content
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

Failed to compile dashboard #500

Closed
1 of 5 tasks
spacewander opened this issue Sep 22, 2020 · 14 comments
Closed
1 of 5 tasks

Failed to compile dashboard #500

spacewander opened this issue Sep 22, 2020 · 14 comments
Assignees
Labels
Milestone

Comments

@spacewander
Copy link
Member

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • Bug
  • Requirements
  • Feature or performance improvement
  • Other

This issue is migrated from apache/apisix#2272

#2. I tried to build dashboard, go build needs to import following:
"github.com/apisix/manager-api/conf"
"github.com/apisix/manager-api/log"
"github.com/apisix/manager-api/route"
However I kept getting the errors saying those cannot found. I even tried to do, say: go get github.com/apisix/manager-api/conf, etc. they could not be found. I searched the github and unable to find them. Please advise on this.

#3, Since I could not move forward with #2, I tried to do docker for the dashboard. again it failed with timed-out for what it looked like that something to with GoProxy tried to dial tcp 119.28.201.50:443 I tried to see what the ip address seemed to be un-resolvable. I m from US and didnt think I needed GoProxy. so please advise on this as well.

@spacewander
Copy link
Member Author

CC @MrLightSpeed0

@juzhiyuan juzhiyuan added this to the 1.6 milestone Sep 22, 2020
@MrLightSpeed0
Copy link

Hi I disabled the GoProxy. but got the same error. so it is for something else. I am behind a company proxy and I do have http_proxy and https_proxy set up in the system since I was able to do: "go get github.com/something" to download with no issue. no sure why this "dial tcp..." failed... Thank you.


go: github.com/api7/apitest@v1.4.9: Get https://proxy.golang.org/github.com/api7/apitest/@v/v1.4.9.mod: dial tcp 172.217.4.49:443: connect: network is unreachable
ERROR: Service 'manager' failed to build: The command '/bin/sh -c mkdir /go/manager-api     && go build -o /go/manager-api/manager-api     && mv /go/src/github.com/apisix/manager-api/build.sh /go/manager-api/     && mv /go/src/github.com/apisix/manager-api/conf/conf_preview.json /go/manager-api/conf.json     && rm -rf /go/src/github.com/apisix/manager-api     && rm -rf /etc/localtime     && ln -s  /usr/share/zoneinfo/Hongkong /etc/localtime     && dpkg-reconfigure -f noninteractive tzdata' returned a non-zero code: 1

@juzhiyuan
Copy link
Member

ping @nic-chen

@nic-chen
Copy link
Member

Hi I disabled the GoProxy. but got the same error. so it is for something else. I am behind a company proxy and I do have http_proxy and https_proxy set up in the system since I was able to do: "go get github.com/something" to download with no issue. no sure why this "dial tcp..." failed... Thank you.


go: github.com/api7/apitest@v1.4.9: Get https://proxy.golang.org/github.com/api7/apitest/@v/v1.4.9.mod: dial tcp 172.217.4.49:443: connect: network is unreachable
ERROR: Service 'manager' failed to build: The command '/bin/sh -c mkdir /go/manager-api     && go build -o /go/manager-api/manager-api     && mv /go/src/github.com/apisix/manager-api/build.sh /go/manager-api/     && mv /go/src/github.com/apisix/manager-api/conf/conf_preview.json /go/manager-api/conf.json     && rm -rf /go/src/github.com/apisix/manager-api     && rm -rf /etc/localtime     && ln -s  /usr/share/zoneinfo/Hongkong /etc/localtime     && dpkg-reconfigure -f noninteractive tzdata' returned a non-zero code: 1

It works fine on my machine. I think it's a network issue. you could set https://goproxy.cn as GOPROXY (in https://github.com/apache/apisix-dashboard/blob/master/api/Dockerfile#L23-L24) and try again.

@juzhiyuan
Copy link
Member

ok then, closed now.

@MrLightSpeed0
Copy link

Hello you said the dial tcp error was related to my network. I will check on that. that is the for question #3 (build with docker). what about #2, could you please help on that? copy it here for your quick reference:

#2. I tried to build dashboard, go build needs to import following:
"github.com/apisix/manager-api/conf"
"github.com/apisix/manager-api/log"
"github.com/apisix/manager-api/route"
However I kept getting the errors saying those cannot found. I even tried to do, say: go get github.com/apisix/manager-api/conf, etc. they could not be found. I searched the github and unable to find them. Please advise on this.

@juzhiyuan juzhiyuan reopened this Sep 24, 2020
@juzhiyuan
Copy link
Member

Hello you said the dial tcp error was related to my network. I will check on that. that is the for question #3 (build with docker). what about #2, could you please help on that? copy it here for your quick reference:

#2. I tried to build dashboard, go build needs to import following:
"github.com/apisix/manager-api/conf"
"github.com/apisix/manager-api/log"
"github.com/apisix/manager-api/route"
However I kept getting the errors saying those cannot found. I even tried to do, say: go get github.com/apisix/manager-api/conf, etc. they could not be found. I searched the github and unable to find them. Please advise on this.

@nic-chen Please take a look at this one.

@nic-chen
Copy link
Member

Hello you said the dial tcp error was related to my network. I will check on that. that is the for question #3 (build with docker). what about #2, could you please help on that? copy it here for your quick reference:

#2. I tried to build dashboard, go build needs to import following:
"github.com/apisix/manager-api/conf"
"github.com/apisix/manager-api/log"
"github.com/apisix/manager-api/route"
However I kept getting the errors saying those cannot found. I even tried to do, say: go get github.com/apisix/manager-api/conf, etc. they could not be found. I searched the github and unable to find them. Please advise on this.

github.com/apisix/manager-api is apisix-dashboard/api
please take a look at :
https://github.com/apache/apisix-dashboard/blob/master/api/go.mod#L1

@juzhiyuan
Copy link
Member

Still don't know how to resolve this issue :(

@MrLightSpeed0 Could you please provide a detailed installation steps? so I could try to reproduce this issue.

@MrLightSpeed0
Copy link

Hello. I was following the steps mentioned on this page: https://github.com/apache/apisix-dashboard
I was at this step 4 Build
cd api && go build -o ../manager-api . && cd ..
and got following error:
main.go:24:2: cannot find package "github.com/apisix/manager-api/conf" in any of: /usr/src/github.com/apisix/manager-api/conf (from $GOROOT) /root/go/src/github.com/apisix/manager-api/conf (from $GOPATH) main.go:25:2: cannot find package "github.com/apisix/manager-api/log" in any of: /usr/src/github.com/apisix/manager-api/log (from $GOROOT) /root/go/src/github.com/apisix/manager-api/log (from $GOPATH) main.go:26:2: cannot find package "github.com/apisix/manager-api/route" in any of: /usr/src/github.com/apisix/manager-api/route (from $GOROOT) /root/go/src/github.com/apisix/manager-api/route (from $GOPATH)
what do I need to set for $GOPATH and $GOROOT. I am running this as root.

@juzhiyuan
Copy link
Member

ok, we will test and resolve this issue before 1.6 release.

@juzhiyuan
Copy link
Member

but could @nic-chen give some suggestions about this issue? not sure if it's a bug or a tricky issue 🤔

@nic-chen
Copy link
Member

I think it's not a bug.
more like doc guidance issue.
@MrLightSpeed0 had you enable go module?

@juzhiyuan
Copy link
Member

Please enable Go module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants