Message Processor system.log logging in tmp files

mrios
Participant IV

We're running 4.16.01 OPDK and we recently noticed that 5 out of our 6 MPs are writing the system.log files from /opt/apigee/var/log/edge-message-processor/logs/ to some temporary files. These files look like

system.log13243842057663830.tmp

system.log14900631754313301.tmp

The actual system.log file it's also there with 0 bytes.

I checked the logback.xml configuration among the different MPs and all look the same.

Any idea about what might be the problem?

1 4 1,083
4 REPLIES 4

Can you share the logback.xml?

Have you seen this issue with logback ? could that be the problem for you? (Maybe the directories don't exist on all servers).

mrios
Participant IV
@Dino

Attached is one of our logback.xml file (/opt/apigee/edge-message-processor/conf/logback.xml)

All of them look the same.

I was looking at that bug and the logback file it's the original one so it's writing on the same path. After some research we found a difference in the ownership of the folders/files that are under /opt/apigee/edge-message-processor. The MP that works has the below permission for all the folders

drwxrwxr-x 3 apigee apigee 4.0K 

and the ones that don't work have

drwxrwxr-x 3 root apigee 4.0K

Yes, that seems wrong, there is some legacy changes in our system that resulted in this kind of things unfortunately.

We'll change the ownership tomorrow morning to see if that hepls.

I'll keep you posted.

Hi Matias

Yes, the folder presence and permissions is the key thing. That is what I expected to be different. Even if you have the same logback.xml, if the folders are not present,or if the apigee user cannot write to them, then you can run into that logback problem.

Those .tmp files get created when gzip'ing the log files to rotate them. That was the issue in the bug I cited. And the avoidance for that bug is to check the folders , get them sorted...

I'm hopeful that will resolve the problem for you .

ps: I don't think the community site accepted your logback.xml as an attachment, but that's ok. You seem to have diagnosed the problem anyway.

mrios
Participant IV

We changed the ownership of /opt/apigee/edge-message-processor to be apigee apigee and now the logs are working fine.