• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DHCP server not working
#1
Dear all experts,

I am using netpi with firmware virsion V1.2.0.0.
I want to use netpi as a access point with a dhcp server.
Since, I changed netpi's wifi settings as the attached picture.
   
For a short time, it works well.

However, after a particular reboot, the dhcp server does not works.
A client(Windows machine) can connect to netpi through wifi, but no ip adresses are assigned.

It can recover by resetting netpi's wifi configuration by pushing "Save changes" button.
However, after a while, the problem occurs again after a reboot.

For your information, the followings are dnsmasq error messages in syslog. 


<30>1 2020-06-19T02:46:40+00:00 NTB827EBE916A2 NetworkManager 953 - - dnsmasq: failed to create listening socket for 192.168.205.2: Cannot assign requested address
<26>1 2020-06-19T02:46:40+00:00 NTB827EBE916A2 dnsmasq 1745 - - failed to create listening socket for 192.168.205.2: Cannot assign requested address
<26>1 2020-06-19T02:46:40+00:00 NTB827EBE916A2 dnsmasq 1745 - - FAILED to start up
<4>1 2020-06-19T02:46:40+00:00 NTB827EBE916A2 NetworkManager 953 - - <warn>  [1592534800.5257] dnsmasq[0x22ebcd8]: dnsmasq exited with error: Network access problem (address in use, permissions) (2)


I want to know the cause of this problem and how can I avoid it.

Best regards.
  Reply
#2
Hi there,

I have a question concerning the generel setup of your netPI. I think you are also using come applications on netPI in containers. Can you please roughly tell me which type of application/containers you are using?

Are these applications are also use a network manager function or setup another DHCP server in parallel? Are your applications using the "ip" Linux command during runtime?

Anothor question is how many clients are usually connecting to your Wifi Access Point? And of which type are these devices? Are they a mobil phone, or a notbook or a machine?

You say after a short time ... I want to reconstruct this here in the office. So how many reboot times does it need to get this problem visible? Does it appear directly after a single reboot or does it need 5 times , 10 times?

You setup a gateway of 192.168.205.1. This default gateway is used to forward traffic to in cases the IP address sent by your clients of your access point are not in the local range of 192.168.205.x. So is this gateway real and does this gateway exists physically? Usually a gateway is pointing to the Internet capable IP address which is usually eth0 and netPI's LAN port. So is the gateway address correct?

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#3
Dear Armin,

I will answer the questions.

"I have a question concerning the generel setup of your netPI. I think you are also using come applications on netPI in containers. Can you please roughly tell me which type of application/containers you are using?"
I did additional research. As a result, this problem occurs even though no container exists.

"Anothor question is how many clients are usually connecting to your Wifi Access Point? And of which type are these devices? Are they a mobil phone, or a notbook or a machine?"
Usually, netpi connects only one pc at the same time, but there are two types of client, one is windows desktop with a wireless lan adapter, and the other is windows laptop.

"You say after a short time ... I want to reconstruct this here in the office. So how many reboot times does it need to get this problem visible? Does it appear directly after a single reboot or does it need 5 times , 10 times?"
In most cases, up to 5 times.

"You setup a gateway of 192.168.205.1. This default gateway is used to forward traffic to in cases the IP address sent by your clients of your access point are not in the local range of 192.168.205.x. So is this gateway real and does this gateway exists physically? Usually a gateway is pointing to the Internet capable IP address which is usually eth0 and netPI's LAN port. So is the gateway address correct?"
It is not correct. My application only uses local range. Since, I set the meaningless gateway value.

I don't know if it's relevant, the netpi firmware is updated to V1.2.0.0 from V1.1.3.0RC3(Sorry, from version is not certain) by using RECOVERY USB. Before the update, this problem does not occur.

Best Regards,
  Reply
#4
Ok tomorrow I will prepare a test in the office myself.

I will setup the very same Wifi AP setup like you did (except password will be different) based on your screen shot.

Then I will be switching netPI on/off periodically while connected a Desktop and for example a mobile phone. Hopefully I am able to get ths problem reconstructed so that I can show it to the development team.

By the way one more question. How is your eth0 interfacce configured. Is it connected to a router giving the eth0 interface a network address or do you have a static IP adresse setting on eth0?
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#5
Dear Armin,

This screenshot shows my eth0 settings. I set a static ip address.
   

Best regards,
  Reply
#6
(June-22nd-2020, 09:22 AM)m-yoshikawa Wrote: Dear Armin,

