• The ImunifyAV extension is now deprecated and no longer available for installation.
    Existing ImunifyAV installations will continue operating for three months, and after that will automatically be replaced with the new Imunify extension. We recommend that you manually replace any existing ImunifyAV installations with Imunify at your earliest convenience.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue Connectivity issues in Ubuntu Server 22.04

Hi, from here on it may not have anything to do with Plesk, but I'm asking just in case.

On my server I have several applications that run Node, these applications make requests to APIs using fetch, but since the update, sometimes fetch doesn't work correctly and returns this:

Bash:
TypeError: fetch failed
    at node:internal/deps/undici/undici:13484:13
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
  [cause]: ConnectTimeoutError: Connect Timeout Error
      at onConnectTimeout (/home/iperona/DiscordBot/Wolvesville/node_modules/undici/lib/core/connect.js:190:24)
      at /home/iperona/DiscordBot/Wolvesville/node_modules/undici/lib/core/connect.js:133:46
      at Immediate._onImmediate (/home/iperona/DiscordBot/Wolvesville/node_modules/undici/lib/core/connect.js:174:9)
      at process.processImmediate (node:internal/timers:511:21) {
    code: 'UND_ERR_CONNECT_TIMEOUT'
  }
} Promise {
  <rejected> TypeError: fetch failed
      at node:internal/deps/undici/undici:13484:13
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
    [cause]: ConnectTimeoutError: Connect Timeout Error
        at onConnectTimeout (/home/iperona/DiscordBot/Wolvesville/node_modules/undici/lib/core/connect.js:190:24)
        at /home/iperona/DiscordBot/Wolvesville/node_modules/undici/lib/core/connect.js:133:46
        at Immediate._onImmediate (/home/iperona/DiscordBot/Wolvesville/node_modules/undici/lib/core/connect.js:174:9)
        at process.processImmediate (node:internal/timers:511:21) {
      code: 'UND_ERR_CONNECT_TIMEOUT'
    }
  }
}

Searching the internet I have seen comments that it could be the DNS, however, when trying to access /etc/resolv.conf it is empty
 
Hi, none of the files or services you mentioned exist on my server.

First of all, check whether you have the file

/var/run/systemd/resolve/resolv.conf

If you do not have that file, then your Plesk instance has not been installed properly.

If you do have that file, then you are missing a symlink (the file /etc/resolv.conf is a symlink to aforementioned file).

Either way, it is best to reinstall the system - it is very likely that you have lots of files that are missing (even though they should be there).

Please note that reinstallation is best done after adding a correct /etc/resolv.conf file.

Also note that you can manually change the /etc/resolv.conf file to contain Google Resolvers - this might be handy if the resolvers of your hosting provider somehow do not work properly (and please do not forget that the Google Resolvers are a temporary workaround, not a permanent fix!)

Kind regards....
 
Ok.

What do you have in /etc/resolv.conf?

First of all, check whether you have the file

/var/run/systemd/resolve/resolv.conf

If you do not have that file, then your Plesk instance has not been installed properly.

If you do have that file, then you are missing a symlink (the file /etc/resolv.conf is a symlink to aforementioned file).

Either way, it is best to reinstall the system - it is very likely that you have lots of files that are missing (even though they should be there).

Please note that reinstallation is best done after adding a correct /etc/resolv.conf file.

Also note that you can manually change the /etc/resolv.conf file to contain Google Resolvers - this might be handy if the resolvers of your hosting provider somehow do not work properly (and please do not forget that the Google Resolvers are a temporary workaround, not a permanent fix!)

Kind regards....

Both /etc/resolv.conf and /var/run/systemd/resolve/resolv.conf are empty
 
@ItsPerona

First of all, you should check the status - run the command : resolvectl status

If the appropriate services are not running, then you should start them and inspect the contents of the resolv.conf files.

Again, you should be aware of the fact that many files might be missing or corrupted if and when the resolver is not properly configurated - in such a case, it is always a good idea to start again with the installation of Plesk, certainly when it concerns crucial elements that control networking.

Kind regards....
 
Both /etc/resolv.conf and /var/run/systemd/resolve/resolv.conf are empty

Add in /etc/resolv.conf
Code:
nameserver 1.1.1.1
nameserver 8.8.8.8
If your provider has a DNS resolver you should use that

Let's see if /etc/resolver.conf is a file or a link
Bash:
ls -l /etc/resolv.conf
 
@trialotto
Hi, it seems that this service was uninstalled, by running "apt install systemd-resolved" it was reinstalled and I can now access the file.

I am attaching the output of "resolvectl status"

Bash:
~# resolvectl status
Global
         Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
  resolv.conf mode: stub
Current DNS Server: 8.8.8.8
       DNS Servers: 8.8.8.8 1.1.1.1

Link 2 (eno2)
    Current Scopes: none
         Protocols: -DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 3 (eno1)
    Current Scopes: DNS
         Protocols: +DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 81.169.163.106
       DNS Servers: 81.169.163.106 85.214.7.22 212.227.123.16 212.227.123.17
        DNS Domain: stratoserver.net


@Raul A.
Finally I have the file and I have been able to open it, I have added the nameservers that you told me.

1736283397737.png
 
If you've installed systemd-resolved there is no need to make manual changes to /etc/resolv.conf.

After the made changes, do you api calls work?
 
@trialotto
Hi, it seems that this service was uninstalled, by running "apt install systemd-resolved" it was reinstalled and I can now access the file.

@ItsPerona

After reinstalling systemd-resolved service, it is not recommended to edit /etc/resolv.conf directly, as @Raul A. indicated already.

Please contact stratoserver first and ask them for the correct DNS resolvers that have to be added.

When knowing the correct resolvers, then follow the steps :

1 - edit the /etc/systemd/resolved.conf with vi or nano
2 - add the DN provided by stratoserver under the heading [ Resolve ]
3 - optionally add other DNS resolvers under [ Resolve ], like the resolver from Google
4 - save the changes and run the command : systemctl restart systemd-resolved
5 - check output with the command : resolvectl status

Again, if the systemd-resolved service has been uninstalled, then you should make sure that you find out which packages might still be missing.

It cannot do harm, since something has probably completely gone wrong when a crucial service like systemd-resolved is missing - it is often not a singular issue.

Kind regards....
 
Back
Top