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

Visualizer not showing up nodes #3

Closed
ajeetraina opened this issue Jun 26, 2016 · 34 comments
Closed

Visualizer not showing up nodes #3

ajeetraina opened this issue Jun 26, 2016 · 34 comments

Comments

@ajeetraina
Copy link

I have 1 master node and 3 worker node. I have started the container as shown below:

root@test-master1:# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS
PORTS NAMES
5e71e28bb451 manomarks/visualizer "npm start" 4 minutes ago Up 4 minutes
0.0.0.0:5000->5000/tcp, 8080/tcp dreamy_colden
522701d5e817 ajeetraina/nagios-docker:latest "/usr/bin/supervisord" 49 minutes ago Up 49 minutes
25/tcp, 80/tcp collabnix.4.5o64dlt55dh4o0w9ssczlg9ks
f193c0a406cd ajeetraina/nagios-docker:latest "/usr/bin/supervisord" 49 minutes ago Up 49 minutes
25/tcp, 80/tcp collabnix.3.augcoqggdb65aynl40k897k9f
root@test-master1:
#

But the http://104.196.21.223:5000/ turns up just a visualizer without any node being shown.
The logs too looks okay as shown below

root@test-master1:~# docker logs --details dreamy_colden
npm info it worked if it ends with ok
npm info using npm@2.14.4
npm info using node@v4.1.2
npm info prestart tutumVisualizer@0.0.1
npm info start tutumVisualizer@0.0.1

tutumVisualizer@0.0.1 start /app
node server.js

Anything I am missing out??

@ivansieder-xx
Copy link

Hi @ajeetraina, could you please also provide the following information? That way, I could maybe help you:

  • Which OS are you running docker on?
  • Did you start the visualizer on the master node or somewhere else?
  • Which command exactly did you use? As for the moment it looks to me, that you might have forgotten the -e PORT=5000 in your command.

@ajeetraina
Copy link
Author

ajeetraina commented Jun 26, 2016

This is Ubuntu 16.04 LTS running on Google Cloud Platform.

root@test-master1:# cat /etc/issue
Ubuntu 16.04 LTS \n \l
root@test-master1:
#

Yes, I started it on the master node.

root@test-master1:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORT
S NAMES
02a472cf983e redis:latest "docker-entrypoint.sh" 6 minutes ago Up 6 minutes 6379
/tcp redis.1.e0e4iw1l09hmhfat9wmgd8ni4
5e71e28bb451 manomarks/visualizer "npm start" 57 minutes ago Up 57 minutes 0.0.
0.0:5000->5000/tcp, 8080/tcp dreamy_colden

I used the below command:

#docker run -it -d -p 5000:5000 -e HOST=localhost -e PORT=5000 -v /var/run/docker.sock:/var/run/docker.soc
k manomarks/visualizer

Just to keep you informed that I have 1.12rc2 running which I setup through the below command:

$curl -sSL https://test.docker.com/ | sh

@ivansieder-xx
Copy link

I suppose, you already have executed the following commands?
docker swarm init on the master node to initialize the swarm
docker swarm join [HOST:PORT] on the workers to join the swarm as worker nodes?

Do you see the nodes listed with the following command?: docker node ls

@ajeetraina
Copy link
Author

Yes, my swarm cluster is already up and running:

#docker node ls
ID NAME MEMBERSHIP STATUS AVAILABILITY MANAGER STATUS
cngggqk8ta7wbq186at8hslpk * test-master1 Accepted Ready Active Leader
d2xkdj1k0mc81v86xguqiztu3 test-node1 Accepted Ready Active
eip451pkmakzdcdc0e4o73436 test-node2 Accepted Ready Active
root@test-master1:~#

@ivansieder-xx
Copy link

ivansieder-xx commented Jun 26, 2016

Okay, I think I figured out the issue. The requests seem to be made client-side, so if you use localhost as -e HOST, it wont't work. Try to change -e HOST=localhost to -e HOST=104.196.21.223 when you start your visualizer-container (this solved the issue for me)

@ajeetraina
Copy link
Author

That still doesnt work for me. 104.196.21.223 is public IP whereas 10.142.0.6 is the internal Ip as shown in Google Cloud. Not sure if internal Vs external IP is creating problem. I will test it in my internal lab.

