View previous topic :: View next topic |
Author |
Message |
Oniryczny Guru


Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Fri Oct 28, 2016 8:22 am Post subject: Checking your configfile (/etc/syslog-ng/syslog-ng... STUCK |
|
|
Hello
kernel 4.1.15 x86-64
openrc
grub2
System boots up, runs scripts and stucks on [u]Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...
it didn't move forward by the whole night so I turned it off, disk OK (no errors)
Every start ends up on this message
What can I do? _________________ cogito ergo sum |
|
Back to top |
|
 |
DawgG l33t


Joined: 17 Sep 2003 Posts: 878
|
Posted: Fri Oct 28, 2016 9:38 am Post subject: |
|
|
i suggest you remove syslog-ng from the relevant (default) runlevel (so it does not block the whole system) and check/fix its configfile. if the init-script gets stuck completely shows some help.
GOOD LUCK! _________________ DUMM KLICKT GUT. |
|
Back to top |
|
 |
Oniryczny Guru


Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Fri Oct 28, 2016 10:39 am Post subject: |
|
|
can I edit a file (which one) from other linux and disable syslog-ng? _________________ cogito ergo sum |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31546 Location: here
|
Posted: Fri Oct 28, 2016 11:01 am Post subject: |
|
|
Oniryczny wrote: | can I edit a file (which one) from other linux and disable syslog-ng? |
Yes you can boot from livecd, mounting the necessary filesystems and entering the new environment. At this point you can remove from runlevel syslog-ng. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
Oniryczny Guru


Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Fri Oct 28, 2016 11:05 am Post subject: |
|
|
I mean... I connect the hard disk to another computer already running linux and I edit a file (disabling syslog-ng) _________________ cogito ergo sum |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31546 Location: here
|
Posted: Fri Oct 28, 2016 11:38 am Post subject: |
|
|
Oniryczny wrote: | I mean... I connect the hard disk to another computer already running linux and I edit a file (disabling syslog-ng) |
For edit a file is ok _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
Oniryczny Guru


Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Fri Oct 28, 2016 11:49 am Post subject: |
|
|
I still want to know which file should I edit? _________________ cogito ergo sum |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31546 Location: here
|
Posted: Fri Oct 28, 2016 1:43 pm Post subject: |
|
|
Oniryczny wrote: | I still want to know which file should I edit? |
The configurations files for syslog-ng are /etc/syslog-ng/syslog-ng.conf and /etc/conf.d/syslog-ng.
For remove manually service from runlevel, I think but I'm not sure, you need to remove file (it's a symlink) /etc/runlevels/default/syslog-ng. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
Tony0945 Watchman

Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Oct 28, 2016 2:26 pm Post subject: |
|
|
Oniryczny wrote: | I still want to know which file should I edit? |
You probably have an error in /etc/syslog-ng/syslog-ng.conf. I don't know which version of OpenRC you are running. I am deliberately running an earlier version, because some errors will cause later versions to fail. You want to execute "rc-update del sys-log-ng". If you boot your install media and chroot into your installation, you can do this.
Once you can boot, try running "/etc/init.d/syslog-ng start" If there is a configuration error, it should tell you and also will tell you which file and line has the error.
AFAIK, you can try that in your chroot with "/etc/init.d/syslog-ng restart" |
|
Back to top |
|
 |
Oniryczny Guru


Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Fri Oct 28, 2016 3:45 pm Post subject: |
|
|
I was still asking about something else than chrooting but anyway thank you  _________________ cogito ergo sum |
|
Back to top |
|
 |
Tony0945 Watchman

Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Oct 28, 2016 4:52 pm Post subject: |
|
|
chrooting is easier than dismantling your PC and putting the drive in another machine. Once it's in the other machine you have to chroot anyway.
But, if you are dead set on it, remove the hard drive, put it in another machine, mount it, delete the symlink as fedeliallalinea said, then unmount it, shut down the other machine, put your hard drive back, boot up and once it's booted, try to start syslog-ng manually, and as I said, it should give you a message indicating where the error is. If it hangs again, re-emerge syslog-ng. |
|
Back to top |
|
 |
