etcd-browser icon indicating copy to clipboard operation
etcd-browser copied to clipboard

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

Open hsluoyz opened this issue 8 years ago • 11 comments

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!

hsluoyz avatar Jun 13 '16 13:06 hsluoyz

i got same response.

wbwangk avatar Jun 26 '16 11:06 wbwangk

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

xh4n3 avatar Aug 18 '16 03:08 xh4n3

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

jayunit100 avatar Sep 07 '16 21:09 jayunit100

@henszey Anybody here still?

hsluoyz avatar May 24 '17 05:05 hsluoyz

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

hsluoyz avatar May 24 '17 06:05 hsluoyz

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)

JohnHaan avatar Jun 13 '17 04:06 JohnHaan

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

freeart avatar Aug 21 '17 10:08 freeart

+1

lannyMa avatar Nov 07 '17 12:11 lannyMa

how to resolve this problem ?

wadelee1986 avatar Nov 08 '17 01:11 wadelee1986

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 *

qianlnk avatar Feb 28 '18 07:02 qianlnk

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';

harder-worker avatar May 09 '22 09:05 harder-worker