@ajeetraina
Copy link
Author

Interestingly, I can access the visualizer and it just shows up whale but no nodes :)

@ivansieder-xx
Copy link

Okay so in that case I would say it's an issue on how your cluster is configured. As i have tested it with 3 VPS on OVH.com, connected them through their public IP and set the HOST environment variable to the public IP of the VPS. That worked flawlessly for me.

104.196.21.223 is the public one and has also been used for the HOST environment variable. right?

@wraithfive
Copy link

for myself I had to use the hostname of the manager and not the IP or localhost and then the nodes showed up.

@ivansieder-xx
Copy link

@wraithfive Did you also try it on Google's Cloud? As for me (VPS at OVH.com) it worked by using the public IP or the hostname. Have you already tried to use the public IP of your master for the HOST-environment variable?

@wraithfive
Copy link

@ivansieder I'm in an internal environment with VM's only. No public IP, only private IPs and host names.

@IcaroBichir
Copy link
Contributor

IcaroBichir commented Jun 29, 2016

I was having the same problem, just a blue screen without the nodes.
But running the docker with hostname, as @wraithfive said, works great.

My case:

docker run -it -d -p 5000:5000 -e HOST=node1 -e PORT=5000 -v /var/run/docker.sock:/var/run/docker.sock manomarks/visualizer

On your case, you need to run docker run -it -d -p 5000:5000 -e HOST=test-master1 -e PORT=5000 -v /var/run/docker.sock:/var/run/docker.sock manomarks/visualizer

@ajeetraina
Copy link
Author

I tried in my local virtual box but the same problem. The nodes doesn't
show up while the visualise UI is accessible.

Under Google Cloud, the master node is at 10.140.0.2 while the public IP is
at different IP. Even if I try DOCKER_HOST environment variable it won't
accept the public IP as inside OS instance, it wont understand the public
IP accessible from outside.

Will try hostname instead to see if it works.
On 29 Jun 2016 08:13, "Ícaro Bichir" notifications@github.com wrote:

I was having the same problem, just a blue screen without the nodes.
But running the docker with hostname, as @wraithfive
https://github.com/wraithfive said, works great.

My case:

run -it -d -p 5000:5000 -e HOST=node1 -e PORT=5000 -v
/var/run/docker.sock:/var/run/docker.sock manomarks/visualizer


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#3 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AATIiNzt43rs_1fSN4CNJ3ghS6eLNU4Yks5qQdvdgaJpZM4I-j_M
.

@ajeetraina
Copy link
Author

@icaro, let me try your suggestion.

@chadlung
Copy link

I'm seeing the same issue as well. Doing this on Vagrant (1 manager node, 2 worker nodes). I also tried using the hostname as suggested earlier in this thread but that didn't work for me - I still just get the blank Visualizer UI with no content.

@ManoMarks
Copy link
Contributor

Btw I'm on vacation right now without a computer so I won't be really able to look at this until mid July.

Some troubleshooting ideas: make sure you have 1.12 installed
Try curling the daemon Unix socket and see if anything turns up. That's how the visualizer is powered. Check Chrome developer tools for errors that might help you track it down.

@chadlung
Copy link

Playing around a bit more I did get this working. The hostname solution did not work for me, but using the manager's IP worked (using Vagrant).

@ajeetraina
Copy link
Author

I am too seeing the same issue. Tried on one of ESXi VM infrastructure and virtual box the blank visualizer turns up. Neither hostname nor IP helped me with nodes display.

@bzon
Copy link

bzon commented Jul 3, 2016

Trying this out on AWS EC2 using the latest Ubuntu version. The visualizer doesn't seem to display the nodes as well. I just installed the engine from https://test.docker.com.

From the Manager node, I did the following:

docker run -it -d -p 8080:8080 -e HOST=ip-10-10-1-180 -v /var/run/docker.sock:/var/run/docker.sock manomarks/visualizer

^ I tried the public ip and public hostname as well.

docker swarm init --listen-addr 10.10.1.180:2377

From the Worker node, I did the following:

docker swarm join 10.10.1.180:2377

