New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rsyslog v 8.24 taking long time to restart / start #2838
Comments
could we see your full rsyslog.conf (and any included files)?
It could be that you are having name lookup issues, but anything is pure
guesswork without seeing the config.
David Lang
|
Hi David,
Post that on restart of rsyslog gives . [root@DontUseMe ~]# time service rsyslog restart real 0m16.618s The issue is seen with bare metal VM. Also want to know, how to reload rsyslog.conf changes without restart of rsyslog |
One additional thing. If I try to run the rsyslogd in debug mode, 6763.827556657:main thread : rsyslogd 8.24.0 startup, module path '', cwd:/root We can see from 6763 it jumped to 6773. So it waited for that much time before proceeding further. |
is DNS working at the point that rsyslog is starting, this looks like a DNS
timeout as it's trying to find it's hostname
We have seen this before.
David Lang
|
Is your network up and running at the point that rsyslog is trying to start? if
not, it could be failing at that point.
|
Hi David, |
We are seeing a strange thing in RHEL7.4 [root@UseMe123 init.d]# hostnamectl [root@UseMe123 init.d]# time service rsyslog restart real 0m10.043s Then when we set the hostname.domainname for static hostname as [root@UseMe123 init.d]# time service rsyslog restart real 0m0.032s Then time taken is less. |
The issue seen is we need to configure as hostname.domainname for /etc/hostname. if we configure only hostname then again it takes more time to restart. Also, if transient name is present in hostnamectl status then also it takes more time to start. [root@UseMe1234 ~]# hostnamectl |
what is in /etc/hosts?
it looks like it's trying to resolve the pretty hostname, but it's trying to do
so by going out to the DNS server, and that isn't up yet so you have to wait for
it to timeout.
if /etc/hosts has both the short and long names in it you should not have this
problem.
I'm not familiar with hostnamectl and what it actually does.
David Lang
|
[root@UseMe1234 ~]# cat /etc/hosts [root@UseMe1234 ~]# cat /etc/hostname [root@UseMe1234 ~]# cat /proc/sys/kernel/hostname |
add UseMe1234 and UseMe1234.raju.com to your /etc/hosts file.
rsyslog is trying to lookup your hostname and since it's not in /etc/hosts, it's
going to DNS
…On Tue, 17 Jul 2018, rajubi1981 wrote:
Date: Tue, 17 Jul 2018 12:14:39 -0700
From: rajubi1981 ***@***.***>
Reply-To: rsyslog/rsyslog
<reply+0021b24f9684cbcd4ef0410a7803992217326c57b8e176ba92cf000000011766021
***@***.***>
To: rsyslog/rsyslog ***@***.***>
Cc: David Lang ***@***.***>, Comment ***@***.***>
Subject: Re: [rsyslog/rsyslog] rsyslog v 8.24 taking long time to restart /
start (#2838)
***@***.*** ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
***@***.*** ~]#
***@***.*** ~]# cat /etc/hostname
useme1234
***@***.*** ~]# cat /etc/resolv.conf
search raju.com
nameserver <DNS_IP4>
***@***.*** ~]#
***@***.*** ~]# cat /proc/sys/kernel/hostname
UseMe1234
***@***.*** ~]#
|
One question, if we do not add in the /etc/hosts then in DNS, how do we need to configure to get the hostname resolved. |
On Tue, 17 Jul 2018, rajubi1981 wrote:
One question, if we do not add in the /etc/hosts then in DNS, how do we need to configure to get the hostname resolved.
you need to have the network start before rsyslog so that DNS can function.
|
Why does rsyslog need DNS? I have mine only using localhost. |
by default it does a reverse lookup on the IP addresses of anything it receives
also, if you configure it to send anywhere, it's really useful to be able to
specify a hostname instead of just an IP address
during startup, it tries to lookup the hostname of the machine it's running on,
which triggers a DNS lookup by default
David Lang
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Expected behavior
rsyslog should start in minimal time.
Actual behavior
It is taking more than and show the result as below.
[root@local-host ~]# systemd-analyze blame | grep rsys
20.022s rsyslog.service
[root@local-host ~]# time service rsyslog restart
Redirecting to /bin/systemctl restart rsyslog.service
real 0m29.972s
user 0m0.013s
sys 0m0.011s
But , if we install it in non bare metal then it takes less time.
[root@local-host ~]# systemd-analyze blame | grep rsys
3ms rsyslog.service
[root@localhost ~]# time service rsyslog restart
Redirecting to /bin/systemctl restart rsyslog.service
real 0m0.031s
user 0m0.014s
sys 0m0.010s
[root@localhost ~]#
We tried upgrading the rsyslog to version rsyslog-8.24.0-16.el7_5.4.x86_64.rpm which is latest as per RHEL RPM repo, and even we that the issue remains.
Then , we tried installing the latest rsyslog (rsyslog-8.35.0-3.el7.x86_64.rpm ) from the link. @ http://rpms.adiscon.com/v8-stable/epel-7/x86_64/RPMS/ and with that, rsyslog does not start. It gives error.
Steps to reproduce the behavior
Install rsyslog in bare metal VM and install rsyslog.
Environment
[root@localhost ~]# rsyslogd -v
rsyslogd 8.24.0, compiled with:
PLATFORM: x86_64-redhat-linux-gnu
PLATFORM (lsb_release -d):
FEATURE_REGEXP: Yes
GSSAPI Kerberos 5 support: Yes
FEATURE_DEBUG (debug build, slow code): No
32bit Atomic operations supported: Yes
64bit Atomic operations supported: Yes
memory allocator: system default
Runtime Instrumentation (slow code): No
uuid support: Yes
Number of Bits in RainerScript integers: 64
See http://www.rsyslog.com for more information.
Can you please help us.
a) Why does it take more time to start rsyslog in bare metal VM ? How should I optimize it.
The text was updated successfully, but these errors were encountered: