Cloud server can't connect to internet

Asked by David N Roberts

Hi
I run foundry on an oracle server, with ubuntu as my OS. A week or so a go foundry tried to update and failed due to lack of space. So i maxed out my free space and processors and tried to run it again.

The problem I'm getting now is that neither ubuntu or foundry can connect to the internet, despite me being able to log in to them remotely

Any pointers would be great

Thanks

Dave

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can you ping 8.8.8.8 ?
Can you ping bbc.co.uk OK?
Do you use a proxy for web access?

Revision history for this message
David N Roberts (painmagnet) said :
#2

pinging 8.8.8.8 seems to work, I'm still pretty new to this, and i'm using command prompt.
Still waiting for the pings to stop so i can try bbc.co.uk

I don't remember a proxy being set up

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

They don't stop. Press CTRL + C. Pinging 8.8.8.8 means networking is OK. If you can't ping bbc.co.uk then the issue is DNS and we can sort that

Revision history for this message
David N Roberts (painmagnet) said :
#4

getting this

ping: www.bbc.co.uk: Temporary failure in name resolution

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

OK, run:

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
sudo apt update
sudo apt full-upgrade

Does it update OK?

Revision history for this message
David N Roberts (painmagnet) said :
#6

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
The system cannot find the path specified.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

If you run:

cat /etc/resolv.conf

Does it output the nameserver text in the command before?

Revision history for this message
David N Roberts (painmagnet) said :
#8

ubuntu@foundryvtt:~$ cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory

sorry for the late response, life got in the way

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

What is the output of

cat /lib/systemd/resolv.conf

Revision history for this message
David N Roberts (painmagnet) said :
#10

ubuntu@foundryvtt:~$ cat /lib/systemd/resolv.conf
# This file belongs to man:systemd-resolved(8). Do not edit.
#
# This is a static resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists no search
# domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search .

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

It seems that for whatever reason the system in question does not have the file /etc/resolv.conf which should contain the information about the server to be used for name resolution.

What is the output of
cat /run/systemd/resolve/resolv.conf

Eventually https://superuser.com/questions/1722535/etc-resolv-conf-is-missing-whats-the-expected-way-for-it-to-be-populated helps

Revision history for this message
David N Roberts (painmagnet) said :
#12

Sorry I think I might have missed what I was supposed to do with the linked answer

ubuntu@foundryvtt:~$ /run/systemd/resolve/resolv.conf
-bash: /run/systemd/resolve/resolv.conf: No such file or directory
ubuntu@foundryvtt:~$ /run/systemd/resolve/stub-resolv.conf
-bash: /run/systemd/resolve/stub-resolv.conf: No such file or directory
ubuntu@foundryvtt:~$ Symlink /etc/resolv.conf
Symlink: command not found
ubuntu@foundryvtt:~$

I'm only seeing the final answer, so i might be missing steps

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#13

could try:

sudo ln -s /lib/systemd/resolv.conf /etc/resolv.conf

Does that help?

Revision history for this message
David N Roberts (painmagnet) said :
#14

ubuntu@foundryvtt:~$ sudo ln -s /lib/systemd/resolv.conf /etc/resolv.conf
ln: failed to create symbolic link '/etc/resolv.conf': File exists

Do i delete it and try again?

Revision history for this message
Manfred Hampl (m-hampl) said :
#15

"/etc/resolv.conf': File exists"

What is now the output of

cat /etc/resolv.conf

Revision history for this message
David N Roberts (painmagnet) said :
#16

ubuntu@foundryvtt:~$ cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory

Revision history for this message
Manfred Hampl (m-hampl) said :
#17

It seems that there is a broken link leading nowhere.

What is the output of

ls -ld /etc/resolv*

Revision history for this message
David N Roberts (painmagnet) said :
#18

ubuntu@foundryvtt:~$ ls -ld /etc/resolv*
lrwxrwxrwx 1 root root 39 Aug 10 2022 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#19

Remove the broken link and set the name server as instructed by actuionparsnip in comment #5

Revision history for this message
David N Roberts (painmagnet) said :
#20

which bit is the broken link, sorry not very good at this

Revision history for this message
Manfred Hampl (m-hampl) said :
#21

Does the file /run/systemd/resolve/stub-resolv.conf exist?

I assume it doesn't, and so the link /etc/resolv.conf points to a nonexisting file and is broken.

Revision history for this message
David N Roberts (painmagnet) said :
#22

so do i delete /etc/resolv.conf?

Revision history for this message
Manfred Hampl (m-hampl) said :
#23

"so do i delete /etc/resolv.conf?"

yes!

Revision history for this message
David N Roberts (painmagnet) said :
#24

Thanks Manfred Hampl, that solved my question.