Unable to connect to server - No usable temporary directory found

760 views
Skip to first unread message

Tomás Lombardi

unread,
Apr 1, 2021, 4:48:33 AM4/1/21
to gce-discussion
Hi, 

I have a problem when I try to connect by ssh.

I connect by serial console and it shows me this error. I can't fix it.

snapd snap.
Mar 31 13:31:15 proyecto-cerveceria systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Mar 31 13:31:15 proyecto-cerveceria systemd[1]: snapd.service: Scheduled restart job, restart counter is at 13.
Mar 31 13:31:15 proyecto-cerveceria systemd[1]: Stopped Snap Daemon.
Mar 31 13:31:15 proyecto-cerveceria systemd[1]: Starting Snap Daemon...
Mar 31 13:31:15 proyecto-cerveceria snapd[3150]: AppArmor status: apparmor is enabled and all features are available
Mar 31 13:31:15 proyecto-cerveceria snapd[3150]: AppArmor status: apparmor is enabled and all features are available
Mar 31 13:31:43 proyecto-cerveceria google-accounts: ERROR Exception calling the response handler. [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'].#012Traceback (most recent call last):#012  File "/usr/lib/python3/dist-packages/google_compute_engine/metadata_watcher.py", line 200, in WatchMetadata#012    handler(response)#012  File "/usr/lib/python3/dist-packages/google_compute_engine/accounts/accounts_daemon.py", line 285, in HandleAccounts#012    self.utils.SetConfiguredUsers(desired_users.keys())#012  File "/usr/lib/python3/dist-packages/google_compute_engine/accounts/accounts_utils.py", line 318, in SetConfiguredUsers#012    mode='w', prefix=prefix, delete=True) as updated_users:#012  File "/usr/lib/python3.6/tempfile.py", line 681, in NamedTemporaryFile#012    prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)#012  File "/usr/lib/python3.6/tempfile.py", line 269, in _sanitize_params#012    dir = gettempdir()#012  File "/usr/lib/python3.6/tempfile.py", line 437, in gettempdir#012    tempdir = _get_default_tempdir()#012  File "/usr/lib/python3.6/tempfile.py", line 372, in _get_default_tempdir#012    dirlist)#012FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']

I Try to resize the disk but still the same problem.

I need to solve it urgently.

Ruben (Google Cloud Support)

unread,
Apr 7, 2021, 5:14:59 AM4/7/21
to gce-discussion
Hello,

One path that you can follow to fix this issue is creating a startup script [1] that deletes the part of the contents of /var/tmp and then reboot the instance.

Have a nice day!

Reply all
Reply to author
Forward
0 new messages