NXLog Community edition not finding modules

Tags:

#1 cmarsura

NXLog Community edition not finding modules

Hello,
I am getting an error loading modules with a trivial configuration.
The nxlog.conf configuration file:

# ############ BEGIN nxlog.conf
Panic Soft
#NoFreeOnExit TRUE

define ROOT     C:\Program Files\nxlog
#define CERTDIR  %ROOT%\cert
#define CONFDIR  %ROOT%\conf\nxlog.d
define LOGDIR   %ROOT%\data

define LOGFILE  %LOGDIR%\nxlog.log
LogFile %LOGFILE%


<Input in>
     Module  im_null
#     Module  im_file
</Input>
<Output out>
#    Module  om_tcp
#    Module  om_file
    Module  om_null
</Output>


# Connect input 'in' to output 'out'
 <Route DefaultRoute>
     Path        in => out
 </Route>

# ############ END nxlog.conf

The error:

2022-03-22 15:05:24 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:21
2022-03-22 15:05:24 ERROR module 'out' is not declared at c:\Program Files\nxlog\conf\nxlog.conf:27
2022-03-22 15:05:24 ERROR route DefaultRoute is not functional without output modules, ignored at c:\Program Files\nxlog\conf\nxlog.conf:27
2022-03-22 15:05:24 WARNING no routes defined!
2022-03-22 15:05:24 WARNING not starting unused module in

If I try to load more modules with following configuration, things gets more worse:

# ############ BEGIN nxlog.conf
Panic Soft
#NoFreeOnExit TRUE

define ROOT     C:\Program Files\nxlog
#define CERTDIR  %ROOT%\cert
#define CONFDIR  %ROOT%\conf\nxlog.d
define LOGDIR   %ROOT%\data

define LOGFILE  %LOGDIR%\nxlog.log
LogFile %LOGFILE%

#Moduledir %ROOT%\modules
#CacheDir  %ROOT%\data
#Pidfile   %ROOT%\data\nxlog.pid
#SpoolDir  %ROOT%\data


# Following processors give error "...ERROR Module missing at ..."
<Processor _proc_buffer>
    Module     pm_buffer
</Processor>
<Processor _proc_evcorr>
    Module          pm_evcorr
</Processor>
<Processor _proc_norepeat>
    Module      pm_norepeat
</Processor>
<Processor _proc_null>
    Module     pm_null
</Processor>
<Processor _proc_pattern>
    Module     pm_pattern>
</Processor>
<Processor _proc_transformer>
    Module     pm_transformer>
</Processor>


# Following inputs give error "...ERROR Module missing at ..."
<Input _im_exec>
    exec  im_exec
</Input>
<Input _im_module>
    Module  im_module
</Input>
<Input _im_file>
    file  im_file
</Input>
<Input _im_internal>
    internal  im_internal
</Input>
<Input _im_kernel>
    kernel  im_kernel
</Input>

# Following outputs give error "...ERROR Module missing at ..."
<Output _om_exec>
    Module  om_exec
</Output>
<Output _om_file>
    Module  om_file
</Output>
<Output _om_http>
    Module  om_http
</Output>
<Output _om_null>
    Module  om_null
</Output>
<Output _om_ssl>
    Module  om_ssl
</Output>
<Output _om_tcp>
    Module  om_tcp
</Output>
<Output _om_udp>
    Module  om_udp
</Output>

<Input in>
     Module  im_null
#     Module  im_file
</Input>
<Output out>
#    Module  om_tcp
#    Module  om_file
    Module  om_null
</Output>


# Connect input 'in' to output 'out'
 <Route DefaultRoute>
     Path        in => out
 </Route>

# ############ END nxlog.conf

The errors:

2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:21
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:24
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:27
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:30
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:33
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:36
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:42
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:45
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:48
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:51
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:54
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:59
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:62
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:65
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:68
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:71
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:74
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:77
2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:87
2022-03-22 15:07:55 ERROR module 'out' is not declared at c:\Program Files\nxlog\conf\nxlog.conf:93
2022-03-22 15:07:55 ERROR route DefaultRoute is not functional without output modules, ignored at c:\Program Files\nxlog\conf\nxlog.conf:93
2022-03-22 15:07:55 WARNING no routes defined!
2022-03-22 15:07:55 WARNING not starting unused module in

I get same errors on two 64 bit machines (Windows 10 and Windows Server 2012R2)
Tried with processmonitor.exe to see if nxlog-processor.exe fail to load the dll module but I do not see any load attempt.
I suspect that I must missing a macroscopic thing but am unable to spot it.

Using nxlog-ce-3.0.2272.msi Community Edition for Windows 64 bit.
Any hint will be appreciated.

Regards.
Carlo

