syslog-ng: Plugin module not found … module=’afsql’

 I encountered the error

“Plugin module not found in ‘module-path’; module-path=’/lib64/syslog-ng’, module=’afsql’
this article describes how I fixed it.

After updating syslog-ng and restarting it this happened:

[root /etc] #>/etc/rc.d/init.d/syslog-ng restart
Stopping syslog-ng: [ OK ]
Plugin module not found in 'module-path'; module-path='/lib64/syslog-ng', module='afsql'
Starting syslog-ng: Plugin module not found in 'module-path'; module-path='/lib64/syslog-ng', module='afsql' [ OK ]

After some search I found that I had to install the syslog-ng-libdbi package for enabling SQL support:

[root /etc] #>yum install syslog-ng-libdbi
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile

Resolving Dependencies
--> Running transaction check
---> Package syslog-ng-libdbi.x86_64 0:3.2.5-4.el6 will be installed
--> Processing Dependency: libdbi.so.0()(64bit) for package: syslog-ng-libdbi-3.2.5-4.el6.x86_64
--> Running transaction check
---> Package libdbi.x86_64 0:0.8.3-4.el6 will be installed
--> Finished Dependency Resolution
...
...
...
Total download size: 70 k
Installed size: 144 k
Is this ok [y/N]: y
Downloading Packages:
(1/2):libdbi-.8.3-4.el6.x86_64.rpm
(2/2): syslog-ng-libdbi-.2.5-4.el6.x86_64.rpm
-----------------------------------------------------------------
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libdbi-0.8.3-4.el6.x86_64
  Installing : syslog-ng-libdbi-.2.5-4.el6.x86_64
  Verifying  : libdbi-0.8.3-4.el6.x86_64
  Verifying  : syslog-ng-libdbi-3.2.5-4.el6.x86_64
Installed:
  syslog-ng-libdbi.x86_64 0:3.2.5-4.el6
Dependency Installed:
  libdbi.x86_640:0.8.3-4.el6
Complete!

Restarting the syslog-ng deamon will now have no errors:

[root /etc] #>/etc/rc.d/init.d/syslog-ng restart
Stopping syslog-ng:                                        [  OK  ]
Starting syslog-ng:                                        [  OK  ]

0 $type={blogger}: