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

Request failed - - http://192.168.134.129:4001/v2/keys/ #20

Open
hsluoyz opened this issue Jun 13, 2016 · 11 comments
Open

Request failed - - http://192.168.134.129:4001/v2/keys/ #20

hsluoyz opened this issue Jun 13, 2016 · 11 comments

Comments

@hsluoyz
Copy link

hsluoyz commented Jun 13, 2016

Hi.

I have an etcd 2.3.1 cluster with Kubernetes 1.2.4 on my Ubuntu 14.04 x64 VM.

Here's the status:

root@ubuntu:/kubernetes/cluster# etcdctl cluster-health
member ce2a822cea30bfca is healthy: got healthy result from http://192.168.134.129:4001
cluster is healthy

Then I browsed to http://henszey.github.io/etcd-browser/ in this VM's firefox, entered http://192.168.134.129:4001 and click Go!. It gave me:

Request failed - - http://192.168.134.129:4001/v2/keys/

But when I opened the http://192.168.134.129:4001/v2/keys/ address in another tab of my Firefox, it shows normally:

{"action":"get","node":{"dir":true,"nodes":[{"key":"/registry","dir":true,"modifiedIndex":3,"createdIndex":3},{"key":"/bbb","value":"test","modifiedIndex":70689,"createdIndex":70689},{"key":"/111","value":"333","modifiedIndex":35380,"createdIndex":35380},{"key":"/aaa","value":"111","modifiedIndex":50991,"createdIndex":50991},{"key":"/aab","dir":true,"modifiedIndex":35980,"createdIndex":35980},{"key":"/coreos.com","dir":true,"modifiedIndex":13,"createdIndex":13}]}}

So I wonder where it's wrong? Thanks!

@wbwangk
Copy link

wbwangk commented Jun 26, 2016

i got same response.

@xh4n3
Copy link

xh4n3 commented Aug 18, 2016

@hsluoyz @wbwangk
Might be an issue with Access-Control-Allow-Origin
See if this happens:
image

There're many chrome extensions to solve this, such as ForceCORS
image

I believe if you use Docker version of etcd browser, this won't happen.

@jayunit100
Copy link

jayunit100 commented Sep 7, 2016

me to seeing something similar on my mac w/ request failed. needs more debug logs (connection refused? client error?). curl http://127.0.0.1:2379/v2/keys works for me, but the client running locally doesnt

@hsluoyz
Copy link
Author

hsluoyz commented May 24, 2017

@henszey Anybody here still?

@hsluoyz
Copy link
Author

hsluoyz commented May 24, 2017

etcd has released v3 for some time now, does this browser still work for etcd v3?

@JohnHaan
Copy link

I faced same issue even though I run through docker image.

I got below error when I see logs of the etcd-brower docker image.

root@ubuntu:~# docker logs -f etcd-browser
proxy /api requests to etcd on 183.110.81.176:4001
etc-browser listening on port 8000

events.js:72
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED
at errnoException (net.js:901:11)
at Object.afterConnect [as oncomplete] (net.js:892:19)

@freeart
Copy link

freeart commented Aug 21, 2017

Chrome doesn't allow to use cross-domain for localhost

@lannyMa
Copy link

lannyMa commented Nov 7, 2017

+1

@wadelee1986
Copy link

how to resolve this problem ?

@qianlnk
Copy link

qianlnk commented Feb 28, 2018

thank you @xh4n3.

my env:
docker-machine:
192.168.99.100 etcd0
192.168.99.101 etcd1
192.168.99.102 etcd2

and run etcd-browser:

docker run -d -it --name etcd-browser -p 12345:8000 --env ETCD_HOST=192.168.99.100 --env ETCD_PORT=4001 etcd-browser

I insalled ForceCORS and resolve this problem. here is my setting list:

setting for:
http://192.168.99.100:4001/*

header name header value
Access-Control-Allow-Origin *
Access-Control-Allow-Methods *

@harder-worker
Copy link

To resolve this question (Request failed 404),you should edit server.js add to the values of ca_file、key_file、cert_file.such as
var ca_file = process.env.ETCDCTL_CA_FILE || '/etc/kubernetes/pki/etcd/ca.crt';
var key_file = process.env.ETCDCTL_KEY_FILE || '/etc/kubernetes/pki/etcd/server.key';
var cert_file = process.env.ETCDCTL_CERT_FILE || '/etc/kubernetes/pki/etcd/server.crt';

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

No branches or pull requests

10 participants