DNS Issue (probably bug)

Ping:

1 Like

bingo dns problem; which dns you use ?

1 Like

127.0.0.1

config show dns

what is the output ?

config show dns
dns=configuration
NameServers=8.8.8.8

1 Like

[root@hosting ~]# config show dns
dns=configuration
NameServers=127.0.0.1

change it to 8.8.8.8 by the server-manager and try it again

1 Like

[root@hosting ~]# config show dns
dns=configuration
NameServers=8.8.8.8

then ping google.fr

[root@hosting ~]# ping google.fr
ping: google.fr: Name or service not known

output of nslookup google.fr

[root@hosting ~]# nslookup google.fr
Server: 127.0.0.1
Address: 127.0.0.1#53

** server can’t find google.fr.ovh.net: REFUSED

Can you check if the specified DNS servers are in dnsmasq.conf?

grep server= /etc/dnsmasq.conf
[root@hosting ~]# grep server= /etc/dnsmasq.conf
server=127.0.0.1
# server=/ovh.net/

Just as a test, you may edit /etc/dnsmasq.conf file, replacing the dns ip in server=127.0.0.1 with your dns, and restaring dnsmasq service.
example:

sed -ibak s/server=127.0.0.1/server=8.8.8.8/ /etc/dnsmasq.conf
systemctl restart dnsmasq
1 Like

The problem is with VPS, the server wasnt abble to connect with DNS

  1. We changed dns from 127.0.0.1 to 8.8.8.8
  1. and after we updated dnsmasq with the new address

Now the warning has disappeared and php requests works

Sorry to be more pessimistic but your issue is not solved, we must understand what it occurs.
You have simply changed a value in a configuration file, if you do a ‘signal-event nethserver-dnsmasq-update’ the older value will probably back again.

