Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] rc fails to start dovecot and nginx
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
skiwarz
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2014
Posts: 128

PostPosted: Wed May 11, 2016 12:50 am    Post subject: [solved] rc fails to start dovecot and nginx Reply with quote

I have a server running nginx, postfix, and dovecot. Whenever I restart the system, I get this error:
Code:
 * Bringing up interface enp0s25
 *   dhcp ...
 *     Running dhcpcd ...
enp0s25: waiting for carrier
enp0s25: carrier acquired
enp0s25: adding address xxxxxxxxxx
DUID xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
enp0s25: IAID xxxxxxxxxxx
enp0s25: rebinding lease of xxxxxxxxxxxxxx
enp0s25: soliciting an IPv6 router
enp0s25: Router Advertisement from xxxxxxxxxxxxxxxxxxxxxxx
enp0s25: adding address xxxxxxxxxxxxxxxxxxxxxxxxxxx
enp0s25: adding route to xxxxxxxxxxxxxxxxx
enp0s25: adding default route via xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
enp0s25: requesting DHCPv6 information
forked to background, child pid xxxx
 [ ok ]
 *     received address
 [ ok ]
 * Starting dovecot ...
Error: bind(xxxxxxxxxxxxx) failed: Cannot assign requested address
Error: service(imap-login): listen(xxxxxxxxxxxxxxx) failed: Cannot assign requested address
Error: bind(xxxxxxxxxxxxxxxx) failed: Cannot assign requested address
Error: service(imap-login): listen(xxxxxxxxxxxxxxxxxx) failed: Cannot assign requested address
Fatal: Failed to start listeners
 * start-stop-daemon: failed to start `/usr/sbin/dovecot'
 [ !! ]
 * ERROR: dovecot failed to start
 * Starting murmur ...
 [ ok ]
 * Mounting network filesystems ...
 [ ok ]
 * Checking nginx' configuration ...
nginx: [emerg] bind() to xxxxxxxxxxxxxxxx failed (99: Cannot assign requested address)
nginx: configuration file /etc/nginx/nginx.conf test failed
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] bind() to xxxxxxxxxxxxxxxx failed (99: Cannot assign requested address)
nginx: configuration file /etc/nginx/nginx.conf test failed
 * failed, please correct errors above
 [ !! ]
 * ERROR: nginx failed to start
 * Starting postfix  ...
 [ ok ]


Dovecot and nginx fail at different times. That is, sometimes one of them will start and one fails, or else they will both fail. I can manually start them after logging in, using "/etc/init.d/[dovecot or nginx] start" and it works just fine.
I have both of these services set to
Code:
listen=xxxxxxxxxx
in their appropriate config files.
To me it seems like rc is starting them before dhcpcd has completed its setup of the network.
Any suggestions?


Last edited by skiwarz on Wed May 11, 2016 6:07 am; edited 1 time in total
Back to top
View user's profile Send private message
skiwarz
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2014
Posts: 128

PostPosted: Wed May 11, 2016 6:07 am    Post subject: Reply with quote

I switched over to a static ip, and everything works now. So I think dhcpcd just didn't have enough time to get the ip assigned.
If anyone cares, I used this guide to set up static ips: https://wiki.gentoo.org/wiki/Handbook:X86/Full/Networking
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum