As the environment is behind a proxy server so I set it up using the web UI, but the system can’t find any updates and no plugins (including official ones) can be found for installations.
First of all, I’ve seen similar reports that proxy settings in the web ui under ‘network-global configuration-http proxy’ don’t work in anyway. And my experience is the same.
So I google searched and chat with aibot for me to setup system proxy in truenas. So far I’ve tried editing:
/etc/pkg/freebsd.conf
/usr/local/etc/pkg.conf
/etc/rc.conf
/etc/csh.cshrc
/etc/profile
In command line interface update worked for a session but after reboot it fails again.
So far the only way that works consistently is in the CLI I issue in the following format:
https_proxy=http://serverip:port freenas-update check
Here’s the full output without explicitly providing the proxy:
[freenasOS.Configuration:606] TryGetNetworkFile(['https://update-master.ixsystems.com/TrueNAS/TrueNAS-13.0-STABLE/LATEST'])
[urllib3.connectionpool:971] Starting new HTTPS connection (1): update-master.ixsystems.com:443
[freenasOS.Configuration:695] Unable to load https://update-master.ixsystems.com/TrueNAS/TrueNAS-13.0-STABLE/LATEST: HTTPSConnectionPool(host='update-master.ixsystems.com', port=443): Read timed out. (read timeout=10)
[freenasOS.Configuration:709] Unable to load ['https://update-master.ixsystems.com/TrueNAS/TrueNAS-13.0-STABLE/LATEST']: HTTPSConnectionPool(host='update-master.ixsystems.com', port=443): Read timed out. (read timeout=10)
[freenas-update:195] HTTPSConnectionPool(host='update-master.ixsystems.com', port=443): Read timed out. (read timeout=10)
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 416, in connect
self.sock = ssl_wrap_socket(
File "/usr/local/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "/usr/local/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/local/lib/python3.9/ssl.py", line 501, in wrap_socket
return self.sslsocket_class._create(
File "/usr/local/lib/python3.9/ssl.py", line 1041, in _create
self.do_handshake()
File "/usr/local/lib/python3.9/ssl.py", line 1310, in do_handshake
self._sslobj.do_handshake()
socket.timeout: _ssl.c:1117: The handshake operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.9/site-packages/urllib3/packages/six.py", line 770, in reraise
raise value
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 385, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='update-master.ixsystems.com', port=443): Read timed out. (read timeout=10)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/freenas-update", line 169, in DoDownload
rv = Update.DownloadUpdate(train, cache_dir, pkg_type=pkg_type, ignore_space=ignore_space)
File "/usr/local/lib/freenasOS/Update.py", line 969, in DownloadUpdate
latest_mani = conf.FindLatestManifest(train, require_signature=True)
File "/usr/local/lib/freenasOS/Configuration.py", line 1103, in FindLatestManifest
mani_file = self.TryGetNetworkFile(url="%s/%s/LATEST" % (self.UpdateServerMaster(), train),
File "/usr/local/lib/freenasOS/Configuration.py", line 710, in TryGetNetworkFile
raise url_exc
File "/usr/local/lib/freenasOS/Configuration.py", line 673, in TryGetNetworkFile
furl = requests.get(url, timeout=10, verify=DEFAULT_CA_FILE,
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='update-master.ixsystems.com', port=443): Read timed out. (read timeout=10)
Received exception during download phase, cannot update