Oniryczny Guru


Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Sat Oct 29, 2016 8:51 pm Post subject: |
|
|
Okay
I deleted syslog-ng from runlewel (deleting symlink was much easier than chrooting)
System boots up and I can manually start syslog without any error
but adding it back to runlevel hangs again (I don't know what's wrong if it starts manually) _________________ cogito ergo sum |
|
Back to top |
|
 |
Tony0945 Watchman

Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Sat Oct 29, 2016 10:12 pm Post subject: |
|
|
Does rc-update|grep syslog-ng indicate default or some other runlevel? Which version of OpenRC? |
|
Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31546 Location: here
|
Posted: Sun Oct 30, 2016 7:57 am Post subject: |
|
|
Here a similar problem _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
 |
Oniryczny Guru


Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Sun Oct 30, 2016 9:20 am Post subject: |
|
|
Code: | # eix -I openrc
[I] sys-apps/openrc
Available versions: 0.17 0.18.4 0.19.1 0.21.7 ~0.22.1 ~0.22.2 **9999 {audit debug ncurses +netifrc newnet pam prefix selinux static-libs tools unicode KERNEL="FreeBSD linux"}
Installed versions: 0.21.7(21:47:05 19.09.2016)(ncurses netifrc pam static-libs unicode -audit -debug -newnet -prefix -selinux -tools KERNEL="linux -FreeBSD")
Homepage: https://github.com/openrc/openrc/
Description: OpenRC manages the services, startup and shutdown of a host
# |
openrc doesn't exist in any runlevel now, but it was in the default one only... _________________ cogito ergo sum |
|
Back to top |
|
 |
Tony0945 Watchman

Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Sun Oct 30, 2016 9:30 pm Post subject: |
|
|
Oniryczny wrote: | #openrc doesn't exist in any runlevel now, but it was in the default one only... | I don't understand that comment. BTW, are you running FreeBSD or Linux?
Since you are running unstable OpenRC, I would emerge the stable as follows and see if it fixes the problem. Unfortunately, you will have to chroot.
Code: | emerge -a1v =sys-apps/openrc-0.17 | If it works then you know the culprit is OpenRC.
This is just a temporary change that will be undone at the next update or emerge. Not guaranteed to even boot, but it's the version I'm running. Code: | X3 ~ # uname -a
Linux X3 4.8.3-gentoo #1 SMP Sat Oct 22 15:17:25 CDT 2016 x86_64 AMD Athlon(tm) II X3 440 Processor AuthenticAMD GNU/Linux
X3 ~ # equery w openrc
/usr/portage/sys-apps/openrc/openrc-0.17.ebuild |
|
|
Back to top |
|
 |
Oniryczny Guru


Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Mon Oct 31, 2016 8:37 am Post subject: |
|
|
I thought openrc-0.21.7 is stable...
I'm running normal gentoo (x86-64) kernel 4.1.15 _________________ cogito ergo sum |
|
Back to top |
|
 |
Tony0945 Watchman

Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Mon Oct 31, 2016 3:02 pm Post subject: |
|
|
Oniryczny wrote: | I thought openrc-0.21.7 is stable...
I'm running normal gentoo (x86-64) kernel 4.1.15 |
You're right! I need to update portage. Nevertheless, try 0.13 as a test. Something's wacky. |
|
Back to top |
|
 |
Oniryczny Guru


Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
Posted: Fri Nov 25, 2016 6:39 am Post subject: |
|
|
Now, there's a new version of openrc (0.22)
But still doesn't work on my machine... _________________ cogito ergo sum |
|
Back to top |
|
 |
Tony0945 Watchman

Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Fri Nov 25, 2016 2:04 pm Post subject: |
|
|
Stumped. |
|
Back to top |
|
 |
ct85711 Veteran