#2 cmarsura
#1 cmarsura
NXLog Community edition not finding modules Hello, I am getting an error loading modules with a trivial configuration. The nxlog.conf configuration file: # ############ BEGIN nxlog.conf Panic Soft #NoFreeOnExit TRUE define ROOT C:\Program Files\nxlog #define CERTDIR %ROOT%\cert #define CONFDIR %ROOT%\conf\nxlog.d define LOGDIR %ROOT%\data define LOGFILE %LOGDIR%\nxlog.log LogFile %LOGFILE% <Input in> Module im_null # Module im_file </Input> <Output out> #  Module om_tcp #  Module om_file   Module om_null </Output> # Connect input 'in' to output 'out' <Route DefaultRoute> Path in => out </Route> # ############ END nxlog.conf The error: 2022-03-22 15:05:24 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:21 2022-03-22 15:05:24 ERROR module 'out' is not declared at c:\Program Files\nxlog\conf\nxlog.conf:27 2022-03-22 15:05:24 ERROR route DefaultRoute is not functional without output modules, ignored at c:\Program Files\nxlog\conf\nxlog.conf:27 2022-03-22 15:05:24 WARNING no routes defined! 2022-03-22 15:05:24 WARNING not starting unused module in If I try to load more modules with following configuration, things gets more worse: # ############ BEGIN nxlog.conf Panic Soft #NoFreeOnExit TRUE define ROOT C:\Program Files\nxlog #define CERTDIR %ROOT%\cert #define CONFDIR %ROOT%\conf\nxlog.d define LOGDIR %ROOT%\data define LOGFILE %LOGDIR%\nxlog.log LogFile %LOGFILE% #Moduledir %ROOT%\modules #CacheDir %ROOT%\data #Pidfile %ROOT%\data\nxlog.pid #SpoolDir %ROOT%\data # Following processors give error "...ERROR Module missing at ..." <Processor _proc_buffer>   Module pm_buffer </Processor> <Processor _proc_evcorr>   Module pm_evcorr </Processor> <Processor _proc_norepeat>   Module pm_norepeat </Processor> <Processor _proc_null>   Module pm_null </Processor> <Processor _proc_pattern>   Module pm_pattern> </Processor> <Processor _proc_transformer>   Module pm_transformer> </Processor> # Following inputs give error "...ERROR Module missing at ..." <Input _im_exec>   exec im_exec </Input> <Input _im_module>   Module im_module </Input> <Input _im_file>   file im_file </Input> <Input _im_internal>   internal im_internal </Input> <Input _im_kernel>   kernel im_kernel </Input> # Following outputs give error "...ERROR Module missing at ..." <Output _om_exec>   Module om_exec </Output> <Output _om_file>   Module om_file </Output> <Output _om_http>   Module om_http </Output> <Output _om_null>   Module om_null </Output> <Output _om_ssl>   Module om_ssl </Output> <Output _om_tcp>   Module om_tcp </Output> <Output _om_udp>   Module om_udp </Output> <Input in> Module im_null # Module im_file </Input> <Output out> #  Module om_tcp #  Module om_file   Module om_null </Output> # Connect input 'in' to output 'out' <Route DefaultRoute> Path in => out </Route> # ############ END nxlog.conf The errors: 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:21 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:24 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:27 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:30 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:33 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:36 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:42 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:45 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:48 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:51 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:54 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:59 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:62 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:65 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:68 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:71 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:74 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:77 2022-03-22 15:07:55 ERROR Module missing at c:\Program Files\nxlog\conf\nxlog.conf:87 2022-03-22 15:07:55 ERROR module 'out' is not declared at c:\Program Files\nxlog\conf\nxlog.conf:93 2022-03-22 15:07:55 ERROR route DefaultRoute is not functional without output modules, ignored at c:\Program Files\nxlog\conf\nxlog.conf:93 2022-03-22 15:07:55 WARNING no routes defined! 2022-03-22 15:07:55 WARNING not starting unused module in I get same errors on two 64 bit machines (Windows 10 and Windows Server 2012R2) Tried with processmonitor.exe to see if nxlog-processor.exe fail to load the dll module but I do not see any load attempt. I suspect that I must missing a macroscopic thing but am unable to spot it. Using nxlog-ce-3.0.2272.msi Community Edition for Windows 64 bit. Any hint will be appreciated. Regards. Carlo

Spotted the problem: while copying the code snippet from the pdf manual to the .conf file, I copied an invisible character (0xA0) present in the beginning of the 'module' directive. That character was cocking silently the NXLog parser. Duplicating that row to use it with other modules spreaded the error.

Fortunately, using the Notepad2 with 'Show Withespaces' enabled to edit the config file permitted me to find the character appearing as an innocently blank char.

Good luck. Carlo