This screenshot shows my eth0 settings. I set a static ip address.


Best regards,

Please note - 
Sometimes the incorrect setting of the time of day clock adversely affects behavior of seemingly unrelated processes. (Control Panel > System > Time)
  Reply
#7
Dear yoshikawa-san,

I have investigated the problem with my personal NIOT-E-NPI3-51-EN-RE device in the office.

I reset it to factory default by updating it to V1.200 firmware version. So it is a fresh device with no containers on it and just loaded with the raw netPI OS with web UI.

I setup the very same static LAN IP network settings and also the Wifi AP with password 12345678 with all the other settings in accordance to your screen shot.

I have let my notebook connected to this Wifi AP and also I have my mobile phone connected to the same Wifi AP. Both get IP addresses as expected.

Then I have powered off my netPI and powered it on again 7 times. After reboot both clients ... notebook and mobile phone ... do get a proper IP address again.

Then I have used the "Reboot" function 5 times in web UI of netPI to check if there is a problem. But also here notebook and mobile phone are getting IP addresses in all cases.

As next I have downloaded my syslog file an searched for "FAILED to start up" and I found this term multiple times in it like this example shows:

Code:
<30>1 2020-06-23T06:39:20+00:00 NTB827EB3B557B NetworkManager 972 - - dnsmasq: failed to create listening socket for 192.168.205.2: Cannot assign requested address
<26>1 2020-06-23T06:39:20+00:00 NTB827EB3B557B dnsmasq 1232 - - failed to create listening socket for 192.168.205.2: Cannot assign requested address
<26>1 2020-06-23T06:39:20+00:00 NTB827EB3B557B dnsmasq 1232 - - FAILED to start up
<4>1 2020-06-23T06:39:20+00:00 NTB827EB3B557B NetworkManager 972 - - <warn>  [1592894360.4236] dnsmasq[0x247f650]: dnsmasq exited with error: Network access problem (address in use, permissions) (2)
<4>1 2020-06-23T06:39:20+00:00 NTB827EB3B557B NetworkManager 972 - - <warn>  [1592894360.4250] dns-mgr: plugin dnsmasq child quit unexpectedly
<30>1 2020-06-23T06:39:20+00:00 NTB827EB3B557B avahi-daemon 909 - - Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.205.2.
<30>1 2020-06-23T06:39:20+00:00 NTB827EB3B557B avahi-daemon 909 - - New relevant interface wlan0.IPv4 for mDNS.
<30>1 2020-06-23T06:39:20+00:00 NTB827EB3B557B avahi-daemon 909 - - Registering new address record for 192.168.205.2 on wlan0.IPv4.
<30>1 2020-06-23T06:39:20+00:00 NTB827EB3B557B dnsmasq 1236 - - started, version 2.78 cachesize 400
<30>1 2020-06-23T06:39:20+00:00 NTB827EB3B557B dnsmasq 1236 - - compile time options: IPv6 GNU-getopt DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify
<30>1 2020-06-23T06:39:21+00:00 NTB827EB3B557B dnsmasq 1236 - - DBus support enabled: connected to system bus
<28>1 2020-06-23T06:39:21+00:00 NTB827EB3B557B dnsmasq 1236 - - warning: no upstream servers configured
<30>1 2020-06-23T06:39:21+00:00 NTB827EB3B557B dnsmasq-dhcp 1236 - - DHCP, IP range 192.168.205.3 -- 192.168.205.100, lease time 4h
<30>1 2020-06-23T06:39:21+00:00 NTB827EB3B557B dnsmasq-dhcp 1236 - - DHCP, sockets bound exclusively to interface wlan0
<30>1 2020-06-23T06:39:21+00:00 NTB827EB3B557B systemd 1 - - Created slice system-upnpd.slice.
<30>1 2020-06-23T06:39:21+00:00 NTB827EB3B557B dnsmasq 1236 - - cleared cache
<30>1 2020-06-23T06:39:21+00:00 NTB827EB3B557B systemd 1 - - Starting upnp daemon...
<30>1 2020-06-23T06:39:21+00:00 NTB827EB3B557B dnsmasq 1236 - - setting upstream servers from DBus
<30>1 2020-06-23T06:39:21+00:00 NTB827EB3B557B dnsmasq 1236 - - using nameserver 192.168.100.50#53(via eth0)
<30>1 2020-06-23T06:39:21+00:00 NTB827EB3B557B dnsmasq 1236 - - cleared cache


