FreeNAS 11.1 Rancher Server installation failed

Status
Not open for further replies.

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
Hello
i have followed the http://doc.freenas.org/11/vms.html#installing-the-rancher-server
and have a problem with the command
Code:
Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid

so i did a
Code:
sudo rm /var/run/docker.pid
sudo dockerd
INFO[0000] libcontainerd: previous instance of containerd still alive (967)
INFO[0000] [graphdriver] using prior storage driver: overlay
ERRO[0002] Error during layer Store.Cleanup(): device or resource busy
Error starting daemon: error while opening volume store metadata database: timeout

so the command
Code:
sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

so what should I do next?
 
Last edited by a moderator:

Yusuf Limalia

Patron
Joined
Apr 5, 2016
Messages
234
Hello
i have followed the http://doc.freenas.org/11/vms.html#installing-the-rancher-server
and have a problem with the command
sudo dockerd
Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid
so i did a
sudo rm /var/run/docker.pid
sudo dockerd
Code:
INFO[0000] libcontainerd: previous instance of containerd still alive (967)
INFO[0000] [graphdriver] using prior storage driver: overlay
ERRO[0002] Error during layer Store.Cleanup(): device or resource busy
Error starting daemon: error while opening volume store metadata database: timeout

so the command

sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server

Code:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

so what should i do next?

Setup a root password (this will be temporary as I think it gets reset on reboot of the guest)

sudo passwd su

You will be promoted to enter a new root password

Get to the root account by typing
su

Run the original command again. What happens?
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Why are executing "sudo dockerd" ? Do you know what it does? It's not mentioned anywhere in the FreeNAS docs. Read the error message again, it's telling you the main docker daemon is already running. In RancherOS where the host operating system is itself made up of various containers, "dockerd" is run by one of the system containers as part of the boot sequence.

You can always see what system containers are running using "sudo system-docker ps"

e.g on rancheros running the rancher-server :
Code:
rancher@rancher:~$ sudo system-docker ps
CONTAINER ID		IMAGE							  COMMAND				  CREATED			 STATUS			  PORTS			   NAMES
193cb083c642		rancher/os-ubuntuconsole:v1.1.0	"/usr/bin/ros entrypo"   6 days ago		  Up 11 minutes						   console
93704723fe89		rancher/os-volumenetshare		  "/usr/bin/docker-volu"   7 days ago		  Up 11 minutes						   volume-nfs
3570a3ff9222		rancher/os-docker:17.03.2		  "ros user-docker"		8 days ago		  Up 11 minutes						   docker
99cd1bca6798		rancher/os-base:v1.1.0			 "/usr/bin/ros entrypo"   8 days ago		  Up 11 minutes						   ntp
8fcb7be37ac3		rancher/os-base:v1.1.0			 "/usr/bin/ros entrypo"   8 days ago		  Up 11 minutes						   network
805c3448278c		rancher/os-base:v1.1.0			 "/usr/bin/ros entrypo"   8 days ago		  Up 11 minutes						   udev
2ffe8ac9eb99		rancher/container-crontab:v0.1.0   "container-crontab"	  8 days ago		  Up 11 minutes						   system-cron
89a4a5e6a6a8		rancher/os-syslog:v1.1.0		   "/usr/bin/entrypoint."   8 days ago		  Up 11 minutes						   syslog
fe147c1dd7ad		rancher/os-acpid:v1.1.0			"/usr/bin/ros entrypo"   8 days ago		  Up 11 minutes						   acpid


Container "rancher/os-docker" runs the docker daemon and "docker -v" and/or "docker info" confirms this.

Code:
rancher@rancher:~$ docker -v
Docker version 17.03.2-ce, build f5ec1e2


So it looks like you executed an unnecessary command which was not harmful until you deleted that pid file. Restarting the system docker container might clear your problem - "sudo system-docker restart docker" , otherwise re-boot your Docker VM & check the output of "sudo system-docker". Then start the rancher-server with sudo docker etc ...

If you want to become root in rancher just use sudo -i or sudo -s - google for the difference.
 
Last edited by a moderator:

Yusuf Limalia

Patron
Joined
Apr 5, 2016
Messages
234
Why are executing "sudo dockerd" ? Do you know what is does? It's not mentioned anywhere in the freenas docs. Read the error message again, it's telling you the main docker daemon is already running. In RancherOS where the host operating system is itself made up of various containers, "dockerd" is run by one of the system containers as part of the boot sequence.

You can always see what system containers are running using "sudo system-docker ps"

e.g on rancheros running the rancher-server :
Code:
rancher@rancher:~$ sudo system-docker ps
CONTAINER ID		IMAGE							  COMMAND				  CREATED			 STATUS			  PORTS			   NAMES
193cb083c642		rancher/os-ubuntuconsole:v1.1.0	"/usr/bin/ros entrypo"   6 days ago		  Up 11 minutes						   console
93704723fe89		rancher/os-volumenetshare		  "/usr/bin/docker-volu"   7 days ago		  Up 11 minutes						   volume-nfs
3570a3ff9222		rancher/os-docker:17.03.2		  "ros user-docker"		8 days ago		  Up 11 minutes						   docker
99cd1bca6798		rancher/os-base:v1.1.0			 "/usr/bin/ros entrypo"   8 days ago		  Up 11 minutes						   ntp
8fcb7be37ac3		rancher/os-base:v1.1.0			 "/usr/bin/ros entrypo"   8 days ago		  Up 11 minutes						   network
805c3448278c		rancher/os-base:v1.1.0			 "/usr/bin/ros entrypo"   8 days ago		  Up 11 minutes						   udev
2ffe8ac9eb99		rancher/container-crontab:v0.1.0   "container-crontab"	  8 days ago		  Up 11 minutes						   system-cron
89a4a5e6a6a8		rancher/os-syslog:v1.1.0		   "/usr/bin/entrypoint."   8 days ago		  Up 11 minutes						   syslog
fe147c1dd7ad		rancher/os-acpid:v1.1.0			"/usr/bin/ros entrypo"   8 days ago		  Up 11 minutes						   acpid


Container "rancher/os-docker" runs the docker daemon and "docker -v" and/or "docker info" confirms this.

Code:
rancher@rancher:~$ docker -v
Docker version 17.03.2-ce, build f5ec1e2


So it looks like you executed an unnecessary command which was not harmful until you deleted that pid file. Restarting the system docker container might clear your problem - "sudo system-docker restart docker" , otherwise re-boot your Docker VM & check the output of "sudo system-docker". Then start the rancher-server with sudo docker etc ...

If you want to become root in rancher just use "sudo -i" or "sudo -s" - google for the difference.

Woah! Never knew about sudo -s and -i

That’s awesome
 

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
Code:
$ sudo system-docker ps
CONTAINER ID		IMAGE							  COMMAND				  CREATED			 STATUS			  PORTS			   NAMES
37af6d2656fc		rancher/os-console:v1.1.0		  "/usr/bin/ros entrypo"   8 hours ago		 Up 8 hours							  console
783bd481870d		rancher/os-docker:17.03.2		  "ros user-docker"		4 days ago		  Up 8 hours							  docker
d6436f9de4f7		rancher/os-base:v1.1.0			 "/usr/bin/ros entrypo"   4 days ago		  Up 8 hours							  ntp
9c4dd5969a0c		rancher/os-base:v1.1.0			 "/usr/bin/ros entrypo"   4 days ago		  Up 8 hours							  network
54ded1eda865		rancher/os-base:v1.1.0			 "/usr/bin/ros entrypo"   4 days ago		  Up 8 hours							  udev
ac3e987f85d3		rancher/container-crontab:v0.1.0   "container-crontab"	  4 days ago		  Up 8 hours							  system-cron
59f5a71b4d19		rancher/os-acpid:v1.1.0			"/usr/bin/ros entrypo"   4 days ago		  Up 8 hours							  acpid
368dbbafb01c		rancher/os-syslog:v1.1.0		   "/usr/bin/entrypoint."   4 days ago		  Up 8 hours							  syslog
[rancher@rancher /]$

but what is going wrong - and why this happen to my system ???
sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server
Code:
$ sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server
d3c499a3fa0b7577836bd20aa7f9486d94cd270b025cbe7726ba0c01d82ecd13
docker: Error response from daemon: driver failed programming external connectivity on endpoint romantic_jones (4e59932d2d1d7a5b397370b230593d4deafae9f827e91676987302578342669c): Bind for 0.0.0.0:8080 failed: port is already allocated.
[rancher@rancher /]$
 
Last edited by a moderator:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Happy Christmas @vikozo6

End of error messages says "Bind for 0.0.0.0:8080 failed: port is already allocated" Check what other containers are running? Something left over from a previous failed attempt to get rancher-server running? Check with command:

docker ps
 
Last edited by a moderator:

Yusuf Limalia

Patron
Joined
Apr 5, 2016
Messages
234
Happy Christmas @vikozo6

End of error messages says "Bind for 0.0.0.0:8080 failed: port is already allocated" Check what other containers are running? Something left over from a previous failed attempt to get rancher-server running? Check with command:

"docker ps"

docker ps -a

Will show all, even stopped containers

Hope you're having a good festive season @KrisBee
 

WTM

Cadet
Joined
Dec 28, 2015
Messages
5
I deleted all - and restarted creating it - and it works so far, I can reach rancher GUI also.

Is it possible to add a FIXED IP address to a VM?

What was 'deleted all' ? From the FreeNAS 11.1 GUI delete the VM itself? I did that, and also removed the already downloaded iso. Still have the same issue when completely reinstalling the VM. I get connected but there is no prompt.

I have the idea i'm not deleting it completely, because each new install does bump up the number of the vm (i.e. i'm now up to nmdm5B).

Any suggestions?

/edit:

Never mind: I have somehow figured it out. A reboot of FreeNAS helped (first delete the VM and the iso). Somehow it worked now... :)
 
Last edited by a moderator:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288

codybarr

Cadet
Joined
Apr 6, 2018
Messages
1
Yes you would, but the OP included an img file as his screen pic shows. The other thing the OP should check is that the rancheros img has downloaded correctly. It should reside in a hidden folder, e.g. :

Code:
root@freenas:/ # ll  /mnt/NasPool/.bhyve_containers/iso_files	
total 45861
-rw-r--r--  1 root  wheel  49363679 Dec 14 11:51 rancheros-bhyve-v1.1.0.img.gz

I was also getting hung at the 'Connected' prompt. And this turned out to be my issue as well. I ended up having to wget the rancheros-bhyve img manually since I kept getting an error when trying to download through the GUI.

Was able to start the VM after and connect successfully to finish the rest of the guide. TYVM!
 

Attachments

  • Screen Shot 2018-04-06 at 10.58.32 AM.png
    Screen Shot 2018-04-06 at 10.58.32 AM.png
    61 KB · Views: 519
Status
Not open for further replies.
Top