Joined: 27 Sep 2005 Posts: 1791
|
Posted: Fri Nov 25, 2016 7:35 pm Post subject: |
|
|
now you mentioned it seems to work when you start syslog manually, but did you verify that it is really working?
This site, gives some good tips on how to troubleshoot syslog https://pzolee.blogs.balabit.com/2009/12/troubleshooting-and-debugging-syslog-ng/
One thing it says, which will be helpful is running
This will output a lot of information, to your regular console and make syslog so it runs in the foreground. Another nice about this command is that it will let you know, if system log is receives a message and what it does with it. If it crashes, then obviously this will let you know of that too and help identify if it's a config issue or an issue with syslog it's self...
Quote: | You can also use other useful programs for testing syslog-ng.
To send logs to “/dev/log”, use the logger. This program exists on the most platforms.
For example:
~$ logger “message part” |
I don't know if this logger will be available, as I am not on my linux machine right now, but if you do have it; it can send a message to have it logged...
Otherwise, most times syslog will log when a user logs in (i.e. in another console su into root, possibly wrong password, etc...).
I don't have much experience with sudo if those are logged, hence why I don't mention that...
Now from experience, 2 common things can cause syslog throw a fit, is config-version, and use-dns()...
Syslog-ng Documentation wrote: | use-dns()
Type: yes, no, persist_only
Default: yes
Description: Enable or disable DNS usage. The persist_only option attempts to resolve hostnames locally from file (for example from /etc/hosts). The syslog-ng OSE application blocks on DNS queries, so enabling DNS may lead to a Denial of Service attack. To prevent DoS, protect your syslog-ng network endpoint with firewall rules, and make sure that all hosts which may get to syslog-ng are resolvable. This option can be specified globally, and per-source as well. The local setting of the source overrides the global option if available. |
Obviously, if it's unable to resolve hostname (because network isn't up to query the DNS server), this is going to make syslog-ng seem like it hangs due to having to wait for the resolver timeout and fail...
So you may want to put this into your config file so it doesn't try resolving hostnames...
I'll leave this up to you to figure out where to put it...
Here's a link to syslog's documentation... https://www.balabit.com/documents/syslog-ng-ose-latest-guides/en/syslog-ng-ose-guide-admin/html-single/index.html |
|
Back to top |
|
 |
Oniryczny Guru


Joined: 01 Dec 2011 Posts: 419 Location: Poland
|
|
Back to top |
|
 |
gr3m1in n00b


Joined: 22 Mar 2010 Posts: 39 Location: Poland
|
Posted: Fri Nov 01, 2019 11:14 pm Post subject: |
|
|
This topic is pretty old, however I've just faced exactly the same problem.
I've googled for the solution with no luck, so I'm writing this.
I think that I found the solution, maybe it will help someone.
Since there is somewhat similar behavior with sddm some time ago, I tried to just press random keys on the keyboard while syslog-ng was in "hanged" state.
It appeared that it helps, so I guessed that syslog-ng now requires an entropy generator as well as sddm did.
Having haveged already installed for sddm, and having it and syslog-ng both at boot runlevel, I just forced haveged to start before syslog-ng with
Code: | rc_syslog_ng_need="haveged" |
at /etc/rc.conf.
That worked at once.
I hope it was useful. |
|
Back to top |
|
 |
Stolz Moderator


Joined: 19 Oct 2003 Posts: 3028 Location: Hong Kong
|
Posted: Thu Nov 07, 2019 11:55 am Post subject: |
|
|
I was having the same issue. syslog-ng was frozen during boot waiting for entropy. I had to move the mouse or press keys to unfreeze it. In my case I didn't have to install Haveged, I just enabled one kernel option: CONFIG_RANDOM_TRUST_CPU=y |
|
Back to top |
|
 |
cbx550f Tux's lil' helper

Joined: 11 Jun 2004 Posts: 113 Location: Ontario, Canada
|
Posted: Fri Nov 08, 2019 7:18 am Post subject: |
|
|
Stolz wrote: | I was having the same issue. syslog-ng was frozen during boot waiting for entropy. I had to move the mouse or press keys to unfreeze it. In my case I didn't have to install Haveged, I just enabled one kernel option: CONFIG_RANDOM_TRUST_CPU=y |
Stolz: I owe you a beer! I had the same issue (originally it was stuck when starting syslog-ng, but after disabling that it was stuck on something else... forgive me for forgetting what that was). Your tip there saved me a ton of bother.
Changed kernel config and all is good! Thanks man!
For reference, under "Device Drivers" in kernel config, I selected "Trust the CPU manufacturer to initialize Linux's CRNG" (4.19 kernel)
Cheers _________________ I think, therefore I am wrong. |
|
Back to top |
|
 |
|