Can't get AccessPoint working on RP3

Raspberry Pi related support

Re: The Raspberry Pi 3

Postby mrcrowley » 09 Feb 2017, 12:56

Code: Select all
[root@runeaudio ~]# groupdel dnsmasq         
groupdel: group 'dnsmasq' does not exist
[root@runeaudio ~]# useradd dnsmasq         
[root@runeaudio ~]# systemctl restart dnsmasq
[root@runeaudio ~]# systemctl status dnsmasq         
● dnsmasq.service - A lightweight DHCP and caching DNS server
   Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2017-02-09 12:51:07 CET; 4s ago
     Docs: man:dnsmasq(8)
  Process: 1366 ExecStartPre=/usr/bin/dnsmasq --test (code=exited, status=0/SUCCESS)
 Main PID: 1370 (dnsmasq)
    Tasks: 1 (limit: 512)
   CGroup: /system.slice/dnsmasq.service
           └─1370 /usr/bin/dnsmasq -k --enable-dbus --user=dnsmasq --pid-file

Feb 09 12:51:07 runeaudio systemd[1]: Starting A lightweight DHCP and caching DNS server...
Feb 09 12:51:07 runeaudio dnsmasq[1366]: dnsmasq: syntax check OK.
Feb 09 12:51:07 runeaudio dnsmasq[1370]: started, version 2.76 cachesize 150
Feb 09 12:51:07 runeaudio dnsmasq[1370]: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lu
Feb 09 12:51:07 runeaudio dnsmasq[1370]: DBus support enabled: connected to system bus
Feb 09 12:51:07 runeaudio dnsmasq[1370]: reading /etc/resolv.conf
Feb 09 12:51:07 runeaudio dnsmasq[1370]: using nameserver 192.168.1.1#53
Feb 09 12:51:07 runeaudio dnsmasq[1370]: bad address at /etc/hosts line 3
Feb 09 12:51:07 runeaudio dnsmasq[1370]: read /etc/hosts - 2 addresses
Feb 09 12:51:07 runeaudio systemd[1]: Started A lightweight DHCP and caching DNS server.



It seems active now. Only [1370]: bad address at /etc/hosts line 3 messagge is red.
And also message: group 'dnsmasq' does not exist.
mrcrowley
 
Posts: 50
Joined: 21 Jun 2016, 14:39

Re: The Raspberry Pi 3

Postby mrcrowley » 09 Feb 2017, 13:10

Authentification still doesn't work.

I think we should add the group dnsmasq.

Code: Select all
groupadd dnsmasq


Should I ???
mrcrowley
 
Posts: 50
Joined: 21 Jun 2016, 14:39

Re: The Raspberry Pi 3

Postby hondagx35 » 09 Feb 2017, 13:18

No risk, no reward!

But it has nothing to do with authentification.

P.S.
I made a new and fresh image, updated to latest nightly build and followed my own HowTo.
All works like it should.

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: The Raspberry Pi 3

Postby mrcrowley » 09 Feb 2017, 14:19

The problem was here:

Code: Select all
Feb 22 15:40:19 runeaudio dnsmasq[366]: reading /etc/resolv.conf
Feb 22 15:40:19 runeaudio dnsmasq[366]: using nameserver 192.168.1.1#53


I tried to modify resolv.conf to set nameserver 192.168.2.1, but reading from wikiarch, it seems that dhcpcd tends to overwrite /etc/resolv.conf by default, so I have to protect /etc/resolv.conf. To do this, append nohook resolv.conf to the dhcpcd config file. Otherwise It is also possible to write protect your resolv.conf:
Code: Select all
chattr +i /etc/resolv.conf


The last one solve my problems. Now I can connect to RuneAudioAP, even if the message status is not completly clear:
Code: Select all
 systemctl status dnsmasq
● dnsmasq.service - A lightweight DHCP and caching DNS server
   Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2016-02-22 15:40:17 CET; 22s ago
     Docs: man:dnsmasq(8)
 Main PID: 363 (dnsmasq)
    Tasks: 1 (limit: 512)
   CGroup: /system.slice/dnsmasq.service
           └─363 /usr/bin/dnsmasq -k --enable-dbus --user=dnsmasq --pid-file

Feb 22 15:40:17 runeaudio dnsmasq[363]: DBus support enabled: connected to system bus
Feb 22 15:40:17 runeaudio dnsmasq[363]: warning: interface wlan0 does not currently exist
Feb 22 15:40:17 runeaudio dnsmasq-dhcp[363]: DHCP, IP range 192.168.2.2 -- 192.168.2.254, lease time 1d
Feb 22 15:40:17 runeaudio dnsmasq[363]: reading /etc/resolv.conf
Feb 22 15:40:17 runeaudio dnsmasq[363]: using nameserver 192.168.2.1#53
Feb 22 15:40:17 runeaudio dnsmasq[363]: bad address at /etc/hosts line 3
Feb 22 15:40:17 runeaudio dnsmasq[363]: read /etc/hosts - 2 addresses
Feb 22 15:40:29 runeaudio systemd[1]: Started A lightweight DHCP and caching DNS server.
Feb 22 15:40:29 runeaudio dnsmasq[363]: Maximum number of concurrent DNS queries reached (max: 150)
Feb 22 15:40:39 runeaudio dnsmasq[363]: Maximum number of concurrent DNS queries reached (max: 150)
mrcrowley
 
