danb35/deploy-freenas

Deploy_Freenas not setting the certificate.

veldthui opened this issue · 1 comments

Hi, I have this working under Freenas okay with no issue. I have just tried to add it to another machine which is running the latest version of TrueNas and am having a problem. Tried using the API key and Password methods and both end up the same. The certificate is copied to the store okay and is available under certificates but the script will not set the certificate to be the current one in use.
These errors below appear after a long delay. I tried pinging 192.168.100.15 and it does not get a reply even though that is the correct address. It is set up exactly the same on both machines but one is FreeNas and the other TrueNas

Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line426, in _make_request
six.raise_from(e, None)
File "", line 3, in raise_from
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line421, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.7/http/client.py", line 1369, in getresponse
response.begin()
File "/usr/local/lib/python3.7/http/client.py", line 310, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.7/http/client.py", line 271, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/local/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
TimeoutError: [Errno 60] Operation timed out

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449,in send
timeout=timeout
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line727, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 410, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.7/site-packages/urllib3/packages/six.py", line 735, in reraise
raise value
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line677, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line428, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line353, in _raise_timeout
self, url, "Read timed out. (read timeout=%s)" % timeout_value
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='192.168.100.15', port=80): Read timed out. (read timeout=None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./deploy_freenas.py", line 92, in
"privatekey": priv_key,
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 581,in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533,in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646,in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 529,in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.100.15', port=80): Read timed out. (read timeout=None)

Okay based on the fact that I could not ping the Truenas host I created another jail with the same details and it can ping the host. I proceeded to install everything and it all works fine. Seems for some reason the first jail is corrupt in some way.