@ivansieder-xx
Copy link

have you tried, if you can ping the master from your nodes with the hostname?

@IcaroBichir
Copy link
Contributor

@bzon

  • When you start the swarm, this node appears on the visualizer?
    • if not, you try to set the HOST with this node-master hostname
  • What is the output of docker node ls on the node-master?

@federico-garcia
Copy link

federico-garcia commented Jul 8, 2016

I ran into the same issue using vagrant + centos7 + docker v1.12. Nothing recommended above worked.

I tried on Docker for mac and it worked, running the same command.

@ManoMarks
Copy link
Contributor

ManoMarks commented Jul 13, 2016

The easiest way for me to debug this is to use Chrome dev tools. Or whatever JS debugging tool you use. The app console logs a lot of errors which can help out.

You can see in the attached an image of a functioning app and an image of a not functioning one and some of the errors you get like
client.js:960 GET http://http//192.168.99.100:8080/apis/nodes net::ERR_NAME_NOT_RESOLVEDh.end @ client.js:960e @ index.js:3095(anonymous function) @ request.js:9i @ request.js:9a @ request.js:13f @ request.js:67v @ request.js:97value @ data-provider.js:209a @ main.js:46 client.js:960 GET http://http//192.168.99.100:8080/apis/tasks net::ERR_NAME_NOT_RESOLVEDh.end @ client.js:960e @ index.js:3095(anonymous function) @ request.js:9i @ request.js:9a @ request.js:13f @ request.js:67m @ request.js:89value @ data-provider.js:210a @ main.js:46

screen shot 2016-07-13 at 9 10 57 am
screen shot 2016-07-13 at 9 10 10 am

@julienstroheker
Copy link

FYI I had the same issue, I just insert the FQDN of my machine and works fine :
docker run -it -d -p 5000:5000 -e HOST=mymachineX.eastus.cloudapp.azure.com -e PORT=5000 -v /var/run/docker.sock:/var/run/docker.sock manomarks/visualizer

@ManoMarks
Copy link
Contributor

@ TheLaxtSamurai, @ajeetraina were you able to get it working?

@ManoMarks
Copy link
Contributor

#7 might also be relevant

@bzon
Copy link

bzon commented Jul 30, 2016

@IcaroBichir @ManoMarks It now works for me.. I'm using an AWS EC2 Centos7 cluster here.

PUBLIC_HOSTNAME=$(curl http://169.254.169.254/latest/meta-data/public-hostname)
docker run -it -d -p 5000:5000 -e HOST=${PUBLIC_HOSTNAME} -e PORT=5000 -v /var/run/docker.sock:/var/run/docker.sock manomarks/visualizer

@ManoMarks
Copy link
Contributor

I'm going to close this issue assuming it's been fixed. Reopen if you are still encountering.

@callmepjs
Copy link

Ran into the same issue (blank visualizer). Enabling CORS in the browser fixed it for me.

@lordjea
Copy link

lordjea commented Sep 22, 2016

Hi, I'm getting the same issue
My environment is:
A host with docker and two containers running: swarm manager and visualizer

I got the felling about the Volumes, may be is needed to share /var/run/docker.sock from de swarm container to host and then from the host to visualizer container

One master, 3 nodes
Master started with:
command: "manage -H 0.0.0.0:4000 --strategy 'spread' --replication --advertise xx.xx.xx.xz:4000 consul://xx.xx.xx.xy:8500"

any idea?

@ManoMarks
Copy link
Contributor

@lordjea This only works with Swarm Mode in Docker Engine 1.12, not the separate Docker Swarm project

@DougEwalker
Copy link

Hi, I had the same thing. Whale logo, but no nodes.

My simple resolution was to switch from viewing the status page in IE, and use Firefox instead.

Bingo, manager + 2 x worker nodes.

Hope this helps.

@vikasksrivastava
Copy link

I had the same issue , fixed by disabling selinux .

@cecchisandrone
Copy link

In my case, watching at REST calls, the problem was due to the fact the visualizer container was not deployed on a swarm manager. Promoting other nodes to managers made it work.

@dockersamples dockersamples locked as resolved and limited conversation to collaborators Feb 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests