11 Replies Latest reply on May 18, 2009 12:38 PM by peterj

    Problem with logs

    jagui1

      Hi there,
      I'm having a lot of troubles logging my applications with jboss. We are changing Oracle Application Server with Jboss Application Server. We tested a lot our applications and after we eradicated all the mistakes, application ones, we are now facing a big trouble: all the applications deployed in a server (as a matter of fact is a cluster of two servers) logs all the activity normaly but suddenly stops logging, I mean, they continue doing things but not write to the log file anymore. I tried two other appenders, ina different file, and in a ftp console, but when it stops they stop too. I'm not a developer, just a system programmer learning about this word. Thanks in advance whomever can help me, and please excuse my poor english. I'm from Venezuela.

        • 1. Re: Problem with logs
          peterj

          JBoss AS uses Log4J to do its logging. What appenders are you using? The default FILE appender uses a daily rolling file appender - thus at midnight you get a new log file. In one way this might appear as if logginf stopped (if you are doing something like 'tail -f server.log').

          Also, there is a MBean that can be used to control logging. Anyone can use that MBean to change the log settings. You can secure the JMX invoker to limit this capability.

          Finally, how did you go about getting logging for your apps? By modifying the jboss-log4j.xml file, or by some other mechanism?

          • 2. Re: Problem with logs
            jagui1

            Thanks for your quik answer. In our search for the cause of the problem we changed the original daily rolling file for a single rolling file, increasing the max file size parameter to 100 Mb.:













            We're using another one:






            <!-- Original

            -->




            Yes, I'm using tail -f server.log for a kind of monitoring process, becouse or the problem. I've noticed that there is a message just before it stop logging:
            "ERROR: invalid console appender config detected, console stream is looping".
            I'm sorry for know nothing about Mbeans. And finally, yes, we use jboss-log4j.xml file.
            Thanks again

            • 3. Re: Problem with logs
              jagui1

              Sorry, I tried to put the jboss-log4j.xml in the text before, but I couldn´t.
              "










              "
              "




              <!-- Original

              -->


              "

              • 4. Re: Problem with logs
                peterj

                When posting XML text or source code, please enclose the text in UBBCode "code" tags - you can do this by selecting the text and clicking the Code button above the editor window. Also, click the Preview button to ensure that the formatting is correct and the XML text shows up before posting.

                • 5. Re: Problem with logs
                  jagui1

                  Thanks my friend, sorry for my ignorance

                  <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
                   <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
                   <param name="File" value="${jboss.server.log.dir}/server.log"/>
                   <param name="Append" value="true"/>
                   <param name="MaxFileSize" value="100MB"/>
                   <param name="MaxBackupIndex" value="6"/>
                  
                   <layout class="org.apache.log4j.PatternLayout">
                   <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
                   </layout>
                   </appender>
                  
                   <appender name="TELNET" class="org.apache.log4j.net.TelnetAppender">
                   <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
                   <param name="Threshold" value="INFO"/>
                   <param name="Port" value="49000"/>
                   <layout class="org.apache.log4j.PatternLayout">
                   <!-- Original
                   <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] [%C %M] %m%n"/>
                   -->
                   <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
                   </layout>
                   </appender>
                  


                  • 6. Re: Problem with logs
                    peterj

                    Could you post the entry log entry for the error "ERROR: invalid console appender config detected, console stream is looping" - I cannot find this text in Log4J and knowing which class is printing this log entry will help.

                    • 7. Re: Problem with logs
                      peterj

                      Oh, and what version of JBoss AS?

                      • 8. Re: Problem with logs
                        peterj

                        I found the error text in the JBoss AS source. I think it might have something to do with your use of the telnet appender, possibly when a second person connects to the appender. The code giving this error is looking for recursive calls to the write method. You could test this by having one person and then another connect to the telnet connector and see if that stops the logging. If so, you might want to use another connector.

                        Looking at the source code, I do not see anything that would hint at logging being disabled at the time this error is displayed. The code pretty much displays the error and then continues on.

                        Also, when you say that logging stops, do you mean it stops for the telnet appender only, or for the file appender also?

                        • 9. Re: Problem with logs
                          jagui1

                           

                          ERROR: invalid console appender config detected, console stream is looping2009-05-12 16:52:09,984 DEBUG [ve.gob.mf.sigecof.oocp.gasto.pddSolicitudCuotaCompromiso.actions.PDDSolicitudCuotaCompromisoAction] entrando al PDDSolicitudCuotaCompromisoAction ....
                          2009-05-12 16:52:09,984 DEBUG [ve.gob.mf.sigecof.oocp.gasto.pddSolicitudCuotaCompromiso.actions.PDDSolicitudCuotaCompromisoAction] se leeran los parametros para mostrar las decisiones ....
                          2009-05-12 16:52:09,984 DEBUG [ve.gob.mf.sigecof.comunes.pdd.actions.PDDGenericoAction] obteniendo los parametros de invocacion ....
                          2009-05-12 16:52:09,984 DEBUG [ve.gob.mf.sigecof.comunes.pdd.actions.PDDGenericoAction] aplicando la conversion a los parametros necesarios ....
                          2009-05-12 16:52:09,984 DEBUG [ve.gob.mf.sigecof.comunes.pdd.actions.PDDGenericoAction] colocando los parametros en el AF ....


                          • 10. Re: Problem with logs
                            jagui1

                            Hi Peter, Sorry I coudn't answer before. The previuos is an extract of the server.log when it stop logging. I could notice that it always stop inthe same place, doing the same thing. I don't know, because I'm not a developer, if it's caused by a java class or something. The version of Jboss is 4.3 AS.
                            I tried before eliminating the telnet appender, I used the original jboss-log4j.xml, a fresh one. But the same result. And, when I said stops logging, it really stops, in all the appender I've used. Thanks in advance for your effort. Finally I just want you to know that we decided to go to the production environment with this problem over us, but it was necessary because we couldn´t continue afford the oracle's solution. I have now the responsability of doing it work.... This is another reason to say THANKS for your time.

                            • 11. Re: Problem with logs
                              peterj

                              If you are using 4.3, you should have a support contract with Red Hat because the 4.3 version is available only via the support web site. You might want to contact support and have them look at it. The only time I have ever seen logging stop is when someone changed the logging configuration to turn it off.