[HowTo] FreeNAS 11.1 + RancherOS + Docker + RancherUI + PLEX

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
@Varun Chugh - Hello, the Post you write I did start it ;-) -
But still i have the Problem on Post #18 with this certificate.
 

Varun Chugh

Dabbler
Joined
Dec 15, 2015
Messages
38
@Varun Chugh - Hello, the Post you write I did start it ;-) -
But still i have the Problem on Post #18 with this certificate.
yeah, that helped! thanks :) any idea into the no space left issue? See attached screenshot.
 

Attachments

  • Screen Shot 2017-12-22 at 3.48.36 PM.png
    Screen Shot 2017-12-22 at 3.48.36 PM.png
    335.4 KB · Views: 447

shortbus

Dabbler
Joined
Jan 4, 2016
Messages
15
I can get the rancherui.img installed and logged in.. I get all the way through the container part. I don't have cifs or nf, just a test container. When i reboot rancherui vm - all my settings are gone and I am back to step 2, setting everything up again. How do I get things to stay after reboot?
 

Yusuf Limalia

Patron
Joined
Apr 5, 2016
Messages
234
I did get past this. Now I am stuck at 'no space left on disk'. But I have GBs of space on the disk. Any idea? Sorry for the trouble. all attached the screenshot.

Did you set your VMs disk size to 20G? I had this error when I didn’t do that. This step is in the official docs/ step 1 of my tutorial

30950493-D234-40BD-B005-76F01CC75D3F.jpeg
 
Last edited:

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
hello yusuf
step 4 add a host - i still got this (the only point which is strange, they ask to add a public IP) but on yusuf's information a Privat IP is written.
any help?

Code:
[rancher@rancher ~]$ sudo docker run -e CATTLE_HOST_LABELS='host4='  --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.7 https://10.147.42.130:8080/v1/scripts/49F7E6AE249F00566EB6:1483142400000:uowA1LfGFxULopYkFMVTlYdEko
6
INFO: Running Agent Registration Process, CATTLE_URL=https://10.147.42.130:8080/v1
INFO: Attempting to connect to: https://10.147.42.130:8080/v1
ERROR: https://10.147.42.130:8080/v1 is not accessible (server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none)
ERROR: https://10.147.42.130:8080/v1 is not accessible (server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none)
 

Yusuf Limalia

Patron
Joined
Apr 5, 2016
Messages
234
hello yusuf
step 4 add a host - i still got this (the only point which is strange, they ask to add a public IP) but on yusuf's information a Privat IP is written.
any help?

Code:
[rancher@rancher ~]$ sudo docker run -e CATTLE_HOST_LABELS='host4='  --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.7 https://10.147.42.130:8080/v1/scripts/49F7E6AE249F00566EB6:1483142400000:uowA1LfGFxULopYkFMVTlYdEko
6
INFO: Running Agent Registration Process, CATTLE_URL=https://10.147.42.130:8080/v1
INFO: Attempting to connect to: https://10.147.42.130:8080/v1
ERROR: https://10.147.42.130:8080/v1 is not accessible (server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none)
ERROR: https://10.147.42.130:8080/v1 is not accessible (server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none)

I think they're calling it Public because of the other available platforms that you can deploy some cattle. ie:
upload_2017-12-23_10-19-29.png


If you had your Rancher Host on EC2 etc. you would need it's public IP. In our FreeNAS case the Host is not sitting on any cloud instances. Hope that makes sense.

What is the IP of your host?

If you run:

ifconfig

What output do you get?
 

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
@Yusuf Limalia
you will be busy over christmas i belive ;-)

Code:
[rancher@rancher ~]$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=56 time=14.642 ms
64 bytes from 8.8.8.8: seq=1 ttl=56 time=14.543 ms
64 bytes from 8.8.8.8: seq=2 ttl=56 time=14.459 ms
64 bytes from 8.8.8.8: seq=3 ttl=56 time=14.409 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 14.409/14.513/14.642 ms
[rancher@rancher ~]$ ifconfig eth0 | grep 'inet addr'
		  inet addr:10.147.42.130  Bcast:0.0.0.0  Mask:255.255.255.0

as you could see to ping 8.8.8.8 works fine.
 

Yusuf Limalia

Patron
Joined
Apr 5, 2016
Messages
234
@Yusuf Limalia
you will be busy over christmas i belive ;-)

Code:
[rancher@rancher ~]$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=56 time=14.642 ms
64 bytes from 8.8.8.8: seq=1 ttl=56 time=14.543 ms
64 bytes from 8.8.8.8: seq=2 ttl=56 time=14.459 ms
64 bytes from 8.8.8.8: seq=3 ttl=56 time=14.409 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 14.409/14.513/14.642 ms
[rancher@rancher ~]$ ifconfig eth0 | grep 'inet addr'
		  inet addr:10.147.42.130  Bcast:0.0.0.0  Mask:255.255.255.0

as you could see to ping 8.8.8.8 works fine.
Might be an authentication issue.

What access control have you got setup?
If you remove access control in the rancherui can you then run the same command?
 

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
Might be an authentication issue.

What access control have you got setup? :confused:
If you remove access control in the rancherui can you then run the same command?
how to remove this access control ?
 

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
i found out my Problem with the certifigate was because of the https and the IP address.
But it went a bit furder but still errors

Code:
INFO: Running Agent Registration Process, CATTLE_URL=http://10.147.42.130:8080/v1
INFO: Attempting to connect to: http://10.147.42.130:8080/v1
INFO: http://10.147.42.130:8080/v1 is accessible
INFO: Inspecting host capabilities
INFO: Boot2Docker: false
INFO: Host writable: true
INFO: Token: xxxxxxxx
INFO: Running registration
Traceback (most recent call last):
  File "./register.py", line 11, in <module>
	secret_key=os.environ['CATTLE_REGISTRATION_SECRET_KEY'])
  File "/usr/local/lib/python2.7/dist-packages/cattle.py", line 45, in from_env
	return gdapi.from_env(prefix=prefix, factory=Client, **kw)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 613, in from_env
	return _from_env(prefix=prefix, factory=factory, **args)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 632, in _from_env
	return factory(**result)
  File "/usr/local/lib/python2.7/dist-packages/cattle.py", line 12, in __init__
	super(Client, self).__init__(*args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 197, in __init__
	self._load_schemas()
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 315, in _load_schemas
	response = self._get_response(self._url)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 264, in _get_response
	headers=self._headers)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 501, in get
	return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request
	resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send
	r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 497, in send
	raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
 

Yusuf Limalia

Patron
Joined
Apr 5, 2016
Messages
234
i found out my Problem with the certifigate was because of the https and the IP address.
But it went a bit furder but still errors

Code:
INFO: Running Agent Registration Process, CATTLE_URL=http://10.147.42.130:8080/v1
INFO: Attempting to connect to: http://10.147.42.130:8080/v1
INFO: http://10.147.42.130:8080/v1 is accessible
INFO: Inspecting host capabilities
INFO: Boot2Docker: false
INFO: Host writable: true
INFO: Token: xxxxxxxx
INFO: Running registration
Traceback (most recent call last):
  File "./register.py", line 11, in <module>
	secret_key=os.environ['CATTLE_REGISTRATION_SECRET_KEY'])
  File "/usr/local/lib/python2.7/dist-packages/cattle.py", line 45, in from_env
	return gdapi.from_env(prefix=prefix, factory=Client, **kw)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 613, in from_env
	return _from_env(prefix=prefix, factory=factory, **args)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 632, in _from_env
	return factory(**result)
  File "/usr/local/lib/python2.7/dist-packages/cattle.py", line 12, in __init__
	super(Client, self).__init__(*args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 197, in __init__
	self._load_schemas()
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 315, in _load_schemas
	response = self._get_response(self._url)
  File "/usr/local/lib/python2.7/dist-packages/gdapi.py", line 264, in _get_response
	headers=self._headers)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 501, in get
	return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 488, in request
	resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 609, in send
	r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 497, in send
	raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
Did you try removing the access control and then adding the host?
 

vikozo6

Patron
Joined
Oct 16, 2015
Messages
290
yes i did - and followed your step 2, too
 

cbrherms

Dabbler
Joined
Jan 23, 2016
Messages
10
@Yusuf Limalia
Many thanks for this!

I had a go at trying rancher to start off with and initially thought it might be a bit too overly complicated for my needs so set up portainer as my front end.

I've now got everything set up, and all my containers i had on Corral are up and running but i've found a couple of shortfalls in portainer such as setting a container to get its ip address from dhcp, setting static MAC addresses, and a few other things so looks like i'll give rancher another shot and see where i get!
 

bodriye

Explorer
Joined
Mar 27, 2016
Messages
82
I appreciate the effort but I would set plex net=host to get it working properly
 

Yusuf Limalia

Patron
Joined
Apr 5, 2016
Messages
234
I appreciate the effort but I would set plex net=host to get it working properly
Good shout.

While you can use bridge, PLEX documentation recommends host.
I've updated the tutorial to use host networking.
 
Last edited:

Ascotg

Dabbler
Joined
Sep 26, 2016
Messages
19
Just sharing some of the problems I ran into and how I fixed them:

- I had trouble fixing a host, because at every reboot the IP address changed. So for my VM I set up the NIC (device) with a fixed MAC address, this way my router always gave it the same IP. Later, I even asked my router to fix the IP and make it static. Fixing a host was easy after this.

- For getting my shares to work I had some trouble with the character set. Namely, I had changed that to ASCII, instead of UTF-8. Make sure to write ascii (not in capitals) as it won't work otherwise.

Thanks for the guide, it's been a huge help!
 

Yusuf Limalia

Patron
Joined
Apr 5, 2016
Messages
234
Just sharing some of the problems I ran into and how I fixed them:

- I had trouble fixing a host, because at every reboot the IP address changed. So for my VM I set up the NIC (device) with a fixed MAC address, this way my router always gave it the same IP. Later, I even asked my router to fix the IP and make it static. Fixing a host was easy after this.

- For getting my shares to work I had some trouble with the character set. Namely, I had changed that to ASCII, instead of UTF-8. Make sure to write ascii (not in capitals) as it won't work otherwise.

Thanks for the guide, it's been a huge help!

Awesome. Thanks for sharing :)
 

IZON

Cadet
Joined
Apr 17, 2016
Messages
4
for some reason I need to redo sudo ros config merge -i mount.yaml
every reboot of VM.
And also I also need to restart PLEX container manually from Rancher web. Any Idea why?
 
Top