Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: I saw these in logs how can I fix it [openrc boot log] (Read 505 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

I saw these in logs how can I fix it [openrc boot log]

syslog-ng         |[2023-08-11T18:55:02.137797] python: private virtualenv is not initialized, use the `syslog-ng-update-virtualenv' script to initialize it or
make sure all required Python dependencies are available in the system Python installation; path='/var/lib/syslog-ng/python-venv'
syslog-ng         |[2023-08-11T18:55:02.315480] Error evaluating global Python block; exception='ModuleNotFoundError: No module named \'requests\''
syslog-ng         |Traceback (most recent call last):
syslog-ng         |  File "/etc/syslog-ng/syslog-ng.conf{python-global-code:25}", line 3, in <module>
syslog-ng         |    import syslogng.modules.hypr
syslog-ng         |  File "/usr/lib/syslog-ng/python/syslogng/modules/hypr/__init__.py", line 48, in <module>
syslog-ng         |    import requests
syslog-ng         |ModuleNotFoundError: No module named 'requests'
syslog-ng         |Error parsing python, Error processing global python block in /usr/lib/syslog-ng/python/syslogng/modules/hypr/scl/hypr.conf:25:1-25:7:
syslog-ng         |20      # OpenSSL libraries as published by the OpenSSL project. See the file
syslog-ng         |21      # COPYING for details.
syslog-ng         |22      #
syslog-ng         |23      #############################################################################
syslog-ng         |24
syslog-ng         |25----> python {
syslog-ng         |25----> ^^^^^^
syslog-ng         |26
syslog-ng         |27      import syslogng.modules.hypr
syslog-ng         |28
syslog-ng         |29      syslogng.modules.hypr.register_hypr_config_generator()
syslog-ng         |30
syslog-ng         |
syslog-ng         |Included from /usr/share/syslog-ng/include/scl/python/python-modules.conf:25:1-25:1:
syslog-ng         |
syslog-ng         |Included from /etc/syslog-ng/scl.conf:31:1-31:1:
syslog-ng         |26      #
syslog-ng         |27
syslog-ng         |28      @module appmodel
syslog-ng         |29
syslog-ng         |30      @include 'scl/*/*.conf'
syslog-ng         |31---->
syslog-ng         |31----> ^
syslog-ng         |32      @define java-module-dir "`module-install-dir`/java-modules"
syslog-ng         |
syslog-ng         |Included from /etc/syslog-ng/syslog-ng.conf:3:1-3:1:
syslog-ng         |1       @version: 4.2
syslog-ng         |2       @include "scl.conf"
syslog-ng         |3-----> #
syslog-ng         |3-----> ^
syslog-ng         |4       # /etc/syslog-ng/syslog-ng.conf
syslog-ng         |5       #
syslog-ng         |6
syslog-ng         |7       options {
syslog-ng         |8         stats(freq(0));
syslog-ng         |
syslog-ng         | * Configuration error. Please fix your configfile (/etc/syslog-ng/syslog-ng.conf)
 [ !! ]
syslog-ng         | * ERROR: syslog-ng failed to start

Re: I saw these in logs how can I fix it [openrc boot log]

Reply #1
Install python-requests.
Or there are steps you can take to give syslog-ng its own python venv.
In my rc.log
Quote
python: private virtualenv is not initialized, use the `syslog-ng-update-virtualenv' script to initialize it or make sure all required Python dependencies are available in the system Python installation; path='/var/lib/syslog-ng/python-venv'
But syslog-ng works. I've yet to look into how to make the warning go away ?

Re: I saw these in logs how can I fix it [openrc boot log]

Reply #2
Thanks for helping and replying it works nice with no error log :D