Name or service not known

Antworten
jamesbond
Beiträge: 6
Registriert: 02 Apr 2024, 09:33

Name or service not known

Beitrag von jamesbond »

Hello everyone,

I need your help. I recently installed OPSI 4.3 on Ubuntu 22.04 using the quickinstall method. I'm using Windows Server as my DNS server. I added a client to OPSI and tried to install Windows 10.

The client connects to the OPSI server and boots normally, but before the installation begins, I get an error: 'Failed to resolve 'servername.test.tld' Error -2 Name or service not known'.

I've reinstalled OPSI 4.3 multiple times and ran health checks, which all came back green. I've attached a screenshot for reference.
Could you please help me :roll:

Thanks in advance
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1534
Registriert: 10 Jun 2015, 12:19

Re: Name or service not known

Beitrag von m.radtke »

Hi

this is a name resolution error. Seems the fqdn is not resolved properly.
You'd have to check your dns settings if they are configured properly.

Regards
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
jamesbond
Beiträge: 6
Registriert: 02 Apr 2024, 09:33

Re: Name or service not known

Beitrag von jamesbond »

Thanks for your quick response Mathias.

Here is how my resolv.conf looks like:
nameserver 127.0.0.53
options edns0 trust-ad
search domain.tld

Is there is anything else I have to check?
Thanks
Benutzeravatar
ThomasT
uib-Team
Beiträge: 544
Registriert: 26 Jun 2013, 12:26

Re: Name or service not known

Beitrag von ThomasT »

Hello,

is your domain really domain.tld? Is your OPSI-Server really called "servername.test.tld"?

Without logs it's difficult to guess what happens in your case.
The client connects to the OPSI server and boots normally, but before the installation begins, I get an error: 'Failed to resolve 'servername.test.tld' Error -2 Name or service not known'.
I assume, your Client uses PXE /UEFI Netboot, you have created the Client in OPSI and have set a Netboot Product to "setup".
In this case, the DHCP Server seems to be configured correctly as it tells the client to connect to the OPSI-Server which in turn tells the client to do the netboot install.
But there seems to be a misconfiguration, as the Client tries to reach the opsi-server with "servername.test.tld".
Can you set the netboot product for your client to setup and post the content of the file "/tftpboot/opsi/opsi-linux-bootimage/cfg/01-MAC_ADDRESS_OF_CLIENT" here?
Kein Support per DM!
_________________________
opsi support - https://www.uib.de/
For productive opsi installations we recommend support contracts.
jamesbond
Beiträge: 6
Registriert: 02 Apr 2024, 09:33

Re: Name or service not known

Beitrag von jamesbond »

Hello Thomas,

No my server name is not domain.tld it is called something else but I just used domain.tld as an example.

Here is the output of the file:

Code: Alles auswählen

set timeout=0
menuentry 'Start netboot installation' {
set gfxpayload=keep
linux (pxe)/opsi/opsi-linux-bootimage/install-x64 initrd=miniroot-x64 video=vesa:ywrap,mtrr vga=791 quiet --no-log console=ttyS0 pckey=a545bdade59c599e9c7479c2acd7feec hn=vm dn=DOMAIN.TLD product=win10-x64 macaddress=08:00:27:ee:8e:38 service=https://HOSTNAME.DOMAIN.TLD:4447/rpc
initrd (pxe)/opsi/opsi-linux-bootimage/miniroot-x64
}
I have changed the server name in the log above to HOSTNAME.DOMAIN.TLD and the dn to DOMAIN.TLD.

Thanks
Benutzeravatar
ThomasT
uib-Team
Beiträge: 544
Registriert: 26 Jun 2013, 12:26

Re: Name or service not known

Beitrag von ThomasT »

Ok, this looks about right, so please try the following:
When the Client displays the error switch to another tty by using the key-combination Ctrl-Alt-F3
Login with user: root / password: linux123
Issue command:

Code: Alles auswählen

nslookup HOSTNAME.DOMAIN.TLD
Take note of the responding DNS Server's IP Adress, it is the correct one?
If not, try issueing

Code: Alles auswählen

nslookup HOSTNAME.DOMAIN.TLD IP-OF-YOUR-DNS
The answers should indicate the IP-Address of your OPSI-Server.
Kein Support per DM!
_________________________
opsi support - https://www.uib.de/
For productive opsi installations we recommend support contracts.
jamesbond
Beiträge: 6
Registriert: 02 Apr 2024, 09:33

Re: Name or service not known

Beitrag von jamesbond »

nslookup doesn't seem to be installed. Here is the output after running nslookup in tty:

Code: Alles auswählen

-bash: nslookup: command not found
jamesbond
Beiträge: 6
Registriert: 02 Apr 2024, 09:33

Re: Name or service not known

Beitrag von jamesbond »

Hello again,

Since nslookup is not pre-installed when I swtiched to tty, I tried using ping and host commands:

Code: Alles auswählen

ping HOSTNAME.DOMAIN.TLD
I got:

Code: Alles auswählen

ping: HOSTNAME.DOMAIN.TLD: Name or sevrice not known
Output using the host command:

Code: Alles auswählen

host HOSTNAME
Host HOSTNAME: not found: 3(NXDOMAIN)
I tried to ping other computer names within the network and I got a response but when I try to ping my opsi server from within the tty I won't get a response.

Thanks for your assistance
Benutzeravatar
m.radtke
uib-Team
Beiträge: 1534
Registriert: 10 Jun 2015, 12:19

Re: Name or service not known

Beitrag von m.radtke »

Hi,

then this means your opsi server is not reachable via DNS.
Please check the DNS configuration.

Regards
Mathias
Kein Support per DM!
_________________________
opsi support - http://www.uib.de/
For productive opsi installations we recommend support contracts.
jamesbond
Beiträge: 6
Registriert: 02 Apr 2024, 09:33

Re: Name or service not known

Beitrag von jamesbond »

Thanks. It got fixed.
I have added an A record of OPSI hostname and its IP to the DNS server which is the domain controller.
Antworten