I am not able to start dnsmasq on boot
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
These are the outputs I get when I type:
systemctl status dnsmasq
â dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-12-14 08:49:31 UTC; 54min ago
Process: 590 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)
Process: 569 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Dec 14 08:49:30 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Dec 14 08:49:30 raspberrypi dnsmasq[569]: dnsmasq: syntax check OK.
Dec 14 08:49:31 raspberrypi dnsmasq[590]: dnsmasq: failed to create listening socket for 10.0.20.1: Cannot assign requested address
Dec 14 08:49:31 raspberrypi systemd[1]: dnsmasq.service: Control process exited, code=exited status=2
Dec 14 08:49:31 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Dec 14 08:49:31 raspberrypi systemd[1]: dnsmasq.service: Unit entered failed state.
Dec 14 08:49:31 raspberrypi systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
It works fine when I start the service manually.
I have set a static ip like this:
sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=10.0.20.1/24
static routers=10.0.20.0
dnsmasq
add a comment |Â
up vote
1
down vote
favorite
These are the outputs I get when I type:
systemctl status dnsmasq
â dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-12-14 08:49:31 UTC; 54min ago
Process: 590 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)
Process: 569 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Dec 14 08:49:30 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Dec 14 08:49:30 raspberrypi dnsmasq[569]: dnsmasq: syntax check OK.
Dec 14 08:49:31 raspberrypi dnsmasq[590]: dnsmasq: failed to create listening socket for 10.0.20.1: Cannot assign requested address
Dec 14 08:49:31 raspberrypi systemd[1]: dnsmasq.service: Control process exited, code=exited status=2
Dec 14 08:49:31 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Dec 14 08:49:31 raspberrypi systemd[1]: dnsmasq.service: Unit entered failed state.
Dec 14 08:49:31 raspberrypi systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
It works fine when I start the service manually.
I have set a static ip like this:
sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=10.0.20.1/24
static routers=10.0.20.0
dnsmasq
The log files should give you more information as to what may be going wrong.
â Raman Sailopal
Dec 14 '17 at 10:08
2
The log clearly says: you don't have ip 10.0.20.1 on your interfaces.
â Ipor Sircer
Dec 14 '17 at 10:26
It was a typo there.I had corrected it.
â athul
Dec 14 '17 at 11:53
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
These are the outputs I get when I type:
systemctl status dnsmasq
â dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-12-14 08:49:31 UTC; 54min ago
Process: 590 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)
Process: 569 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Dec 14 08:49:30 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Dec 14 08:49:30 raspberrypi dnsmasq[569]: dnsmasq: syntax check OK.
Dec 14 08:49:31 raspberrypi dnsmasq[590]: dnsmasq: failed to create listening socket for 10.0.20.1: Cannot assign requested address
Dec 14 08:49:31 raspberrypi systemd[1]: dnsmasq.service: Control process exited, code=exited status=2
Dec 14 08:49:31 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Dec 14 08:49:31 raspberrypi systemd[1]: dnsmasq.service: Unit entered failed state.
Dec 14 08:49:31 raspberrypi systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
It works fine when I start the service manually.
I have set a static ip like this:
sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=10.0.20.1/24
static routers=10.0.20.0
dnsmasq
These are the outputs I get when I type:
systemctl status dnsmasq
â dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-12-14 08:49:31 UTC; 54min ago
Process: 590 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=2)
Process: 569 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
Dec 14 08:49:30 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Dec 14 08:49:30 raspberrypi dnsmasq[569]: dnsmasq: syntax check OK.
Dec 14 08:49:31 raspberrypi dnsmasq[590]: dnsmasq: failed to create listening socket for 10.0.20.1: Cannot assign requested address
Dec 14 08:49:31 raspberrypi systemd[1]: dnsmasq.service: Control process exited, code=exited status=2
Dec 14 08:49:31 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Dec 14 08:49:31 raspberrypi systemd[1]: dnsmasq.service: Unit entered failed state.
Dec 14 08:49:31 raspberrypi systemd[1]: dnsmasq.service: Failed with result 'exit-code'.
It works fine when I start the service manually.
I have set a static ip like this:
sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=10.0.20.1/24
static routers=10.0.20.0
dnsmasq
edited Dec 15 '17 at 18:06
Jeff Schaller
31.9k848109
31.9k848109
asked Dec 14 '17 at 10:06
athul
38137
38137
The log files should give you more information as to what may be going wrong.
â Raman Sailopal
Dec 14 '17 at 10:08
2
The log clearly says: you don't have ip 10.0.20.1 on your interfaces.
â Ipor Sircer
Dec 14 '17 at 10:26
It was a typo there.I had corrected it.
â athul
Dec 14 '17 at 11:53
add a comment |Â
The log files should give you more information as to what may be going wrong.
â Raman Sailopal
Dec 14 '17 at 10:08
2
The log clearly says: you don't have ip 10.0.20.1 on your interfaces.
â Ipor Sircer
Dec 14 '17 at 10:26
It was a typo there.I had corrected it.
â athul
Dec 14 '17 at 11:53
The log files should give you more information as to what may be going wrong.
â Raman Sailopal
Dec 14 '17 at 10:08
The log files should give you more information as to what may be going wrong.
â Raman Sailopal
Dec 14 '17 at 10:08
2
2
The log clearly says: you don't have ip 10.0.20.1 on your interfaces.
â Ipor Sircer
Dec 14 '17 at 10:26
The log clearly says: you don't have ip 10.0.20.1 on your interfaces.
â Ipor Sircer
Dec 14 '17 at 10:26
It was a typo there.I had corrected it.
â athul
Dec 14 '17 at 11:53
It was a typo there.I had corrected it.
â athul
Dec 14 '17 at 11:53
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
Dec 14 08:49:31 raspberrypi dnsmasq[590]: dnsmasq: failed to create listening socket for 10.0.20.1: Cannot assign requested address
This line indicates that your machine does not have the address 10.0.20.1
on your system when dnsmasq starts up. You need to reconfigure the systemd unit to start after this address has been added. This can be done by using systemd drop-ins. Create the directory /etc/systemd/system/dnsmasq.service.d
and the add the following to a file with a .conf
extension in that directory:
[Unit]
After=network-online.target
This assumes that your network is being brought online in a usual manner, and that it falls under the network-online.target
unit. If it does not then this will not work and you'll need to adjust accordingly.
I tried but it's not working still the result is same.I am using it in raspberry pi with raspbian stretch lite. "Afer" had "network.target" in /lib/systemd/system/dnsmasq.service .I have edited it there and not as you said in the /etc/systemd/system/dnsmasq.service.d .Hope that too is fine.
â athul
Dec 15 '17 at 6:27
add a comment |Â
up vote
0
down vote
accepted
I solved the issue
I removed giving ip like this
sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=10.0.20.1/24
static routers=10.0.20.0
And I gave ip to interfaces like this.
sudo nano /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto wlan0
iface wlan0 inet static
address 10.0.20.1
netmask 255.255.255.0
auto eth0
iface eth0 inet dhcp
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Dec 14 08:49:31 raspberrypi dnsmasq[590]: dnsmasq: failed to create listening socket for 10.0.20.1: Cannot assign requested address
This line indicates that your machine does not have the address 10.0.20.1
on your system when dnsmasq starts up. You need to reconfigure the systemd unit to start after this address has been added. This can be done by using systemd drop-ins. Create the directory /etc/systemd/system/dnsmasq.service.d
and the add the following to a file with a .conf
extension in that directory:
[Unit]
After=network-online.target
This assumes that your network is being brought online in a usual manner, and that it falls under the network-online.target
unit. If it does not then this will not work and you'll need to adjust accordingly.
I tried but it's not working still the result is same.I am using it in raspberry pi with raspbian stretch lite. "Afer" had "network.target" in /lib/systemd/system/dnsmasq.service .I have edited it there and not as you said in the /etc/systemd/system/dnsmasq.service.d .Hope that too is fine.
â athul
Dec 15 '17 at 6:27
add a comment |Â
up vote
0
down vote
Dec 14 08:49:31 raspberrypi dnsmasq[590]: dnsmasq: failed to create listening socket for 10.0.20.1: Cannot assign requested address
This line indicates that your machine does not have the address 10.0.20.1
on your system when dnsmasq starts up. You need to reconfigure the systemd unit to start after this address has been added. This can be done by using systemd drop-ins. Create the directory /etc/systemd/system/dnsmasq.service.d
and the add the following to a file with a .conf
extension in that directory:
[Unit]
After=network-online.target
This assumes that your network is being brought online in a usual manner, and that it falls under the network-online.target
unit. If it does not then this will not work and you'll need to adjust accordingly.
I tried but it's not working still the result is same.I am using it in raspberry pi with raspbian stretch lite. "Afer" had "network.target" in /lib/systemd/system/dnsmasq.service .I have edited it there and not as you said in the /etc/systemd/system/dnsmasq.service.d .Hope that too is fine.
â athul
Dec 15 '17 at 6:27
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Dec 14 08:49:31 raspberrypi dnsmasq[590]: dnsmasq: failed to create listening socket for 10.0.20.1: Cannot assign requested address
This line indicates that your machine does not have the address 10.0.20.1
on your system when dnsmasq starts up. You need to reconfigure the systemd unit to start after this address has been added. This can be done by using systemd drop-ins. Create the directory /etc/systemd/system/dnsmasq.service.d
and the add the following to a file with a .conf
extension in that directory:
[Unit]
After=network-online.target
This assumes that your network is being brought online in a usual manner, and that it falls under the network-online.target
unit. If it does not then this will not work and you'll need to adjust accordingly.
Dec 14 08:49:31 raspberrypi dnsmasq[590]: dnsmasq: failed to create listening socket for 10.0.20.1: Cannot assign requested address
This line indicates that your machine does not have the address 10.0.20.1
on your system when dnsmasq starts up. You need to reconfigure the systemd unit to start after this address has been added. This can be done by using systemd drop-ins. Create the directory /etc/systemd/system/dnsmasq.service.d
and the add the following to a file with a .conf
extension in that directory:
[Unit]
After=network-online.target
This assumes that your network is being brought online in a usual manner, and that it falls under the network-online.target
unit. If it does not then this will not work and you'll need to adjust accordingly.
answered Dec 14 '17 at 13:58
Patrick
47.9k11125176
47.9k11125176
I tried but it's not working still the result is same.I am using it in raspberry pi with raspbian stretch lite. "Afer" had "network.target" in /lib/systemd/system/dnsmasq.service .I have edited it there and not as you said in the /etc/systemd/system/dnsmasq.service.d .Hope that too is fine.
â athul
Dec 15 '17 at 6:27
add a comment |Â
I tried but it's not working still the result is same.I am using it in raspberry pi with raspbian stretch lite. "Afer" had "network.target" in /lib/systemd/system/dnsmasq.service .I have edited it there and not as you said in the /etc/systemd/system/dnsmasq.service.d .Hope that too is fine.
â athul
Dec 15 '17 at 6:27
I tried but it's not working still the result is same.I am using it in raspberry pi with raspbian stretch lite. "Afer" had "network.target" in /lib/systemd/system/dnsmasq.service .I have edited it there and not as you said in the /etc/systemd/system/dnsmasq.service.d .Hope that too is fine.
â athul
Dec 15 '17 at 6:27
I tried but it's not working still the result is same.I am using it in raspberry pi with raspbian stretch lite. "Afer" had "network.target" in /lib/systemd/system/dnsmasq.service .I have edited it there and not as you said in the /etc/systemd/system/dnsmasq.service.d .Hope that too is fine.
â athul
Dec 15 '17 at 6:27
add a comment |Â
up vote
0
down vote
accepted
I solved the issue
I removed giving ip like this
sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=10.0.20.1/24
static routers=10.0.20.0
And I gave ip to interfaces like this.
sudo nano /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto wlan0
iface wlan0 inet static
address 10.0.20.1
netmask 255.255.255.0
auto eth0
iface eth0 inet dhcp
add a comment |Â
up vote
0
down vote
accepted
I solved the issue
I removed giving ip like this
sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=10.0.20.1/24
static routers=10.0.20.0
And I gave ip to interfaces like this.
sudo nano /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto wlan0
iface wlan0 inet static
address 10.0.20.1
netmask 255.255.255.0
auto eth0
iface eth0 inet dhcp
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
I solved the issue
I removed giving ip like this
sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=10.0.20.1/24
static routers=10.0.20.0
And I gave ip to interfaces like this.
sudo nano /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto wlan0
iface wlan0 inet static
address 10.0.20.1
netmask 255.255.255.0
auto eth0
iface eth0 inet dhcp
I solved the issue
I removed giving ip like this
sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=10.0.20.1/24
static routers=10.0.20.0
And I gave ip to interfaces like this.
sudo nano /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto wlan0
iface wlan0 inet static
address 10.0.20.1
netmask 255.255.255.0
auto eth0
iface eth0 inet dhcp
answered Dec 15 '17 at 17:27
athul
38137
38137
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f410833%2fi-am-not-able-to-start-dnsmasq-on-boot%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
The log files should give you more information as to what may be going wrong.
â Raman Sailopal
Dec 14 '17 at 10:08
2
The log clearly says: you don't have ip 10.0.20.1 on your interfaces.
â Ipor Sircer
Dec 14 '17 at 10:26
It was a typo there.I had corrected it.
â athul
Dec 14 '17 at 11:53