Why is Apigee logging debug and trace to zookeeper_trace.log file in 16.01 by default?

We noticed a very large file (over 15GB) named zookeeper_trace.log in the /opt/apigee/var/log/apigee-zookeeper directory. This file seems to never get deleted and keeps growing.

When viewing the contents of the file it looks to be logging debug and trace statements for just about everything that happens in Apigee

It seems as though that debug and/or trace is somehow turned on by default for zookeeper. We have not made any changes to the configuration on these servers.

We do have 6 nodes, which all have the large trace file on them.

Is this necessary for normal operation? How can I turn down the logging/tracing for zookeeper?

Also can we safely delete this file?

Solved Solved
0 4 354
2 ACCEPTED SOLUTIONS

Not applicable

Hi,

Yes the fix is after version .866. I think you need at least .899 but you'll get .905 now.

/opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper update

Is the recommended method, it calls yum for you. It also updates apigee-attribution. So

that is better than the yum commands I gave earlier..

As you have an offline install you'll have to re-sync as you noted. It should be fixed for 4.16.01.03 . Just takea note of the version of the of apigee-zookeeper it installs.

Russell

View solution in original post

Not applicable

Hi,

You could set the parameters in the config I as well. 4.16 uses change with configuration (cwc)

so we can't edit the config directly.

cd {inst_path}/customer/application

create file zookeeper.properties file (if it does not already exist) and add this entry

conf_log4j_log4j.rootlogger=INFO,ROLLINGFILE

restart zookeeper and check if the trace log has stopped getting any more entries.

Russell

@David Ryan

View solution in original post

4 REPLIES 4

Not applicable

Hi,

That problem has been fixed. If you run yum check-update you should see a new version of apigee-zookeeper which has the logging set to something a bit more reasonable.

So I my test system I get

# yum list apigee-zoo\*

Installed

apigee-zookeeper.noarch 3.4.5-0.0.866 @apigee-release


Available Packages
apigee-zookeeper.noarch 3.4.5-1.0.905 apigee-release

At an appropriate point I would update in the usual way.

yum update apigee-zookeeper.noarch

Then restart zookeeper.

I would not delete the file as zookeeper could be writing to it (unless you stop / start it as

part of the above update).

I would use the old trick of clearing the file down using /dev/null.

cat /dev/null > zookeeper_trace.log

As you have 6 nodes you can do this on one then confirm zookeeper is ok before doing

the others. It should be empty on the next startup and stay that way.

Russell

@David Ryan

We have 3.4.5-0.0.866 installed so assuming it was fixed in a later release, the second one you have listed above?

As a side we are running using a local yum repo as our servers cannot access apigee's software repo via the internet. So I'm guessing I need to sync up the our local repo with newer RPM's, and then run the update?

We've never updated anything yet with the new 4.16 release so we're a little unclear as to how and what to update, meaning patches and stuff within a version, i.e. 4.16.01.x

Also is this fixed in version 4.16.01.03?

Is there another way to set the correct settings, as in a zookeeper.properties file? Could you send those instructions, what to edit, the correct values, etc.

Not applicable

Hi,

Yes the fix is after version .866. I think you need at least .899 but you'll get .905 now.

/opt/apigee/apigee-service/bin/apigee-service apigee-zookeeper update

Is the recommended method, it calls yum for you. It also updates apigee-attribution. So

that is better than the yum commands I gave earlier..

As you have an offline install you'll have to re-sync as you noted. It should be fixed for 4.16.01.03 . Just takea note of the version of the of apigee-zookeeper it installs.

Russell

Not applicable

Hi,

You could set the parameters in the config I as well. 4.16 uses change with configuration (cwc)

so we can't edit the config directly.

cd {inst_path}/customer/application

create file zookeeper.properties file (if it does not already exist) and add this entry

conf_log4j_log4j.rootlogger=INFO,ROLLINGFILE

restart zookeeper and check if the trace log has stopped getting any more entries.

Russell

@David Ryan