Quantcast
Channel: Hortonworks » All Replies
Viewing all articles
Browse latest Browse all 3435

Ambari agent logs do not rotate filling up disks

$
0
0

Hi!

I have successfully deployed HDP 2.3 with Coudbreak 1.0.3 on Openstack Juno. But the log file of the ambari-agent is filling up the volume /hadoop/fs1/logs on all the VMs. It seems that the logging handler defined in the agent code (class logging.handlers.RotatingFileHandler) that should routate the logs when it’s size is about 10MB is not working properly for same reason. However, if I restart the ambari-agent service in the docker container the log file is rotated.

For example, after running 2 hours the <span style=”line-height: 1.5;”>log file is 46MB </span>

[root@docker-ambari tmp]# ll -h /var/log/ambari-agent/

total 46M

-rw-r–r– 1 root root  46M Oct 20 14:47 ambari-agent.log

-rw-r–r– 1 root root 260K Oct 20 14:47 ambari-agent.out

If I restart the service

[root@docker-ambari tmp]# ambari-agent restart -v

Restarting ambari-agent

Verifying Python version compatibility…

Using python  /usr/bin/python2.6

Found ambari-agent PID: 65

Stopping ambari-agent

Removing PID file at /var/run/ambari-agent/ambari-agent.pid

tput: No value for $TERM and no -T specified

ambari-agent successfully stopped

tput: No value for $TERM and no -T specified

Verifying Python version compatibility…

Using python  /usr/bin/python2.6

Checking for previously running Ambari Agent…

Starting ambari-agent

Verifying ambari-agent process status…

tput: No value for $TERM and no -T specified

Ambari Agent successfully started

tput: No value for $TERM and no -T specified

Agent PID at: /var/run/ambari-agent/ambari-agent.pid

Agent out at: /var/log/ambari-agent/ambari-agent.out

Agent log at: /var/log/ambari-agent/ambari-agent.log

the handler is invoked and the file is rotated

[root@docker-ambari tmp]# ll -h /var/log/ambari-agent/

total 48M

-rw-r–r– 1 root root 44K Oct 20 14:51 ambari-agent.log

-rw-r–r– 1 root root 48M Oct 20 14:51 ambari-agent.log.1

-rw-r–r– 1 root root   0 Oct 20 14:51 ambari-agent.out

Any suggestion?

Thanks

Ale


Viewing all articles
Browse latest Browse all 3435

Trending Articles