After upgraded 12.0 -U1.1, Automatic update check failed

jcnas

Cadet
Joined
Jan 16, 2021
Messages
3
Yesterday I upgraded to latest 12.0 U-1.1, when I click check upgrade again. keep getting this:
1610825621068.png


my server is able to reach out internet.

root@nas[~]# ping google.ca
PING google.ca (172.217.164.195): 56 data bytes
64 bytes from 172.217.164.195: icmp_seq=0 ttl=111 time=27.502 ms
64 bytes from 172.217.164.195: icmp_seq=1 ttl=111 time=25.531 ms
^C
--- google.ca ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 25.531/26.517/27.502/0.985 ms
root@nas[~]#
root@nas[~]# curl http://update-stats.freenas.org/
<script language="javascript">
window.location.href = "http://update-stats.freenas.org/"

is there anyway to fix this problem?
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,448
I've checked a couple systems here, and it seems to be working. What is curious is that you don't seem to have a train selected there. Can you check with a fresh / private browser window to make sure its not a local browser cache issue?
 

jcnas

Cadet
Joined
Jan 16, 2021
Messages
3
I tried private window and other machines, but always the same. Before I upgraded from 11.3 U5 to 12.0 U1.1, once I click the "refresh" button, i can see the train. Since upgraded to 12.0 U1.1, every time I click "refresh" button, it shows that message.
is there a way to see some detail info??
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,448
@jcnas - Looking at this I'm thinking its an issue with your default Train being missing or mis-configured. Please open a ticket on jira.ixsystems.com and we'll investigate further and see if we can give you a CLI command to reset it as well.

Thanks!
 

Astrodonkey

Explorer
Joined
Jul 18, 2017
Messages
72
99% of the time it's a DNS issue.

That doesn't seem to be the case; network connectivity is fine. My WebUI is that same as OP: nothing is displayed for "Current train". I have also tried clearing the browser cache.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
What does midclt call update.get_trains | jq show? If it doesn't show TrueNAS-12.0-STABLE as the current train, then run midclt call update.set_train TrueNAS-12.0-STABLE.
 

Astrodonkey

Explorer
Joined
Jul 18, 2017
Messages
72
Looks like a timeout...

Code:
root@truenas:/nonexistent # midclt call update.get_trains | jq
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/update_/trains.py", line 17, in get_scale_trains_data
    trains = await (await session.get(f"{scale_update_server()}/trains.json")).json()
  File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 480, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 523, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 858, in _create_connection
    _, proto = await self._create_direct_connection(
  File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 964, in _create_direct_connection
    hosts = await asyncio.shield(self._resolve_host(
asyncio.exceptions.CancelledError


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 137, in call_method
    result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self,
  File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1206, in _call
    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
  File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1110, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/schema.py", line 977, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/update.py", line 124, in get_trains
    trains_data = self.middleware.call_sync('update.get_trains_data')
  File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1262, in call_sync
    return self.run_coroutine(self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args))
  File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1294, in run_coroutine
    return fut.result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1110, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
  File "/usr/local/lib/python3.8/site-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/update_/trains_freebsd.py", line 119, in get_trains_data
    scale_trains = self.middleware.call_sync('update.get_scale_trains_data')
  File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1254, in call_sync
    return self.run_coroutine(methodobj(*prepared_call.args))
  File "/usr/local/lib/python3.8/site-packages/middlewared/main.py", line 1294, in run_coroutine
    return fut.result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.8/site-packages/middlewared/plugins/update_/trains.py", line 17, in get_scale_trains_data
    trains = await (await session.get(f"{scale_update_server()}/trains.json")).json()
  File "/usr/local/lib/python3.8/site-packages/async_timeout/__init__.py", line 55, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.8/site-packages/async_timeout/__init__.py", line 92, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
Ugh. Looks like your middleware has partially crashed. Try rebooting, and then running the midclt query again.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
No, it looks like you have a corrupt installation.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
What's your install media? If it's a thumb drive, those are no longer recommended since they can silently corrupt and result in all sorts of strange behavior. Current best practice is either a SATA DOM or a small SSD.
 

Astrodonkey

Explorer
Joined
Jul 18, 2017
Messages
72
What's your install media? If it's a thumb drive, those are no longer recommended since they can silently corrupt and result in all sorts of strange behavior. Current best practice is either a SATA DOM or a small SSD.

It is a thumb drive indeed.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,398
Changing to a small SSD won't be expensive.


This is a 32 GB M.2 SATA SSD for ~$12.


This is a USB3.0 enclosure for the M.2 SATA SSD for ~$20.

I run a setup like this myself after I got tired of thumb drives constantly going south on me. The SSDs are also a lot faster than the thumb drives, and have much greater endurance.
 

Astrodonkey

Explorer
Joined
Jul 18, 2017
Messages
72
Sounds good, I will look into it. Hopefully I have a spare SATA socket; it's pretty tight in there.

In the meantime I was able to manually update to 12.0-U2 and this seems to have resolved the problem.

Thanks for your help!
 
Top