But if I look further in the log file shown above that nevertheless the service "dnsmasq-dhcp" is started for IP range 192.168.205.3 to 192.168.205.100 as you can see. So my questions is does your log file show the same?

Thx
Armin
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#8
I checked again my syslog file after another reset of my netPI and it seems that the error "FAILED to start up" and also "dnsmasq exited with error: Network access problem (address in use, permissions) (2)" is normal and has no influence on the DHCP server over Wifi.

Once again a new version of my syslog file while notebook and also mobile phone are getting proper IP addresses even errors are shown:


Code:
<30>1 2020-06-23T07:09:01+00:00 NTB827EB3B557B NetworkManager 952 - - dnsmasq: failed to create listening socket for 192.168.205.2: Cannot assign requested address
<26>1 2020-06-23T07:09:01+00:00 NTB827EB3B557B dnsmasq 1212 - - failed to create listening socket for 192.168.205.2: Cannot assign requested address
<26>1 2020-06-23T07:09:01+00:00 NTB827EB3B557B dnsmasq 1212 - - FAILED to start up
<30>1 2020-06-23T07:09:01+00:00 NTB827EB3B557B avahi-daemon 891 - - Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.205.2.
<30>1 2020-06-23T07:09:01+00:00 NTB827EB3B557B avahi-daemon 891 - - New relevant interface wlan0.IPv4 for mDNS.
<4>1 2020-06-23T07:09:01+00:00 NTB827EB3B557B NetworkManager 952 - - <warn>  [1592896141.7171] dnsmasq[0x1b912c0]: dnsmasq exited with error: Network access problem (address in use, permissions) (2)
<30>1 2020-06-23T07:09:01+00:00 NTB827EB3B557B avahi-daemon 891 - - Registering new address record for 192.168.205.2 on wlan0.IPv4.
<4>1 2020-06-23T07:09:01+00:00 NTB827EB3B557B NetworkManager 952 - - <warn>  [1592896141.7186] dns-mgr: plugin dnsmasq child quit unexpectedly
<30>1 2020-06-23T07:09:01+00:00 NTB827EB3B557B dnsmasq 1217 - - started, version 2.78 cachesize 400
<30>1 2020-06-23T07:09:02+00:00 NTB827EB3B557B systemd 1 - - Created slice system-upnpd.slice.
<30>1 2020-06-23T07:09:02+00:00 NTB827EB3B557B dnsmasq 1217 - - compile time options: IPv6 GNU-getopt DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify
<30>1 2020-06-23T07:09:02+00:00 NTB827EB3B557B systemd 1 - - Starting upnp daemon...
<30>1 2020-06-23T07:09:02+00:00 NTB827EB3B557B dnsmasq 1217 - - DBus support enabled: connected to system bus
<28>1 2020-06-23T07:09:02+00:00 NTB827EB3B557B dnsmasq 1217 - - warning: no upstream servers configured
<30>1 2020-06-23T07:09:02+00:00 NTB827EB3B557B dnsmasq-dhcp 1217 - - DHCP, IP range 192.168.205.3 -- 192.168.205.100, lease time 4h
<30>1 2020-06-23T07:09:02+00:00 NTB827EB3B557B dnsmasq-dhcp 1217 - - DHCP, sockets bound exclusively to interface wlan0
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#9
Dear SteveO and Armin,

Thank you for giving me information.

In fact, my netpi's time was incorrect. However, after correcting time settings, the problem still occurs.

I found the messages in syslog that indicate dhcp server started, when the problem occurs.
However, I am not sure the situation is the same as you.

In my syslog, the below sequence repeated more than 10 times,
Code:
> <30>1 2020-06-23T18:24:47+09:00 NTB827EBE916A2 NetworkManager 954 - - dnsmasq: failed to create listening socket for 192.168.205.2: Cannot assign requested address
> <26>1 2020-06-23T18:24:47+09:00 NTB827EBE916A2 dnsmasq 2176 - - failed to create listening socket for 192.168.205.2: Cannot assign requested address
> <26>1 2020-06-23T18:24:47+09:00 NTB827EBE916A2 dnsmasq 2176 - - FAILED to start up
> <4>1 2020-06-23T18:24:47+09:00 NTB827EBE916A2 NetworkManager 954 - - <warn>  [1592904287.4311] dnsmasq[0x855b68]: dnsmasq exited with error: Network access problem (address in use, permissions) (2)
> <4>1 2020-06-23T18:24:47+09:00 NTB827EBE916A2 NetworkManager 954 - - <warn>  [1592904287.4322] dns-mgr: plugin dnsmasq child quit unexpectedly

