Short answer: SAP GUI “Error: hostname ‘…’ unknown” with “Detail NiPGetHostByName: ‘…’ not found” means your PC can’t turn the SAP server’s name into an IP address. SAP itself is usually fine. Check DNS first: if ping on the server name says “could not find host”, your network has lost the DNS forwarding to the SAP provider’s private DNS. Restore the conditional forwarders on your router or DNS server, using the DNS server addresses your SAP provider gives you.
A car dealership we look after had a new internet gateway installed one afternoon. The next morning nobody in the business could log in to SAP, and the dealership couldn’t process parts or warranty work. Every PC showed the same SAP GUI error. The internet worked, email worked, only SAP was gone. Here is what we found and how to fix it.
Fixed by Rohan Colley, Senior Systems Administrator at GCIT. Written up by Elliot Munro, CISO.
Symptoms
When you select a system in SAP Logon and try to connect, SAP GUI shows:
Error: hostname ‘sap.example.com.au’ unknown
Component NI (network interface), version 40
rc = -2, module D:/depot/bas/740_REL/src/base/ni/ninti.c, line 896
Detail NiPGetHostByName: ‘sap.example.com.au’ not found
System Call getaddrinfo

The host name in your error will be your SAP server’s real name. Other signs:
- Every PC on the site has the same problem, often straight after a network change.
- Websites and email work normally.
- A ping to the SAP server name fails with “could not find host”, not with a timeout.
- SAP works for staff connecting from elsewhere, for example over a VPN to a different network.

People also search for this as “SAP GUI hostname unknown”, “NiPGetHostByName not found”, “SAP partner not reached” or “SAP logon error after router change”.
Affected Software
- Application: SAP GUI for Windows (SAP Logon), release 7.40 and later
- Platform: Windows PCs on a business network
- Related Services: Your router or firewall’s DNS settings, a Windows DNS server, the private link or VPN to your SAP provider
Cause
“Hostname unknown” from component NI (network interface) is a name lookup failure, not a login or licence problem. SAP GUI asks Windows for the server’s IP address and gets nothing back.
Many businesses reach SAP through a parent company, franchisor or hosting provider over a private connection. The SAP servers have names in that provider’s own internal domain, which public DNS doesn’t know about. Your network forwards lookups for that domain to the provider’s private DNS servers. These are called conditional forwarders.
In our case, the dealership’s internet gateway had been replaced. The firewall rules and the private connection were migrated, but the DNS forwarding for the SAP provider’s domains didn’t come across. As soon as that setting was missing, no PC could find the SAP server.
Resolution
Step 1: Confirm it is DNS
- Open Command Prompt and run
pingfollowed by the SAP server name shown in the error. - If you get “Ping request could not find host”, it is a DNS problem. Carry on with Step 2.
- If the name turns into an IP address but the ping times out, DNS is fine and the problem is the network route or firewall instead.
Step 2: Get the correct DNS details from your SAP provider
Contact your SAP provider’s service desk and ask which internal domains need forwarding and to which DNS server IP addresses. In our case it was two domains, each forwarded to the same pair of private DNS servers. Ask for this in writing. Guessed or partial details can break other systems, which happened briefly when an early set of addresses from the provider stopped their intranet working.
Step 3: Restore the conditional forwarders
- On a router or firewall that hands out DNS: add a DNS forwarding (or “DNS proxy”) rule for each SAP domain, pointing to the provider’s DNS servers.
- On a Windows DNS server: open DNS Manager, right-click Conditional Forwarders > New Conditional Forwarder, enter the SAP domain and the provider’s DNS server IP addresses, and save. Repeat for each domain.
Then run ipconfig /flushdns on a PC, ping the SAP server name again and check it now returns an IP address. Open SAP Logon and connect.
Step 4: Remove any temporary workarounds
If anyone added a static DNS entry or edited the Windows hosts file to get SAP going in the meantime, remove it once forwarding works. We removed our temporary static entry for the SAP server after the forwarders were in place. Hard-coded addresses break silently when the provider changes servers.
Important Notes
- Check DNS after any network change. When a router, firewall or DNS server is replaced, conditional forwarders are easy to miss. Add them to your change checklist.
- Remote staff may need it too. If staff reach SAP over a VPN or Zero Trust client, the SAP domains and subnets need to be included in that tunnel as well. We fixed one SAP over VPN problem by adding the SAP subnets to the split tunnel rules.
- Hosts file edits are a last resort. They work for one PC but hide the real fault and go stale.
- Keep the provider’s reference. Note your provider’s ticket number and the DNS details they gave you. You’ll need them again next time the network changes.
Related Resources
- Microsoft Learn: Add-DnsServerConditionalForwarderZone
- Microsoft Learn: Manage DNS zones in Windows Server
- Fix: Cloudflare WARP “Unable to Connect, Connection Blocked”
- Fix: Practice Evolve “Server Not Found” via Cloudflare
- Managed IT services at GCIT
Business system offline after a network change? Get in touch with our team.