Posts: 50
Joined: 21 Jun 2016, 14:39

Re: The Raspberry Pi 3

Postby hondagx35 » 09 Feb 2017, 14:58

Hi mrcrowley,

I tried to modify resolv.conf to set nameserver 192.168.2.1, but reading from wikiarch, it seems that dhcpcd tends to overwrite /etc/resolv.conf by default, so I have to protect /etc/resolv.conf. To do this, append nohook resolv.conf to the dhcpcd config file. Otherwise It is also possible to write protect your resolv.conf:

This is nonsense, please do not follow this approach!

OK I did some work for you:
Your redis entries are
mrcrowley wrote:
Code: Select all
[root@runeaudio ~]# redis-cli hgetall AccessPoint
 1) "enabled"
 2) "1"
 3) "enable-NAT"
 4) "1"
 5) "ip-address"
 6) "192.168.2.1"
 7) "broadcast"
 8) "192.168.2.255"
 9) "ssid"
10) "RuneAudioAP"
11) "passphrase"
12) "RuneAudio"
13) "dhcp-range"
14) "192.168.2.2,192.168.2.254,24h"
15) "dhcp-option"
16) "option:dns-server,192.168.2.1"


........


I wrote:
hondagx35 wrote:.......
Let us use 192.168.2.xxx (it only has to be different from your local network).
Your redis entries have to look like this.
Code: Select all
root@runeaudio(rw):~# redis-cli hgetall AccessPoint
 1) "enabled"
 2) "1"
 3) "ip-address"
 4) "192.168.2.1"
 5) "broadcast"
 6) "192.168.2.255"
 7) "ssid"
 8) "RuneAudioAP"
 9) "passphrase"
10) "RuneAudio"
11) "dhcp-range"
12) "192.168.2.2,192.168.2.254,24h"
13) "dhcp-option-dns"
14) "192.168.2.1"
15) "dhcp-option-router"
16) "192.168.2.1"
17) "enable-NAT"
18) "1"


........


Fix your redis database entries and it will work as expected.

Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: The Raspberry Pi 3

Postby mrcrowley » 09 Feb 2017, 15:08

I have already done. Should I give
Code: Select all
chattr -i /etc/resolv.conf

to get back permission right ???

And how modify redis ??
mrcrowley
 
Posts: 50
Joined: 21 Jun 2016, 14:39

Re: The Raspberry Pi 3

Postby mrcrowley » 09 Feb 2017, 15:31

Code: Select all
redis-cli hset AccessPoint dhcp-option-dns "option:dns-server,192.168.2.1"


Code: Select all
redis-cli hset AccessPoint dhcp-option-router "option:dns-server,192.168.2.1"


???Confirm ??
mrcrowley
 
Posts: 50
Joined: 21 Jun 2016, 14:39

Re: The Raspberry Pi 3

Postby hondagx35 » 09 Feb 2017, 17:54

Hi,

???Confirm ??

Wait.

it seems that dhcpcd tends to overwrite /etc/resolv.conf by default

"dhcpcd" shouldn't run at all on your system.

What is the output from:
Code: Select all
systemctl status dhcpcd


If it says "running" you should stop and disable it.
Code: Select all
systemctl stop dhcpcd
systemctl disable dhcpcd


Also check the file /var/www/command/rune_SY_wrk.
The lines belonging to "dhcpcd" should be commented out.

mrcrowley wrote:I have already done. Should I give
Code: Select all
chattr -i /etc/resolv.conf

to get back permission right ???

...

Yes.


Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: The Raspberry Pi 3

Postby mrcrowley » 09 Feb 2017, 18:00

Code: Select all
# systemctl status dhcpcd
● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; disabled; vendor preset: disabled)
   Active: inactive (dead)


I try to modify Redis and now I got:
Code: Select all
# redis-cli hgetall AccessPoint
 1) "enabled"
 2) "1"
 3) "enable-NAT"
 4) "1"
 5) "ip-address"
 6) "192.168.2.1"
 7) "broadcast"
 8) "192.168.2.255"
 9) "ssid"
10) "RuneAudioAP"
11) "passphrase"
12) "zakkwylde2012"
13) "dhcp-range"
14) "192.168.2.2,192.168.2.254,24h"
15) "dhcp-option"
16) "option:dns-server,192.168.2.1"
17) "dhcp-option-dns"
18) "option:dns-server,192.168.2.1"
19) "dhcp-option-router"
20) "option:dns-server,192.168.2.1"


How can I delete 15) and 16) ???
mrcrowley
 
Posts: 50
Joined: 21 Jun 2016, 14:39

Re: The Raspberry Pi 3

Postby hondagx35 » 09 Feb 2017, 18:29

Hi,

you can delete entries with "hdel":
Code: Select all
redis-cli hdel AccessPoint dhcp-option


Frank
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

support RuneAudio Donate with PayPal

PreviousNext

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 7 guests