and finally, child respawn is stopped for 300 seconds,
Code:
> <4>1 2020-06-23T18:24:47+09:00 NTB827EBE916A2 NetworkManager 954 - - <warn>  [1592904287.4322] dns-mgr: plugin dnsmasq child quit unexpectedly
> <4>1 2020-06-23T18:24:47+09:00 NTB827EBE916A2 NetworkManager 954 - - <warn>  [1592904287.4323] dns-mgr: plugin dnsmasq child respawning too fast, delaying update for 300 seconds

then, dhcp server started as below.(However, dhcp server does not works actually)
(It seems little bit strange. dhcp server started twice?)
Code:
> <30>1 2020-06-23T18:24:54+09:00 NTB827EBE916A2 dnsmasq 2269 - - started, version 2.78 cachesize 400
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2269 - - compile time options: IPv6 GNU-getopt DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2269 - - DBus support enabled: connected to system bus
> <28>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2269 - - warning: no upstream servers configured
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq-dhcp 2269 - - DHCP, IP range 192.168.205.3 -- 192.168.205.100, lease time 4h
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq-dhcp 2269 - - DHCP, sockets bound exclusively to interface wlan0
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2269 - - cleared cache
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2269 - - setting upstream servers from DBus
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2269 - - cleared cache
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2269 - - exiting on receipt of SIGTERM
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2287 - - started, version 2.78 cachesize 400
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2287 - - compile time options: IPv6 GNU-getopt DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2287 - - DBus support enabled: connected to system bus
> <28>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2287 - - warning: no upstream servers configured
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq-dhcp 2287 - - DHCP, IP range 192.168.205.3 -- 192.168.205.100, lease time 4h
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq-dhcp 2287 - - DHCP, sockets bound exclusively to interface wlan0
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2287 - - cleared cache
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2287 - - setting upstream servers from DBus
> <30>1 2020-06-23T18:24:58+09:00 NTB827EBE916A2 dnsmasq 2287 - - cleared cache

During the problem occuring, repowering does not solve the problem. Since, when I found the problem occuring, get a syslog and repower, then reget a syslog, and make a diff file, which has information about only single running. Attached is this diff file.(My privacy info, such as host name, is replaced)
Since I can not judge which logs are related to the problem, please reserch this file.

Best regards,


Attached Files
.zip   syslog_file.zip (Size: 105.33 KB / Downloads: 3)
  Reply
#10
I have more questions.

A.) do you use official software shutdown/reboot function of netPI to restart the device or do you just disconnect the netPI from power and repower it again
B.) Is it possible for you to use again the update USB stick to update 1.2.0.0 to 1.2.0.0 again, so that you get a fresh device. Maybe something went wrong during update from V1.1.3 .0 to 1.2.0.0. After this reset could to do your tests again please?
C.) on the device there is a label sticker. on the label there is a tiny bar code and around the bar code there are numbers. One lis like 1321500. Then there is a number 1 or 2 in the corner and then a number like 208191 which is the serial number. Could you please provide this information to us please?
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Fieldbus Ports not working Schoko 13 72 June-29th-2020, 09:43 PM
Last Post: Armin@netPI
  Node-Red "http in"-Node not working DWxPro 8 47 June-19th-2020, 01:12 AM
Last Post: DWxPro
  how to pick up PROFINET data and store them to OPC UA server on Node-RED/netPI. tad 7 46 March-16th-2020, 10:21 AM
Last Post: Armin@netPI
  Node Red stop working DSongra 1 11 February-12th-2020, 08:19 AM
Last Post: Armin@netPI
  PM - develope OPC UA Server using the Codesys Lingyue 5 24 January-17th-2020, 11:12 AM
Last Post: Armin@netPI
  [SOLVED] netPI stops working (502 - Bad Gateway) Andi 3 40 June-19th-2019, 03:58 PM
Last Post: Andi
  New Container example "OPC UA server" Armin@netPI 0 25 April-12th-2019, 11:51 AM
Last Post: Armin@netPI
  [INFO]Docker DNS server Armin@netPI 0 22 March-7th-2019, 09:02 AM
Last Post: Armin@netPI
  [SOLVED] Use netPi as a FTP server martech 1 106 October-18th-2018, 09:07 AM
Last Post: Armin@netPI
  [SOLVED] MySQL Container / Server in another Container? paubau 2 169 September-5th-2018, 08:00 AM
Last Post: paubau

Forum Jump:


Users browsing this thread: 1 Guest(s)