[rsyslog-notify] Forum Thread: Re: imptcp not writing to file - (Mode 'reply')

noreply at adiscon.com noreply at adiscon.com
Thu May 26 08:44:47 CEST 2016


User: re-su 
Forumlink: http://kb.monitorware.com/viewtopic.php?p=26543#p26543

Message: 
----------
@dlang - thanks for the answer - the data doesn't show up anywhere -
according to rsyslog debug log, the message comes in but rsyslog doesn't
write anything. 

Here some excerpts from the debug log 

logger with upd:  [code:2ohycwfk]logger -d -n remothost -P 514 -p
user.notice "Where is my mind?"[/code:2ohycwfk]

debug.log:

[code:2ohycwfk]
4144.702601065:main Q:Reg/w0  : strmPhysWrite, stream
0x7f8fd801b080, len 111
4144.702734136:main Q:Reg/w0  : strm 0x7f8fd801b080:
file 12 write wrote 111 bytes
4144.702826069:main Q:Reg/w0  : Action 21 transitioned to
state: rdy
4144.702918814:main Q:Reg/w0  : Action 21 transitioned to
state: itx
4144.703026005:main Q:Reg/w0  : Action 21 transitioned to
state: rdy
4144.703117984:main Q:Reg/w0  : actionCommit, in retry
loop, iRet 0
4144.703217812:main Q:Reg/w0  : processBATCH: batch of
2 elements has been processed
4144.703310462:main Q:Reg/w0  : regular consumer finished,
iret=0, szlog 0 sz phys 2
4144.703414591:main Q:Reg/w0  : DeleteProcessedBatch:
we deleted 2 objects and enqueued 0 objects
4144.703506114:main Q:Reg/w0  : doDeleteBatch: delete
batch from store, new sizes: log 0, phys 0
4144.703608744:main Q:Reg/w0  : regular consumer finished,
iret=4, szlog 0 sz phys 0
4144.703704923:main Q:Reg/w0  : main Q:Reg/w0:
worker IDLE, waiting for work.
4145.698749612:7f8fe4999700: strm 0x7f8fc008f510: file
20(remote.log) flush, buflen 82
4145.698790134:7f8fe4999700: strmPhysWrite, stream
0x7f8fc008f510, len 82
4145.698813478:7f8fe4999700: strm 0x7f8fc008f510: file 20
write wrote 82 bytes
[/code:2ohycwfk]

see the last three entries, message was written to "remote.log"

logger with tcp:  [code:2ohycwfk]logger -T -n remotehost -P 6514 -p
user.notice "another brick in the wall"[/code:2ohycwfk]

[code:2ohycwfk]
4381.784893068:imptcp.c       : imptcp: epoll returned
1 events
4381.784928772:imptcp.c       : imptcp: new connection
on listen socket 8
4381.785688050:imptcp.c       : imptcp: added socket 21
to epoll[7] set
4381.785704622:imptcp.c       : imptcp going on epoll_wait
4381.785711206:imptcp.c       : imptcp: epoll returned
1 events
4381.785716161:imptcp.c       : imptcp: new activity on
session socket 21
4381.785722010:imptcp.c       : imptcp: data(131072) on
socket 21: <13>May 26 08:33:01 root: another brick in the
wall
4381.785731890:imptcp.c       : imptcp: removing socket
21 from epoll[7] set
4381.785758801:imptcp.c       : imptcp: session on
socket 21 closed with iRet 0.
4381.785766250:imptcp.c       : imptcp going on epoll_wait
[/code:2ohycwfk]

nothing happens with the message ...

And with the little perl-script over tcp:

[code:2ohycwfk]4483.908945926:writeRemoteData:Reg/w0:
Action 0 transitioned to state: rdy
4483.908950758:writeRemoteData:Reg/w0: Action 0
transitioned to state: itx
4483.908954467:writeRemoteData:Reg/w0: Action 0
transitioned to state: rdy
4483.908958001:writeRemoteData:Reg/w0: actionCommit, in
retry loop, iRet 0
4483.908961616:writeRemoteData:Reg/w0: actionCommitAll:
action 1, state 1, nbr to commit 0 isTransactional 1
4483.908965005:writeRemoteData:Reg/w0: doTransaction:
have commitTransaction IF, using that, pWrkrInfo 0x17981f0
4483.908968430:writeRemoteData:Reg/w0: entering
actionCallCommitTransaction(), state: itx, actionNbr 1, nMsgs 1
4483.908971783:writeRemoteData:Reg/w0:  <sending host>
4483.908975349:writeRemoteData:Reg/w0:  <sending
host>:6514/tcp
4483.908990927:writeRemoteData:Reg/w0: omfwd: add 104
bytes to send buffer (curr offs 0)
4483.908996405:writeRemoteData:Reg/w0: omfwd:
endTransaction, offsSndBuf 104, iRet -2121
4483.909075837:writeRemoteData:Reg/w0: omfwd: TCP sent
104 bytes, requested 104
4483.909089734:writeRemoteData:Reg/w0: Action 1
transitioned to state: rdy
4483.909093482:writeRemoteData:Reg/w0: omfwd:
beginTransaction
4483.909096971:writeRemoteData:Reg/w0: 
ssb10i01.bit.admin.ch
4483.909100388:writeRemoteData:Reg/w0: Action 1
transitioned to state: itx
4483.909103873:writeRemoteData:Reg/w0: Action 1
transitioned to state: rdy
4483.909107176:writeRemoteData:Reg/w0: actionCommit, in
retry loop, iRet 0
4483.909111180:writeRemoteData:Reg/w0: processBATCH:
batch of 1 elements has been processed
4483.909115138:writeRemoteData:Reg/w0: regular consumer
finished, iret=0, szlog 0 sz phys 1
4483.909118901:writeRemoteData:Reg/w0:
DeleteProcessedBatch: we deleted 1 objects and enqueued 0 objects
4483.909122408:writeRemoteData:Reg/w0: doDeleteBatch:
delete batch from store, new sizes: log 0, phys 0
4483.909126162:writeRemoteData:Reg/w0: regular consumer
finished, iret=4, szlog 0 sz phys 0
4483.909129666:writeRemoteData:Reg/w0:
writeRemoteData:Reg/w0: worker IDLE, waiting for work.
4484.909293513:7f8fe4999700: strm 0x7f8fc008f510: file
20(remote.log) flush, buflen 100
4484.909333817:7f8fe4999700: strmPhysWrite, stream
0x7f8fc008f510, len 100
4484.909359822:7f8fe4999700: strm 0x7f8fc008f510: file 20
write wrote 100 bytes
[/code:2ohycwfk]

Worked well :-)

For me it's ok now. I know the tcp part works fine, so I can go on and
implement tls ...

Have a good day.


More information about the rsyslog-notify mailing list