I guess that you have manually added some custom values (I mean this when I read ‘# server=/ovh.net/’) but I’m not sure.

Normally we write the IPs of /etc/resolv.conf in /etc/e-smith/templates/etc/dnsmasq.conf/25NameServers

@giacomo @davidep what do you think please

in order to see if all is good now

config show dns
config show dnsmasq
signal-event nethserver-dnsmasq-update 

post back the output of this and go to the /var/log/messages (less /var/log/messages) and write down here the relevant end of log for nethserver-dnsmasq-update

at the end you can go to /etc/dnsmasq.conf (less /etc/dnsmasq.conf) to see if the server=8.8.8.8 is there

2 Likes

Yes, probably OVH does something wired with DNS configuration.
If you set the DNS from the web interface, it should be good.

[root@hosting ~]# config show dns
dns=configuration
    NameServers=8.8.8.8


----------


[root@hosting ~]# config show dnsmasq
dnsmasq=service
    CacheSize=4000
    TCPPort=53
    UDPPorts=53,67,69
    access=green
    dhcp-boot=
    except-interface=virbr0
    status=enabled
    tftp-status=enabled


----------


Dnsmasq.conf :

# Specify IP address of upstream servers directly. Setting this flag
# does not suppress reading of /etc/resolv.conf, use "no-resolv" to do
# that.
server=8.8.8.8

well, I suppose you did signal-event nethserver-dnsmasq-update, the log you posted is not relevant of the event you launched, you need to go to the end of the log file :slight_smile:

I suppose that you can use the dns resolving name :slight_smile:

less /var/log/messages

   Dec 27 23:10:02 hosting esmith::event[20541]: Event: nethserver-dnsmasq-update
    Dec 27 23:10:02 hosting esmith::event[20541]: Migrating existing database configuration
    Dec 27 23:10:02 hosting dbus[537]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
    Dec 27 23:10:02 hosting dbus-daemon: dbus[537]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
    Dec 27 23:10:02 hosting systemd: Starting Time & Date Service...
    Dec 27 23:10:02 hosting dbus[537]: [system] Successfully activated service 'org.freedesktop.timedate1'
    Dec 27 23:10:02 hosting dbus-daemon: dbus[537]: [system] Successfully activated service 'org.freedesktop.timedate1'
    Dec 27 23:10:02 hosting systemd: Started Time & Date Service.
    Dec 27 23:10:02 hosting esmith::event[20541]: Migrating existing database certificates
    Dec 27 23:10:02 hosting esmith::event[20541]: Migrating existing database networks
    Dec 27 23:10:02 hosting esmith::event[20541]: Migrating existing database accounts
    Dec 27 23:10:02 hosting esmith::event[20541]: Migrating existing database routes
    Dec 27 23:10:02 hosting esmith::event[20541]: Migrating existing database hosts
    Dec 27 23:10:03 hosting esmith::event[20541]: Migrating existing database fwrules
    Dec 27 23:10:03 hosting esmith::event[20541]: Migrating existing database fwservices
    Dec 27 23:10:03 hosting esmith::event[20541]: Migrating existing database portforward
    Dec 27 23:10:03 hosting esmith::event[20541]: Migrating existing database tc
    Dec 27 23:10:03 hosting esmith::event[20541]: Migrating existing database dhcp
    Dec 27 23:10:03 hosting esmith::event[20541]: Migrating existing database vhosts
    Dec 27 23:10:03 hosting esmith::event[20541]: Migrating existing database contentfilter
    Dec 27 23:10:03 hosting esmith::event[20541]: Migrating existing database proxypass
    Dec 27 23:10:03 hosting esmith::event[20541]: Migrating existing database vpn
    Dec 27 23:10:03 hosting esmith::event[20541]: Action: /etc/e-smith/events/nethserver-dnsmasq-update/S00initialize-default-databases SUCCESS [0.344155]
    Dec 27 23:10:03 hosting esmith::event[20541]: expanding /etc/dnsmasq-dhcp-hosts
    Dec 27 23:10:03 hosting esmith::event[20541]: expanding /etc/dnsmasq.conf
    Dec 27 23:10:03 hosting esmith::event[20541]: ERROR in /etc/e-smith/templates//etc/dnsmasq.conf/80tftp: Program fragment delivered error <<Can't call method "prop" on an undefined value at /etc/e-smith/templates//etc/dnsmasq.conf/80tftp line 11.>> at template line 4
    Dec 27 23:10:03 hosting esmith::event[20541]: ERROR: Template processing failed for //etc/dnsmasq.conf: 1 fragment generated errors
    Dec 27 23:10:03 hosting esmith::event[20541]: at /etc/e-smith/events/actions/generic_template_expand line 64.
    Dec 27 23:10:03 hosting esmith::event[20541]: [WARNING] expansion of /etc/dnsmasq.conf failed
    Dec 27 23:10:03 hosting esmith::event[20541]: expanding /etc/resolv.conf
    Dec 27 23:10:03 hosting esmith::event[20541]: Action: /etc/e-smith/events/actions/generic_template_expand FAILED: 1 [0.229901]
    Dec 27 23:10:03 hosting systemd: Reloading.
    Dec 27 23:10:03 hosting esmith::event[20541]: [INFO] service dnsmasq restart
    Dec 27 23:10:03 hosting dnsmasq[20525]: exiting on receipt of SIGTERM
    Dec 27 23:10:03 hosting systemd: Stopping DNS caching server....
    Dec 27 23:10:03 hosting systemd: Started DNS caching server..
    Dec 27 23:10:03 hosting systemd: Starting DNS caching server....
    Dec 27 23:10:03 hosting dnsmasq[20569]: started, version 2.66 cachesize 4000
    Dec 27 23:10:03 hosting dnsmasq[20569]: compile time options: IPv6 GNU-getopt DBus no-i18n IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth
    Dec 27 23:10:03 hosting dnsmasq-tftp[20569]: TFTP root is /var/lib/tftpboot
    Dec 27 23:10:03 hosting dnsmasq[20569]: using nameserver 8.8.8.8#53
    Dec 27 23:10:03 hosting dnsmasq[20569]: read /etc/hosts - 1 addresses
    Dec 27 23:10:03 hosting esmith::event[20541]: [INFO] dnsmasq restart
    Dec 27 23:10:03 hosting esmith::event[20541]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [0.245993]
    Dec 27 23:10:03 hosting esmith::event[20541]: Event: nethserver-dnsmasq-update FAILED
1 Like