500 (The backend responded with an error)
Consul returned an error. You may have visited a URL that is loading an unknown resource, so you can try going back to the root or try re-submitting your ACL Token/SecretID by going back to ACLs.
Try looking in our documentation
How to deal with this problem?
Please provide more details about your setup: consul version, agent/server information, and how to reproduce the problem you are seeing! Right now your question is so general, it is impossible to help you. Thanks for reporting!
Could you check the web inspector and let us know what exactly is going wrong?
Could you check the web inspector and let us know what exactly is going wrong?
I started it with docker
docker run --name consul1 -d -p 8500:8500 -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8600:8600 consul agent -server -bootstrap-expect 2 -ui -bind=0.0.0.0 -client=0.0.0.0
After my service is registered, when I click on the service, this error will be reported when I check the service details
Please provide more details about your setup: consul version, agent/server information, and how to reproduce the problem you are seeing! Right now your quCONSUL_VERSION=1.7.0zestion is so general, it is impossible to help you. Thanks for reporting!
CONSUL_VERSION=1.7.0
We have the same issue on Consul since version 1.7.0 when we want to look at service over the UI we get this error.
In the logs I see:
Feb 13 14:15:34 tonit-vm-vault-consul-01 consul[9094]: 2020-02-13T14:15:34.956Z [ERROR] agent.http: Request error: method=GET url=/v1/discovery-chain/consul?dc=us-central from=192.168.121.1:55820 error="Connect must be enabled in order to use this endpoint"
Feb 13 14:15:34 tonit-vm-vault-consul-01 consul[9094]: agent.http: Request error: method=GET url=/v1/discovery-chain/consul?dc=us-central from=192.168.121.1:55820 error="Connect must be enabled in order to use this endpoint"
But we do not use consul as service mesh and do not need connect. We just use it as vault backend.
Thank you for reporting, now we know what you mean! This is an oversight on our side and will be fixed in 1.7.1 which will be released soon.
Thank you, I will wait for this update。
Oh hey, I just came back here to say thankyou for the report, but I see @i0rek already did.
Just an extra thankyou for the report here! 🙌
This issue still persists in Consul v1.7.2
When refreshing the UI the same error occurs. Am I missing something ?
Consul returned an error. You may have visited a URL that is loading an unknown resource, so you can try going back to the root or try re-submitting your ACL Token/SecretID by going back to ACLs.
Hi @Wolfsharad
There are many reasons why you might be seeing that message in the Consul UI, to be sure this is the same issue would it be possible for you to give us some more information, such as:
Thanks,
Accessing : http:/xx.xxx.xxx.xx:8500/ui
It redirects and lands at : http://xx.xxx.xxx.xx:8500/ui/ajio-service-discovery/services
Everything works fine.
Hit the Refresh button, the Error occurs. (Try few times if not getting the Error in the first instance)
Error in console
vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:2680 Error while processing route: dc.services.index Cannot read property 'nextHopProtocol' of undefined TypeError: Cannot read property 'nextHopProtocol' of undefined
at http://xx.xxx.xxx.xx:8500/ui/assets/consul-ui-80219c43077ea818f035ddb261cd9256.js:1902:47
at e (http://xx.xxx.xxx.xx:8500/ui/assets/consul-ui-80219c43077ea818f035ddb261cd9256.js:1904:20)
at http://xx.xxx.xxx.xx:8500/ui/assets/consul-ui-80219c43077ea818f035ddb261cd9256.js:1903:44
at e (http://xx.xxx.xxx.xx:8500/ui/assets/consul-ui-80219c43077ea818f035ddb261cd9256.js:1904:20)
at r.init (http://xx.xxx.xxx.xx:8500/ui/assets/consul-ui-80219c43077ea818f035ddb261cd9256.js:1234:16)
at r [as init] (http://xx.xxx.xxx.xx:8500/ui/assets/vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:3018:9)
at m (http://xx.xxx.xxx.xx:8500/ui/assets/vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:2922:218)
at Function.e.create (http://xx.xxx.xxx.xx:8500/ui/assets/vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:2933:8)
at e.r.create (http://xx.xxx.xxx.xx:8500/ui/assets/vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:1341:18)
at http://xx.xxx.xxx.xx:8500/ui/assets/vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:1315:76
(anonymous) @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:2680
error @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:2680
O @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:2690
c.triggerEvent @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:2621
t.trigger @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:4876
c.transitionDidError @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:2621
(anonymous) @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:4867
w @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:5076
_ @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:5074
v @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:5072
t.invoke @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:4609
t.flush @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:4601
t.flush @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:4614
r._end @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:4676
r.end @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:4631
r._run @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:4678
r._join @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:4677
r.join @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:4642
h @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:3492
(anonymous) @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:3495
l @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:956
c @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:957
setTimeout (async)
(anonymous) @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:958
u @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:949
fireWith @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:950
fire @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:950
u @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:949
fireWith @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:950
ready @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:967
H @ vendor-5b94eb6a11bff93d1247a342ee40dbf8.js:967
VM38:1 Uncaught SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at showNeg.js:241
at XMLHttpRequest.onDefaultReadyStateChangeHandler (showNeg.js:311)
(anonymous) @ showNeg.js:241
onDefaultReadyStateChangeHandler @ showNeg.js:311
XMLHttpRequest.send (async)
showNag.NTServerCall @ showNeg.js:322
chkshowNeg @ showNeg.js:239
(anonymous) @ showNeg.js:47
showNeg.js:322 Cross-Origin Read Blocking (CORB) blocked cross-origin response https://negbar.ad-blocker.org/chrome/adblocker-chrome-shownegJson.txt with MIME type text/plain. See https://www.chromestatus.com/feature/5629709824032768 for more details.
showNag.NTServerCall @ showNeg.js:322
chkshowNeg @ showNeg.js:239
(anonymous) @ showNeg.js:47
Perfect thanks @Wolfsharad! This is a slightly different issue (which has been fixed but has not been released as of yet unfortunately).
https://github.com/hashicorp/consul/issues/7643
TL;DR clearing your browser cache should solve it until we push out a release.
Cool. Thanks !
Emmmmm, The error still occurs in version latest(v 1.8.0), are there some ideas to solve this? I run it with Docker as well, The following is the command:
docker run --name consul1 -d -p 8500:8500 -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8600:8600 consul agent -server -bootstrap-expect 2 -ui -bind=0.0.0.0 -client=0 .0.0.0
Hi @QofFlower ,
Thanks for dropping by!
Consul could be returning a 500 error for many different reasons, and the UI will show you that you are getting a 500 error. Are you sure that the error you are seeing is due to the fact that you have connect disabled, or due to the 'nextHopProtocol' error that occurred in 1.7?
There are many reasons why you might be seeing that message in the Consul UI, to be sure this is the same issue would it be possible for you to give us some more information, such as:
What page are you trying to view when you get this error?
If you could open Web Inspector/Developer Tools for me and look in both the Console and Network tabs and let me know if you see anything in there that is red. Let me know if you are unsure how to do this and I can walk you through.
I just noticed you have -bootstrap-expect 2 and a typo in the command you pasted above -client=0 .0.0.0, could either of these be the root of the 500 error?
https://www.consul.io/docs/agent/options#_bootstrap_expect
This flag provides the number of expected servers in the datacenter. Either this value should not be provided or the value must agree with other servers in the cluster. When provided, Consul waits until the specified number of servers are available and then bootstraps the cluster. This allows an initial leader to be elected automatically.
Potentially, Consul is still waiting on the second server in order to bootstrap
Thanks,
Most helpful comment
Thank you for reporting, now we know what you mean! This is an oversight on our side and will be fixed in 1.7.1 which will be released soon.