Hello, at AIX6.1 system, get some problem.
config file:
## This is a sample configuration file. See the nxlog reference manual about the
## configuration options. It should be installed locally under
## /usr/share/doc/nxlog-ce/ and is also available online at
## http://nxlog.org/nxlog-docs/en/nxlog-reference-manual.html
########################################
# Global directives #
########################################
User nxlog
Group nxlog
LogFile /var/log/nxlog/nxlog.log
LogLevel INFO
########################################
# Modules #
########################################
<Extension _syslog>
Module xm_syslog
</Extension>
<Extension multiline>
Module xm_multiline
HeaderLine /^\w{3}\s\w{3}\s\d{2}\s\d{2}:\d{2}:\d{2}\s\d{4}/
</Extension>
<Input oerrorin1>
Module im_file
File '/u01/app/oracle/diag/rdbms/oraywsoudb/oraywsoudb/trace/alert_oraywsoudb.log'
InputType multiline
SavePos TRUE
ReadFromLast FALSE
</Input>
<Output udpout>
Module om_udp
Host 10.1.227.45
Port 514
</Output>s
########################################
# Routes #
########################################
<Route 1>
Path oerrorin1 =>udpout
</Route>
then i get the log:
2017-03-17 16:16:39 INFO nxlog-ce-2.8.1248 started
2017-03-17 16:16:39 ERROR failed to open /u01/app/oracle/diag/rdbms/oraywsoudb/oraywsoudb/trace/alert_oraywsoudb.log;Permission denied
2017-03-17 16:16:41 ERROR apr_stat failed on file /u01/app/oracle/diag/rdbms/oraywsoudb/oraywsoudb/trace/alert_oraywsoudb.log;Permission denied
2017-03-17 16:16:47 ERROR last message repeated 2 times
2017-03-17 16:16:55 ERROR apr_stat failed on file /u01/app/oracle/diag/rdbms/oraywsoudb/oraywsoudb/trace/alert_oraywsoudb.log;Permission denied
2017-03-17 16:17:11 ERROR apr_stat failed on file /u01/app/oracle/diag/rdbms/oraywsoudb/oraywsoudb/trace/alert_oraywsoudb.log;Permission denied
2017-03-17 16:17:43 ERROR apr_stat failed on file /u01/app/oracle/diag/rdbms/oraywsoudb/oraywsoudb/trace/alert_oraywsoudb.log;Permission denied
2017-03-17 16:18:47 ERROR apr_stat failed on file /u01/app/oracle/diag/rdbms/oraywsoudb/oraywsoudb/trace/alert_oraywsoudb.log;Permission denied
2017-03-17 16:20:55 ERROR apr_stat failed on file /u01/app/oracle/diag/rdbms/oraywsoudb/oraywsoudb/trace/alert_oraywsoudb.log;Permission denied
2017-03-17 16:25:11 ERROR apr_stat failed on file /u01/app/oracle/diag/rdbms/oraywsoudb/oraywsoudb/trace/alert_oraywsoudb.log;Permission denied
2017-03-17 16:34:16 DEBUG reading config cache from /var/spool/nxlog/configcache.dat
2017-03-17 16:34:16 DEBUG Setting up module '_syslog' using xm_syslog
2017-03-17 16:34:16 DEBUG module _syslog has 4 exported functions
2017-03-17 16:34:16 DEBUG registering function syslog_facility_value
2017-03-17 16:34:16 DEBUG function 'syslog_facility_value' registered
2017-03-17 16:34:16 DEBUG registering function syslog_facility_string
2017-03-17 16:34:16 DEBUG function 'syslog_facility_string' registered
2017-03-17 16:34:16 DEBUG registering function syslog_severity_value
2017-03-17 16:34:16 DEBUG function 'syslog_severity_value' registered
2017-03-17 16:34:16 DEBUG registering function syslog_severity_string
2017-03-17 16:34:16 DEBUG function 'syslog_severity_string' registered
2017-03-17 16:34:16 DEBUG module _syslog has 9 exported procedures
2017-03-17 16:34:16 DEBUG registering procedure parse_syslog
2017-03-17 16:34:16 DEBUG procedure 'parse_syslog' registered
2017-03-17 16:34:16 DEBUG registering procedure parse_syslog
2017-03-17 16:34:16 DEBUG procedure 'parse_syslog' registered
2017-03-17 16:34:16 DEBUG registering procedure parse_syslog_bsd
2017-03-17 16:34:16 DEBUG procedure 'parse_syslog_bsd' registered
2017-03-17 16:34:16 DEBUG registering procedure parse_syslog_bsd
2017-03-17 16:34:16 DEBUG procedure 'parse_syslog_bsd' registered
2017-03-17 16:34:16 DEBUG registering procedure parse_syslog_ietf
2017-03-17 16:34:16 DEBUG procedure 'parse_syslog_ietf' registered
2017-03-17 16:34:16 DEBUG registering procedure parse_syslog_ietf
2017-03-17 16:34:16 DEBUG procedure 'parse_syslog_ietf' registered
2017-03-17 16:34:16 DEBUG registering procedure to_syslog_bsd
2017-03-17 16:34:16 DEBUG procedure 'to_syslog_bsd' registered
2017-03-17 16:34:16 DEBUG registering procedure to_syslog_ietf
2017-03-17 16:34:16 DEBUG procedure 'to_syslog_ietf' registered
2017-03-17 16:34:16 DEBUG registering procedure to_syslog_snare
2017-03-17 16:34:16 DEBUG procedure 'to_syslog_snare' registered
2017-03-17 16:34:16 DEBUG Setting up module 'multiline' using xm_multiline
2017-03-17 16:34:16 DEBUG Setting up module 'oerrorin1' using im_file
2017-03-17 16:34:16 DEBUG module oerrorin1 has 1 exported functions
2017-03-17 16:34:16 DEBUG registering function file_name
2017-03-17 16:34:16 DEBUG function 'file_name' registered
2017-03-17 16:34:16 DEBUG module oerrorin1 has 0 exported procedures
2017-03-17 16:34:16 DEBUG FlowControl enabled for oerrorin1
2017-03-17 16:34:16 DEBUG Setting up module 'udpout' using om_udp
2017-03-17 16:34:16 DEBUG Setting up module 'fileout2' using om_file
2017-03-17 16:34:16 DEBUG module fileout2 has 2 exported functions
2017-03-17 16:34:16 DEBUG registering function file_name
2017-03-17 16:34:16 DEBUG function 'file_name' registered
2017-03-17 16:34:16 DEBUG registering function file_size
2017-03-17 16:34:16 DEBUG function 'file_size' registered
2017-03-17 16:34:16 DEBUG module fileout2 has 2 exported procedures
2017-03-17 16:34:16 DEBUG registering procedure rotate_to
2017-03-17 16:34:16 DEBUG procedure 'rotate_to' registered
2017-03-17 16:34:16 DEBUG registering procedure reopen
2017-03-17 16:34:16 DEBUG procedure 'reopen' registered
2017-03-17 16:34:16 DEBUG CONFIG: _syslog
2017-03-17 16:34:16 DEBUG inputreader 'Syslog_TLS' registered
2017-03-17 16:34:16 DEBUG Inputreader 'Syslog_TLS' registered
2017-03-17 16:34:16 DEBUG outputwriter 'Syslog_TLS' registered
2017-03-17 16:34:16 DEBUG Outputwriter 'Syslog_TLS' registered
2017-03-17 16:34:16 DEBUG CONFIG: multiline
2017-03-17 16:34:16 DEBUG inputreader 'multiline' registered
2017-03-17 16:34:16 DEBUG Inputreader 'multiline' registered
2017-03-17 16:34:16 DEBUG CONFIG: oerrorin1
2017-03-17 16:34:16 DEBUG adding string [/u01/app/oracle/diag/rdbms/oraywsoudb/oraywsoudb/trace/alert_oraywsoudb.log]
2017-03-17 16:34:16 DEBUG string literal declared at line 29, character 86 in /etc/nxlog.conf
2017-03-17 16:34:16 DEBUG literal
2017-03-17 16:34:16 DEBUG parsed expression
2017-03-17 16:34:16 DEBUG CONFIG: udpout
2017-03-17 16:34:16 DEBUG CONFIG: fileout2
2017-03-17 16:34:16 DEBUG adding string [/var/log/logmsg2.txt]
2017-03-17 16:34:16 DEBUG string literal declared at line 43, character 27 in /etc/nxlog.conf
2017-03-17 16:34:16 DEBUG literal
2017-03-17 16:34:16 DEBUG parsed expression
2017-03-17 16:34:16 DEBUG pidfile /var/run/nxlog/nxlog.pid removed
2017-03-17 16:34:16 DEBUG daemonizing...
2017-03-17 16:34:16 DEBUG INIT: _syslog
2017-03-17 16:34:16 DEBUG INIT: multiline
2017-03-17 16:34:16 DEBUG INIT: oerrorin1
2017-03-17 16:34:16 DEBUG INIT: udpout
2017-03-17 16:34:16 DEBUG Pollset initialized for module udpout (method: poll)
2017-03-17 16:34:16 DEBUG INIT: fileout2
2017-03-17 16:34:16 DEBUG Pollset initialized for module fileout2 (method: poll)
2017-03-17 16:34:16 DEBUG now running as group nxlog
2017-03-17 16:34:16 WARNING additional group memberships couldn't be set because getgrouplist()and setgroups() are not available on this platform
2017-03-17 16:34:16 DEBUG now running as user nxlog
2017-03-17 16:34:16 DEBUG running as uid: 203, euid: 203, gid: 204, egid: 204
2017-03-17 16:34:16 DEBUG pidfile /var/run/nxlog/nxlog.pid created
2017-03-17 16:34:16 DEBUG parsing path: oerrorin1 =>udpout
2017-03-17 16:34:16 DEBUG adding module oerrorin1 to route 1
2017-03-17 16:34:16 DEBUG adding module udpout to route 1
2017-03-17 16:34:16 DEBUG parsing path: in2 => fileout2
2017-03-17 16:34:16 ERROR [router.c:68/nx_route_add_module()] module 'in2' is not declared at /etc/nxlog.conf:54
2017-03-17 16:34:16 DEBUG adding module fileout2 to route tcproute
2017-03-17 16:34:16 ERROR [router.c:347/nx_add_route()] route tcproute is not functional without input modules, ignored at /etc/nxlog.conf:54
2017-03-17 16:34:16 DEBUG jobgroup created with priority 99
2017-03-17 16:34:16 DEBUG jobgroup created with priority 10
2017-03-17 16:34:16 DEBUG spawning 3 worker threads
2017-03-17 16:34:16 DEBUG worker thread 0 started
2017-03-17 16:34:16 DEBUG worker thread 1 started
2017-03-17 16:34:16 DEBUG worker thread 2 started
I have no idea about this problem.
/u01/app/oracle/diag/rdbms/oraywsoudb/oraywsoudb/trace/alert_oraywsoudb.log --> user and group is oracle:oinstall
and i add the nxlog user in oinstall group, but why continue report Permission denied?
Hello Alex Chen,
The debug log shows that nxlog can not set another group under AIX:
2017-03-17 16:34:16 DEBUG now running as group nxlog
2017-03-17 16:34:16 WARNING additional group memberships couldn't be set because getgrouplist()and setgroups() are not available on this platform
Probably you need to change the permissions (eg. chmod 755 ) of that file in order to be accessible by nxlog.