[JBoss JIRA] Created: (JBAS-8791) log4j-appender seems not working in jboss-logging (AS6 final)
by Gregoire Botquin (JIRA)
log4j-appender seems not working in jboss-logging (AS6 final)
-------------------------------------------------------------
Key: JBAS-8791
URL: https://issues.jboss.org/browse/JBAS-8791
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Logging
Affects Versions: 6.0.0.Final
Reporter: Gregoire Botquin
Assignee: David Lloyd
We are using some custom logger based on log4j appenders. I made a jboss-logging.xml configuration but it seems that my log4j-appender doesn't log anything. I'm working in AS6 final version.
I made an example with a standard log4j appender (neither working). The category "com.sample" should be managed by the log4jappender. Every second the bean should write something, but nothing happens, the log file is not even created. I tried with other log4j loggers/ custom loggers and no success.
When activating CONSOLE handler the logs are correctly written in console, but when only using the log4j-appender nothing happens after server started.
The configuration file seems correct (?), but can't unfortunately check it against a documentation yet.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<logging xmlns="urn:jboss:logging:6.0" xmlns:b="urn:jboss:bean-deployer:2.0">
<!-- ================================= -->
<!-- Preserve messages in a local file -->
<!-- ================================= -->
<!-- A time/date based rolling handler -->
<periodic-rotating-file-handler
file-name="${jboss.server.log.dir}/server.log"
name="FILE"
autoflush="true"
append="true"
suffix=".yyyy-MM-dd"> <!-- To roll over at the top of each hour, use ".yyyy-MM-dd-HH" instead -->
<error-manager>
<only-once/>
</error-manager>
<formatter>
<!-- To revert back to simple stack traces without JAR versions, change "%E" to "%e" below. -->
<!-- Uncomment this to get the class name in the log as well as the category
<pattern-formatter pattern="%d %-5p [%c] %C{1} (%t) %s%E%n"/>
-->
<!-- Uncomment this to log without the class name in the log -->
<pattern-formatter pattern="%d %-5p [%c] (%t) %s%E%n"/>
</formatter>
</periodic-rotating-file-handler>
<!-- ============================== -->
<!-- Append messages to the console -->
<!-- ============================== -->
<console-handler name="CONSOLE" autoflush="true" target="System.out">
<error-manager>
<only-once/>
</error-manager>
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] %s%E%n"/>
</formatter>
</console-handler>
<log4j-appender name="Log4jAppender" class="org.apache.log4j.DailyRollingFileAppender">
<error-manager>
<only-once/>
</error-manager>
<level name="DEBUG"/>
<properties>
<!-- <property name="directory">${jboss.server.log.dir}/</property> -->
<property name="file">${jboss.server.log.dir}/log4j.log</property>
<property name="append">true</property>
<property name="datePattern">'.'yyyy-MM-dd</property>
</properties>
<formatter>
<pattern-formatter pattern="%d %-5p [%c] %m%n"/>
</formatter>
</log4j-appender>
<logger category="com.sample">
<level name="DEBUG"/>
<handlers>
<handler-ref name="Log4jAppender"/>
</handlers>
</logger>
<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->
<root-logger>
<!-- Set the root logger priority via a system property, with a default value. -->
<level name="${jboss.server.log.threshold:INFO}"/>
<handlers>
<handler-ref name="Log4jAppender"/>
<!--
<handler-ref name="CONSOLE"/>
<handler-ref name="FILE"/>
-->
</handlers>
</root-logger>
</logging>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
package com.sample;
import javax.ejb.Schedule;
import javax.ejb.Stateless;
import org.apache.log4j.Logger;
//@Singleton
@Stateless
public class TestBean {
public static final Logger LOG = Logger.getLogger(TestBean.class);
public TestBean(){
System.out.println("TestBean is instantiated and should write someting in the log file");
LOG.info("This is information log");
}
@Schedule(second="*/1", minute="*",hour="*", persistent=false)
public void writeSomething(){
System.out.println("This should write something in the log file at scheduled times");
LOG.info("This is scheduled information log");
}
}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] Created: (JBAS-7468) Memory leak in org.jboss.security.plugins.authorization.JBossAuthorizationContext
by Ganesh Ingle (JIRA)
Memory leak in org.jboss.security.plugins.authorization.JBossAuthorizationContext
---------------------------------------------------------------------------------
Key: JBAS-7468
URL: https://jira.jboss.org/jira/browse/JBAS-7468
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Security
Affects Versions: JBossAS-5.1.0.GA, JBossAS-5.0.1.GA, JBossAS-5.0.0.GA
Environment: JBoss Version: jboss-5.1.0.GA, OS: Linux (2.6.18-164.el5), Architecture: amd64 64bit, JVM: Java HotSpot(TM) 64-Bit Server VM (14.0-b16, mixed mode)
Reporter: Ganesh Ingle
Assignee: Anil Saldhana
Our use case (only security related portion is mentioned here):
Axis 1.4 webservice, standard J2EE declarative security through WEB-INF/web.xml, a http client sends soap request and BASIC auth information, the JBoss server performs authentication and authorization as per WEB-INF/web.xml configuration.
We did a performance/stability test on above web service. After 8.5 million requests the server gone out of memory. We did heap dump analysis using VisualVM tool and found that the class org.jboss.security.plugins.authorization.JBossAuthorizationContext is consuming most of the memory. This class has a memer array named "controlFlags", this array was showing 25.7 million ControlFlag entries.
When we investigated the code we found that there is one instance of JBossAuthorizationManager per security domain and this manager has one instance of JBossAuthorizationContext. For every authorization the JBossAuthorizationContext initializes authorization modules and pushes their control flags (instances of class ControlFlag) in member arrays. When the authorization is complete, a commit/abort is invoked on all modules and finally the "modules" array is cleared. However, the "controlFlags" array is not cleared. We checked the entire class, this array never gets cleared.
We changed the code to clear both "modules" and "controlFlags" array in a finally block in method JBossAuthorizationContext.authorize(final Resource resource, final Subject subject, final RoleGroup callerRoles). We ran a 50million test after this fix, the test was successful which proves the fix worked.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] (AS7-4426) Remote store config errors in AS7
by rang s (JIRA)
rang s created AS7-4426:
---------------------------
Summary: Remote store config errors in AS7
Key: AS7-4426
URL: https://issues.jboss.org/browse/AS7-4426
Project: Application Server 7
Issue Type: Bug
Components: Class Loading
Affects Versions: 7.1.1.Final
Environment: Windows
Reporter: rang s
Assignee: David Lloyd
When remote-store is configured in domain.xml, on server startup following errors :-
[Server:server-one] 17:00:00,889 ERROR [org.jboss.msc.service.fail] (pool-13-thread-1) MSC00001: Failed to start service jboss.infinispan.web.repl: org.jboss.msc.servic
e.StartException in service jboss.infinispan.web.repl: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.loaders.CacheLoaderManagerImpl.
start() on object
[Server:server-one] at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:62) [jboss-as-clustering-common-7.1.1.Final.jar:7.1.1.Final]
[Server:server-one] Caused by: org.infinispan.CacheConfigurationException: Unable to instantiate class org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFacto
ry
[Server:server-one] Caused by: java.lang.ClassNotFoundException: org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory
Looks like some issue in locating the jar which contains this class file. I could resolve this issue by :-
Adding the following :-
<module name="org.infinispan.client.hotrod"/>
in %JBOSS_HOME%/modules/org/infinispan/main/module.xml
This seems to be a bug as it should work out of the box.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] (JGRP-1455) Message lost in NAKACK due to digest error
by David Hotham (JIRA)
David Hotham created JGRP-1455:
----------------------------------
Summary: Message lost in NAKACK due to digest error
Key: JGRP-1455
URL: https://issues.jboss.org/browse/JGRP-1455
Project: JGroups
Issue Type: Bug
Affects Versions: 3.0.9
Reporter: David Hotham
Assignee: Bela Ban
Hello,
In this issue an application-level message broadcast to the cluster is being discarded by NAKACK2, on a new joiner.
I think I understand roughly what's going on - skip to the end for a suggested fix!
I'll keep all my trace so that I can investigate further details if needed.
So, let's start with trace from the new joiner (CFS-B-chucklebrothers), showing that:
- it sets a digest claiming that the sequence numbers for CFS-A-tinkywinky are 26 (26)
- CFS-A-tinkywinky then sends messages with sequence numbers 26 and 27
- Only message 27 is passed upwards
{noformat}
2012-04-18 19:26:49.133 [ForkJoinPool-1-worker-3] DEBUG org.jgroups.protocols.pbcast.NAKACK2 -
[CFS-B-chucklebrothers setDigest()]
existing digest: []
new digest: CFS-A-tinkywinky: [26 (26)], CFS-A-chucklebrothers: [0 (0)], CFS-B-tinkywinky: [0 (0)], CFS-B-chucklebrothers: [0 (0)]
resulting digest: CFS-A-tinkywinky: [26 (26)], CFS-A-chucklebrothers: [0 (0)], CFS-B-tinkywinky: [0 (0)], CFS-B-chucklebrothers: [0 (0)]
2012-04-18 19:26:49.200 [Incoming-2,Clumpy Test Cluster,CFS-B-chucklebrothers] TRACE org.jgroups.protocols.TCP - received [dst: <null>, src: CFS-A-tinkywinky (3 headers), size=39 bytes], headers are SEQUENCER: WRAPPED_BCAST (tag=[CFS-B-chucklebrothers|0]), NAKACK2: [MSG, seqno=26], TCP: [channel_name=Clumpy Test Cluster]
2012-04-18 19:26:49.200 [Incoming-2,Clumpy Test Cluster,CFS-B-chucklebrothers] TRACE org.jgroups.protocols.TCP - received [dst: <null>, src: CFS-A-tinkywinky (3 headers), size=51 bytes], headers are SEQUENCER: BCAST (tag=[CFS-A-tinkywinky|11]), NAKACK2: [MSG, seqno=27], TCP: [channel_name=Clumpy Test Cluster]
2012-04-18 19:26:49.200 [Incoming-2,Clumpy Test Cluster,CFS-B-chucklebrothers] TRACE org.jgroups.protocols.pbcast.NAKACK2 - CFS-B-chucklebrothers: received CFS-A-tinkywinky#27
{noformat}
And here's the trace from CFS-A-tinkywinky showing that:
- the digest that it sent only claimed sequence numbers 25 (25)
{noformat}
2012-04-18 19:26:49.132 [OOB-1,Clumpy Test Cluster,CFS-A-tinkywinky] TRACE org.jgroups.protocols.TCP - sending msg to CFS-B-chucklebrothers, src=CFS-A-tinkywinky, headers are GMS: GmsHeader[JOIN_RSP]: join_rsp=view: [CFS-A-tinkywinky|3] [CFS-A-tinkywinky, CFS-A-chucklebrothers, CFS-B-tinkywinky, CFS-B-chucklebrothers], digest: CFS-A-tinkywinky: [25 (25)], CFS-A-chucklebrothers: [0 (0)], CFS-B-tinkywinky: [0 (0)], CFS-B-chucklebrothers: [0 (0)], UNICAST2: DATA, seqno=2, conn_id=3, TCP: [channel_name=Clumpy Test Cluster]
{noformat}
By looking at trace from the other members receiving message 26, I can see that this is an application level message.
I think that the incrementing of the received sequence number is deliberate, per ClientGmsImpl ("see doc/design/varia2.txt for details"). If I understand correctly, it's intended to compensate for the fact that the the digest doesn't include the broadcast VIEW message.
However, CFS-A-tinkywinky shows this:
{noformat}
2012-04-18 19:26:49.125 [ViewHandler,Clumpy Test Cluster,CFS-A-tinkywinky] WARN org.jgroups.protocols.pbcast.GMS - CFS-B-chucklebrothers already present; returning existing view [CFS-A-tinkywinky|3] [CFS-A-tinkywinky, CFS-A-chucklebrothers, CFS-B-tinkywinky, CFS-B-chucklebrothers]
2012-04-18 19:26:49.126 [ViewHandler,Clumpy Test Cluster,CFS-A-tinkywinky] TRACE org.jgroups.protocols.pbcast.GMS - found no members to add or remove, will not create new view
{noformat}
My thinking is that since the coordinator does not broadcast a VIEW message, it's a mistake for CFS-B-chucklebrothers to have fixed up the digest.
Possibly the fix is simply to remove the block of code in CoordGmsImpl.handleMembershipChange() for "found no members to add or remove", and send out a view anyway?
Thanks!
David
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] (AS7-2322) Stack trace improvements, summarize the things that broke to make them not so intimidating
by Jim Tyrrell (Created) (JIRA)
Stack trace improvements, summarize the things that broke to make them not so intimidating
------------------------------------------------------------------------------------------
Key: AS7-2322
URL: https://issues.jboss.org/browse/AS7-2322
Project: Application Server 7
Issue Type: Feature Request
Reporter: Jim Tyrrell
See the typical attached stack dump:
It would be nice if the stack dump could include all of the information above as a summary as shown below, basically just the first lines of the errors w/o the whole stack dump:
11:51:45,391 INFO [org.jboss.as.server.controller] (HttpManagementService-threads - 5) Deployment of "SpringWAR.war" was rolled back with failure message {"Failed services" => {"jboss.web.deployment.default-host./SpringWAR" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./SpringWAR: failed to start context"}}
11:51:45,392 INFO [org.jboss.as.controller] (HttpManagementService-threads - 5) Service status report
Services which failed to start:
service jboss.web.deployment.default-host./SpringWAR: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./SpringWAR: failed to start context
11:51:45,417 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment SpringWAR.war in 26ms
11:51:45,417 Error Summary of Exceptions in deployment:
- [org.springframework.web.context.ContextLoader] (MSC service thread 1-5) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jbossQueue' defined in class path resource [applicationContextServices.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: queue/B -- service jboss.naming.context.java.queue.B
- [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SpringWAR]] (MSC service thread 1-5) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jbossQueue' defined in class path resource [applicationContextServices.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: queue/B -- service jboss.naming.context.java.queue.B
- [org.apache.catalina.core.StandardContext] (MSC service thread 1-5) Error listenerStart
- ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-5) Context [/SpringWAR] startup failed due to previous errors
- [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SpringWAR]] (MSC service thread 1-5) Closing Spring root WebApplicationContext
- [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.web.deployment.default-host./SpringWAR:
ERROR Scroll up to see more info...
Or
11:51:45,417 Error Summary of Exceptions in deployment:
[1] [org.springframework.web.context.ContextLoader] (MSC service thread 1-5) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jbossQueue' defined in class path resource [applicationContextServices.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: queue/B -- service jboss.naming.context.java.queue.B
[2] [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SpringWAR]] (MSC service thread 1-5) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jbossQueue' defined in class path resource [applicationContextServices.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: queue/B -- service jboss.naming.context.java.queue.B
[3] [org.apache.catalina.core.StandardContext] (MSC service thread 1-5) Error listenerStart
[4] ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-5) Context [/SpringWAR] startup failed due to previous errors
[5] [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SpringWAR]] (MSC service thread 1-5) Closing Spring root WebApplicationContext
[6] [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.web.deployment.default-host./SpringWAR:
ERROR Scroll up to see more info...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] (AS7-4167) Admin console: cannot set attribute max-attempts of modcluster subsystem
by Jan Martiska (JIRA)
Jan Martiska created AS7-4167:
---------------------------------
Summary: Admin console: cannot set attribute max-attempts of modcluster subsystem
Key: AS7-4167
URL: https://issues.jboss.org/browse/AS7-4167
Project: Application Server 7
Issue Type: Bug
Components: Console
Affects Versions: 7.1.1.Final
Reporter: Jan Martiska
Assignee: Heiko Braun
Priority: Minor
Under Networking tab of modcluster configuration - property "Max Attempts" cannot be set- console references it as "max-attemps" instead of the correct "max-attempts"
{noformat}
{
"outcome" => "failed",
"result" => {"step-1" => {
"outcome" => "failed",
"failure-description" => "JBAS014792: Unknown attribute max-attemps",
"rolled-back" => true
}},
"failure-description" => {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "JBAS014792: Unknown attribute max-attemps"}},
"rolled-back" => true,
"response-headers" => {"process-state" => "reload-required"}
}
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months
[JBoss JIRA] (AS7-4166) Admin console: cannot set attribute auto-enable-contexts of modcluster subsystem
by Jan Martiska (JIRA)
Jan Martiska created AS7-4166:
---------------------------------
Summary: Admin console: cannot set attribute auto-enable-contexts of modcluster subsystem
Key: AS7-4166
URL: https://issues.jboss.org/browse/AS7-4166
Project: Application Server 7
Issue Type: Bug
Components: Console
Affects Versions: 7.1.1.Final
Reporter: Jan Martiska
Assignee: Heiko Braun
Priority: Minor
Under Web Contexts tab of modcluster configuration - property "Auto Enable Contexts" cannot be set- console references it as "auto-enableContexts" instead of the correct "auto-enable-contexts"
{noformat}
{
"outcome" => "failed",
"result" => {"step-1" => {
"outcome" => "failed",
"failure-description" => "JBAS014792: Unknown attribute auto-enableContexts",
"rolled-back" => true
}},
"failure-description" => {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "JBAS014792: Unknown attribute auto-enableContexts"}},
"rolled-back" => true,
"response-headers" => {"process-state" => "reload-required"}
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 10 months