Hi,
That looks like it is working. The page you get back contains some
sections that are displayed if the Javascript app encounters an error,
so they are in the static content of the UI, but don't indicate an
error. You can see that same content if you view source here -
https://demo.consul.io/ui/. Hope that helps!
-- James
On Mon, Jan 9, 2017 at 8:01 AM, Madhu M <
madhur...@gmail.com> wrote:
> Hi all,
>
> I am playing with consul and cannot get the webui to work.
>
> curl -is localhost:8500/ui/
>
> resulted in
>
> <p class="bold">HTTP error code from Consul:
> <code>{{controller.model.status}} {{controller.model.statusText}}</code></p>
> {{/if}}
> <p>This is an error page for the Consul web UI. You may have
> visited a URL that is loading an
> unknown resource, so you can try going back to the <a
> href="#">root</a>.</p>
> <p>Otherwise, please report any unexpected
> issues on the <a href="
https://github.com/hashicorp/consul">GitHub
> page</a>.</p>
> ---- SNIP
> <p>Your ACL token, <code>{{aclToken}}</code>, does not
> have the appropriate permissions to perform the expected
> action.</p>
> {{else}}
> <p>The default agent token does not
> have the appropriate permissions to perform the expected
> action.</p>
> {{/if}}
> <p>Learn more in the <a
> href="
https://www.consul.io/docs/internals/acl.html">ACL
> documentation</a>.</p>
> ---- SNIP
> <p class="bold">ACLs Disabled</p>
> <p>ACLs are disabled in this Consul cluster. This is the default
> behavior, as you have to explicitly enable them.</p>
> </p>Learn more in the <a
> href="
https://www.consul.io/docs/internals/acl.html">ACL
> documentation</a>.</p>
>
> I have added the below but i still hit the same error, appreciate if someone
> could throw light on what I am missing.
>
> vagrant@consulone:/etc/consul.d$ more *
> ::::::::::::::
> ping.json
> ::::::::::::::
> {
> "check": {
> "name": "ping",
> "script": "ping -c1
freedly.com > /dev/null 2>&1",
> "interval": "30s"
> }
> }
> ::::::::::::::
> web.json
> ::::::::::::::
> {
> "service": {
> "name": "web",
> "tags": ["nginx"],
> "port": 80,
> "enableTagOverride": false,
> "checks": [
> {
> "script": "curl localhost:80 > /dev/null 2>&1",
> "interval": "10s"
> }
> ]
> }
> }
> vagrant@consulone:/etc/consul.d$ more /var/consul/*.json
> ::::::::::::::
> /var/consul/master.json
> ::::::::::::::
> {
> "acl_datacenter":"dc1",
> "acl_master_token":"EF155A26-BDE5-4CD7-B430-AAE51F998168"
> }
> ::::::::::::::
> /var/consul/rules.json
> ::::::::::::::
> {
> "key": {
> "": {
> "policy": "read"
> }
> },
> "service": {
> "": {
> "policy": "write"
> },
> "secure-": {
> "policy": "read"
> }
> },
> "event": {
> "": {
> "policy": "write"
> },
> "destroy-": {
> "policy": "deny"
> }
> },
> "query": {
> "": {
> "policy": "read"
> }
> }
> }
>
> vagrant@consulone:~$ sudo consul agent -server -bootstrap-expect=1
> -data-dir=/var/consul -config-dir=/etc/consul.d -ui
> -node=co-dir=/home/vagrant/ui8.3.2 -ui-
> ==> WARNING: BootstrapExpect Mode is specified as 1; this is the same as
> Bootstrap mode.
> ==> WARNING: Bootstrap mode enabled! Do not enable unless necessary
> ==> Starting Consul agent...
> ==> Starting Consul agent RPC...
> ==> Consul agent running!
> Version: 'v0.7.2'
> Node name: 'consul-one'
> Datacenter: 'dc1'
> Server: true (bootstrap: true)
> Client Addr: 127.0.0.1 (HTTP: 8500, HTTPS: -1, DNS: 8600, RPC: 8400)
> Cluster Addr: 192.168.3.2 (LAN: 8301, WAN: 8302)
> Gossip encrypt: false, RPC-TLS: false, TLS-Incoming: false
> Atlas: <disabled>
>
> ==> Log data will now stream in as it occurs:
>
> 2017/01/09 14:11:24 [INFO] raft: Initial configuration (index=25):
> [{Suffrage:Voter ID:
192.168.3.2:8300 Address:
192.168.3.2:8300}
> {Suffrage:Voter ID:
192.168.3.3:8300 Address:
192.168.3.3:8300}]
> 2017/01/09 14:11:24 [INFO] serf: EventMemberJoin: consul-one 192.168.3.2
> 2017/01/09 14:11:24 [INFO] serf: EventMemberJoin: consul-one.dc1
> 192.168.3.2
> 2017/01/09 14:11:24 [INFO] raft: Node at
192.168.3.2:8300 [Follower]
> entering Follower state (Leader: "")
> 2017/01/09 14:11:24 [INFO] serf: Attempting re-join to previously known
> node: consul-two:
192.168.3.3:8301
> 2017/01/09 14:11:24 [INFO] consul: Adding LAN server consul-one (Addr:
> tcp/
192.168.3.2:8300) (DC: dc1)
> 2017/01/09 14:11:24 [WARN] serf: Failed to re-join any previously known
> node
> 2017/01/09 14:11:24 [INFO] consul: Adding WAN server consul-one.dc1
> (Addr: tcp/
192.168.3.2:8300) (DC: dc1)
> 2017/01/09 14:11:24 [WARN] serf: Failed to re-join any previously known
> node
> 2017/01/09 14:11:30 [INFO] serf: EventMemberJoin: consul-two 192.168.3.3
> 2017/01/09 14:11:30 [INFO] consul: Adding LAN server consul-two (Addr:
> tcp/
192.168.3.3:8300) (DC: dc1)
> 2017/01/09 14:11:32 [ERR] agent: failed to sync remote state: No cluster
> leader
> 2017/01/09 14:11:32 [WARN] raft: Heartbeat timeout from "" reached,
> starting election
> 2017/01/09 14:11:32 [INFO] raft: Node at
192.168.3.2:8300 [Candidate]
> entering Candidate state in term 9
> 2017/01/09 14:11:32 [INFO] raft: Election won. Tally: 2
> 2017/01/09 14:11:32 [INFO] raft: Node at
192.168.3.2:8300 [Leader]
> entering Leader state
> 2017/01/09 14:11:32 [INFO] raft: Added peer
192.168.3.3:8300, starting
> replication
> 2017/01/09 14:11:32 [INFO] consul: cluster leadership acquired
> 2017/01/09 14:11:32 [INFO] consul: New leader elected: consul-one
> 2017/01/09 14:11:32 [INFO] raft: pipelining replication to peer {Voter
>
192.168.3.3:8300 192.168.3.3:8300}
>
> 2017/01/09 14:11:33 [INFO] agent: Synced check 'ping'
> 2017/01/09 14:11:48 [INFO] agent: Synced check 'ping'
> 2017/01/09 14:12:05 [INFO] agent.rpc: Accepted client:
127.0.0.1:39522
>
> vagrant@consulone:/etc/consul.d$ consul members
> Node Address Status Type Build Protocol DC
> consul-one
192.168.3.2:8301 alive server 0.7.2 2 dc1
> consul-two
192.168.3.3:8301 alive server 0.7.2 2 dc1
> vagrant@consulone:/etc/consul.d$
> vagrant@consulone:/etc/consul.d$ curl
>
http://localhost:8500/v1/health/state/fail | python -mjson.tool
> % Total % Received % Xferd Average Speed Time Time Time
> Current
> Dload Upload Total Spent Left
> Speed
> 100 2 100 2 0 0 158 0 --:--:-- --:--:-- --:--:--
> 166
> []
> vagrant@consulone:/etc/consul.d$ curl
>
http://localhost:8500/v1/health/state/critical
> []vagrant@consulone:/etc/consul.d$ curl
>
http://localhost:8500/v1/health/state/passing
> [{"Node":"consul-one","CheckID":"ping","Name":"ping","Status":"passing","Notes":"","Output":"","ServiceID":"","ServiceName":"","CreateIndex":7,"ModifyIndex":1024},{"Node":"consul-one","CheckID":"serfHealth","Name":"Serf
> Health Status","Status":"passing","Notes":"","Output":"Agent alive and
> reachable","ServiceID":"","ServiceName":"","CreateIndex":4,"ModifyIndex":4},{"Node":"consul-one","CheckID":"service:web","Name":"Service
> 'web'
> check","Status":"passing","Notes":"","Output":"","ServiceID":"web","ServiceName":"web","CreateIndex":6,"ModifyIndex":6},{"Node":"consul-two","CheckID":"ping","Name":"ping","Status":"passing","Notes":"","Output":"","ServiceID":"","ServiceName":"","CreateIndex":29,"ModifyIndex":1023},{"Node":"consul-two","CheckID":"serfHealth","Name":"Serf
> Health Status","Status":"passing","Notes":"","Output":"Agent alive and
> reachable","ServiceID":"","ServiceName":"","CreateIndex":26,"ModifyIndex":26},{"Node":"consul-two","CheckID":"service:web","Name":"Service
> 'web'
> check","Status":"passing","Notes":"","Output":"","ServiceID":"web","ServiceName":"web","CreateIndex":28,"ModifyIndex":28}]vagrant@consulone:/etc/consul.d$
>
>
> Thanks
> Madhu
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
>
https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues:
https://github.com/hashicorp/consul/issues
> IRC: #consul on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Consul" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
consul-tool...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/consul-tool/9e4f71ec-984a-491b-8a9f-387f47444767%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.