Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 585436

Summary: Syslog-ng starts too long when net.* scripts are using for network
Product: Gentoo Linux Reporter: Sergey Torokhov <torokhov-s-a>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Sergey Torokhov 2016-06-09 07:36:21 UTC
I installed Gentoo to VirtualBox and choosed net.* scripts to manipulate my network by adding it to autorun as "rc-update add net.eth0 default". My  "/etc/conf.d/net" file contais only "config_eth0=«dhcp»", "dhcpcd" package is installed without adding it to any runlevel of rc-update. VirtualBox's build-in DHCP-server is used for recieving IP-address. Also empty file "/etc/udev/rules.d/80-net-name-slot.rules" is created to prevent renaming eth0 interface.

During system's startup eth0 successfully receives IP address from DHCP-server. But then it pause boot process for a while on "Cheking your config file /etc/syslog-ng/syslog-ng.conf" and then again a few minutes on starting "syslog-ng" service. After the boot process continue with some pausing again after appearing of "This is <hostname>" string and then "login" invitaion appears.

If I delete "net.eth0" from rc-update runlevels and add "dhcpcd" instead of it ("rc-update add dhcpcd default") then eth0 also recive IP-address but systemlog-ng starts quickly without any continuous delay.

I also tried to switch on "rc-need net.eth0" and "rc-need net" options in "/etc/conf.d/syslog-ng" and also try "rc_intreractive=YES" mode in "/etc/rc.conf" but it didn't give any results.

app-admin/syslog-ng-3.7.3 in installed.

Should I give any additional information?

Reproducible: Always
Comment 1 Sergey Torokhov 2016-06-09 10:13:27 UTC
The problem seems to be resolved by adding "127.0.0.2 MYHOSTNAME.domain MYHOSTNAME" string to the file "/etc/hosts". Now systemlog-ng doesn't prevent a quick boot of system. Where "MYHOSTNAME" is the hostname of my virtualbox gentoo machine.

Is it obligatory to have any mentions of current hostname in "/etc/hosts" file while setting up the network?
Comment 2 Sergey Torokhov 2016-06-15 06:47:02 UTC
The more correct solution is that using syslog-ng with "net.*" scripts requires initial setting up of "/etc/hosts" file as described in the handbook: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/System#The_hosts_file

something like:
# This defines the current system and must be set
127.0.0.1     tux.homenetwork tux localhost
::1           tux.homenetwork tux localhost

where "tux" is the hostname that used in /etc/cond.f/hostname (hostname="tux")


P.S.
Also this initial setting up is required for successful starting of xorg-server by "startx" command.
There is no information about it in https://wiki.gentoo.org/wiki/Xorg/Guide).

Maybe some handbook and wiki editing may be helpful to clarify that network configuring and especially of "/etc/hosts" is necessary to correct working of such service as System Logging and Xorg-Server.