ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-9195

When receiving data of ZBX_NOTSUPPORTED, Proxy sets invalid value to lastlogsize and mtime.

    Details

      Description

      When receiving data of ZBX_NOTSUPPORTED, though Proxy doesn't set any value to lastlogsize and mtime in DCadd_history_notsupported(),
      Proxy uses them in DCmass_proxy_update_items().

      Therefore Proxy sets invalid value to lastlogsize and mtime, and when restarting Agent, it re-reads log from the first wrongly.

        Activity

        Hide
        Aleksandrs Saveljevs added a comment -

        Note that ZBXNEXT-444 is meant to address a related problem in trunk.

        Show
        Aleksandrs Saveljevs added a comment - Note that ZBXNEXT-444 is meant to address a related problem in trunk.
        Hide
        Aleksandrs Saveljevs added a comment -

        Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-9195 (based on 2.0) by applying the suggested patch.

        Show
        Aleksandrs Saveljevs added a comment - Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-9195 (based on 2.0) by applying the suggested patch.
        Hide
        Aleksandrs Saveljevs added a comment -

        Upon deeper investigation it turned out that this problem is independent from ZBXNEXT-444 and should be fixed separately under this issue.

        Show
        Aleksandrs Saveljevs added a comment - Upon deeper investigation it turned out that this problem is independent from ZBXNEXT-444 and should be fixed separately under this issue.
        Hide
        Alexander Vladishev added a comment - - edited

        (1) Please take a look at my changes in r51519.

        Aleksandrs Saveljevs Logic looks good, but that commit introduced some extra whitespace. Fixed that in r51521, please take a look. RESOLVED.

        Alexander Vladishev CLOSED

        Show
        Alexander Vladishev added a comment - - edited (1) Please take a look at my changes in r51519. Aleksandrs Saveljevs Logic looks good, but that commit introduced some extra whitespace. Fixed that in r51521, please take a look. RESOLVED. Alexander Vladishev CLOSED
        Hide
        Aleksandrs Saveljevs added a comment -

        Fixed in pre-2.0.15 r51524, pre-2.2.9 r51525, pre-2.4.4 r51526, and pre-2.5.0 (trunk) r51527.

        Show
        Aleksandrs Saveljevs added a comment - Fixed in pre-2.0.15 r51524, pre-2.2.9 r51525, pre-2.4.4 r51526, and pre-2.5.0 (trunk) r51527.
        Hide
        Kazuo Ito added a comment -

        using log4j, was subjected to the output of a large amount of log.
        mtime is the same but, size is different.
        Getting mtime and size, not synchronized?

         19639:20150305:133344.353    nr:0 filename:'/var/log/tomcat/mylog.log' mtime:1425530023 size:26680 processed_size:7480 seq:1 incomplete:0 dev:2049 ino_hi:0 ino_lo:653899 md5size:512 md5buf:bf528b17e422783459c713ca9152cee7
         19639:20150305:133344.353    nr:0 filename:'/var/log/tomcat/mylog.log' mtime:1425530023 size:37900 processed_size:7480 seq:0 incomplete:0 dev:2049 ino_hi:0 ino_lo:653899 md5size:512 md5buf:bf528b17e422783459c713ca9152cee7
        

        test.java

        import java.io.*;
        import javax.servlet.*;
        import javax.servlet.http.*;
        import org.apache.commons.logging.Log;
        import org.apache.commons.logging.LogFactory;
        
        public class test extends HttpServlet {
          protected Log log = LogFactory.getLog(this.getClass());
        
          public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {
        
            log.debug("message DEBUG ************************************************************");
            log.info ("message INFO");
            log.warn ("message WARN");
            log.error("message ERROR");
            log.fatal("message FATAL");
        
            res.setContentType("text/html");
            PrintWriter rw = res.getWriter();
            rw.println("<HTML>");
            rw.println("<HEAD>");
            rw.println("<TITLE>test</TITLE>");
            rw.println("</HEAD>");
            rw.println("<BODY>");
            rw.println("<P>test</P>");
            rw.println("</BODY>");
            rw.println("</HTML>");
          }
        }
        

        test shell

        #!/bin/sh
        for i in `seq 1 6000`
        do
           curl -s 'xxx.xxx.xxx.xxx/log4j/test'
        done
        

        log4j.xml

        <?xml version="1.0" encoding="UTF-8" ?>
        <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
        <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" >
          <appender name="stdout" class="org.apache.log4j.ConsoleAppender">
             <param name="Target" value="System.out" /> 
             <param name="Encoding" value="UTF8" />
             <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" value="%d %5p %c{1} - %m%n" />
             </layout>
          </appender>
          <appender name="file" class="org.apache.log4j.RollingFileAppender">
             <param name="File" value="/var/log/tomcat/mylog.log" />
             <param name="Append" value="true" />
             <param name="MaxFileSize" value="51200" />
             <param name="MaxBackupIndex" value="10" />
             <param name="ImmediateFlush" value="true" />
             <param name="Encoding" value="UTF8" />
             <layout class="org.apache.log4j.PatternLayout">
        	<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p %C:%M:%m%n" />
             </layout>
          </appender>
          <category name="test" >
            <priority value ="debug" />
            <appender-ref ref="file" />
          </category>  
          <root>
            <priority value ="info" />
            <appender-ref ref="stdout"/>
          </root>
        </log4j:configuration>
        
        Show
        Kazuo Ito added a comment - using log4j, was subjected to the output of a large amount of log. mtime is the same but, size is different. Getting mtime and size, not synchronized? 19639:20150305:133344.353 nr:0 filename:'/var/log/tomcat/mylog.log' mtime:1425530023 size:26680 processed_size:7480 seq:1 incomplete:0 dev:2049 ino_hi:0 ino_lo:653899 md5size:512 md5buf:bf528b17e422783459c713ca9152cee7 19639:20150305:133344.353 nr:0 filename:'/var/log/tomcat/mylog.log' mtime:1425530023 size:37900 processed_size:7480 seq:0 incomplete:0 dev:2049 ino_hi:0 ino_lo:653899 md5size:512 md5buf:bf528b17e422783459c713ca9152cee7 test.java import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; public class test extends HttpServlet { protected Log log = LogFactory.getLog(this.getClass()); public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException { log.debug("message DEBUG ************************************************************"); log.info ("message INFO"); log.warn ("message WARN"); log.error("message ERROR"); log.fatal("message FATAL"); res.setContentType("text/html"); PrintWriter rw = res.getWriter(); rw.println("<HTML>"); rw.println("<HEAD>"); rw.println("<TITLE>test</TITLE>"); rw.println("</HEAD>"); rw.println("<BODY>"); rw.println("<P>test</P>"); rw.println("</BODY>"); rw.println("</HTML>"); } } test shell #!/bin/sh for i in `seq 1 6000` do curl -s 'xxx.xxx.xxx.xxx/log4j/test' done log4j.xml <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" > <appender name="stdout" class="org.apache.log4j.ConsoleAppender"> <param name="Target" value="System.out" /> <param name="Encoding" value="UTF8" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d %5p %c{1} - %m%n" /> </layout> </appender> <appender name="file" class="org.apache.log4j.RollingFileAppender"> <param name="File" value="/var/log/tomcat/mylog.log" /> <param name="Append" value="true" /> <param name="MaxFileSize" value="51200" /> <param name="MaxBackupIndex" value="10" /> <param name="ImmediateFlush" value="true" /> <param name="Encoding" value="UTF8" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p %C:%M:%m%n" /> </layout> </appender> <category name="test" > <priority value ="debug" /> <appender-ref ref="file" /> </category> <root> <priority value ="info" /> <appender-ref ref="stdout"/> </root> </log4j:configuration>

          People

          • Assignee:
            Unassigned
            Reporter:
            Yoshinori Komuro
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: