Trouble changing the log level in RedHawk - redhawksdr

I am using RedHawk 2.1.2 and changing the log level through the IDE for devices or components seems to have no effect. If I raise it to TRACE or ALL I still get only INFO and below. If I lower it to WARN I still get INFO messages. If I return to the Set Debug Level dialog it shows my choice, but this does not seems to effect the log messages that are displayed. I am using the default log configuration with log messages displayed to stdout.
I know it worked before at least with RedHawk 2.0.1. Is this a known problem with 2.1.2 or is there some other issue that might cause it to ignore the level change?

I believe that this issue was resolved in REDHAWK 2.1.3

Related

Alluxio - How to check log4j version used in Alluxio release (alluxio-2.8.1)

We are using Alluxio(alluxio-2.8.1), and very curious to see and understand what version of log4j used in it. Please suggest where we can get that information.
According to this url https://github.com/Alluxio/alluxio/blob/master/pom.xml, log4j version may be 2.17.1.
Secondly, in the archive, you can found assembly director, extract some-thing-server.jar and find log4j class.
Thirdly, may be you can extract from running log, or set log to DEBUG

Zipkin + Elasticsearch (ELK) not create index

Hi everyone!
I have "ELK" (6.4.2) working perfectly with filebeat, metricbeat, packetbeat and winlogbeat in CentOS 7 x86_64 (Kernel 3.10.0-862.11.6.el7.x86_64).
I'm trying to integrate zipkin + elk (see https://logz.io/blog/zipkin-elk/), but Elasticsearch does not create indices with Kibana.
When trying to create the indices in Kibana, the process does not end. (Follow logs below).
I suspect the zipkin connection drivers are not compatible with elk 6.4.2. Has anyone had the same problem and has a "light at the end of the tunnel"?
Tks for all!
Java version:
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
Zipkin startup:
java -DSTORAGE_TYPE=elasticsearch -DES_HOSTS=http://localhost:9200 -jar /opt/zipkin.io/bin/zipkin.jar
Error log in Elasticsearch:
[2018-10-24T11:31:59,933][WARN ][o.e.d.i.m.MapperService ] Setting index.mapper.dynamic is deprecated since indices may not have more than one type anymore.
[2018-10-24T11:31:59,936][WARN ][o.e.d.i.m.MapperService ] [_default_] mapping is deprecated since it is not useful anymore now that indexes cannot have more than one type
[2018-10-24T11:31:59,954][WARN ][o.e.d.i.m.MapperService ] Setting index.mapper.dynamic is deprecated since indices may not have more than one type anymore.
[2018-10-24T11:32:00,033][WARN ][o.e.d.c.m.MetaDataCreateIndexService] index or alias name [zipkin:span-2018-10-24] containing ':' is deprecated and will not be supported in Elasticsearch 7.0+
[2018-10-24T11:32:00,245][WARN ][o.e.d.i.m.MapperService ] Setting index.mapper.dynamic is deprecated since indices may not have more than one type anymore.
[2018-10-24T11:33:47,717][WARN ][o.e.d.a.a.i.t.p.PutIndexTemplateRequest] Deprecated field [template] used, replaced by [index_patterns]
Here is the related issue:
we also mentioned recently that for data to appear, applications need to be
sending traces
https://github.com/openzipkin/zipkin#quick-start
you can tell also by hitting the /metrics endpoint and look at stats named
collector
https://github.com/openzipkin/zipkin/issues/1939
I opened a issue on the zipkin github, a theme already being treated as a bug.
Initial thread:
https://github.com/openzipkin/zipkin/issues/2218#issuecomment-432876510
Bug track:
https://github.com/openzipkin/zipkin/issues/2219
Tks for all!

JSF multi messages support not working

I've been using this approach (Persist and pass FacesMessages over multiple page redirects) in my application and it has been working fine.
Recently, the application was heavily changed and now the messages are no longer showing up. I tried to compare the source code, but there are just too many differences.
Looking at the log, it seems that the messages are only being added after MultiPageMessagesSupport finishes processing, and are lost with the redirect:
[#|2017-01-23T09:23:18.321+0000|SEVERE|glassfish 4.1||_TimeMillis=1485163398321;|
SAVING MESSAGES RESTORE_VIEW 1|#]
[#|2017-01-23T09:23:18.331+0000|SEVERE|glassfish 4.1||_TimeMillis=1485163398331;|
SAVING MESSAGES RESTORE_VIEW 1|#]
[#|2017-01-23T09:23:18.333+0000|SEVERE|glassfish 4.1||_TimeMillis=1485163398333;|
SAVING MESSAGES RENDER_RESPONSE 6|#]
[#|2017-01-23T09:23:18.333+0000|SEVERE|glassfish 4.1||_TimeMillis=1485163398333;|
RESTORING MESSAGES RENDER_RESPONSE 6|#]
[#|2017-01-23T09:23:23.571+0000|INFO|glassfish 4.1||_TimeMillis=1485163403571;|
[ERROR] ecc_src - Failed to access the WSDL at: http://epms:10130/endpoint?wsdl. It failed with:
Connection refused: connect.|#]
[#|2017-01-23T09:23:23.571+0000|SEVERE|glassfish 4.1||_TimeMillis=1485163403571;|
MESSAGES ADDED AT PHASE RENDER_RESPONSE 6|#]
I've tried comparing the usual suspects (faces-config.xml, web.xml, filters), but can't find anything that justifies this change of behavior.
Can someone give me some hints on what should I be looking for?
EDIT #1
Following #Kukeltje suggestion, I've double checked all external components and noticed that Omnifaces' version was different (currently 2.5.1, previously 2.0). Switching back to version 2.0 was enough to make the issue go away.
I'll investigate further and check in which version of Omnifaces this behavior has changed (I'll try versions 2.1, 2.2, 2.3 and 2.4).
EDIT #2
It works fine with Omnifaces' versions 2.1 and 2.2 and stops working from versions 2.3 and on.

OpenJPA 2.1.1 enhancement problem on Glassfish 3.1.1

My problem is this exception:
Caused by: <openjpa-2.1.1-r422266:1148538 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: This configuration disallows runtime optimization, but the following listed types were not enhanced at build time or at class load time with a javaagent: "
I'm trying to get an very simple java application with jsf and jpa running, but there seems to be a problem with the enhancement of my entities. As far as I know, tries OpenJPA to enhance my entities at runtime, which are listet in the persistence.xml, however there is no agent to do this. The keyword for this is: Enhancing at Runtime, right?
I thought the enhancement will automatically done by the application server at deployment? How can I configure this?
My exactly environment:
Glassfish 3.1.1
Derby, which is integrated in Glassfish
OpenJPA 2.1.1
Mojarra JSF 2.1.3
Update #1:
After some comments I've added the following lines to my persistence.xml:
<property name="openjpa.DynamicEnhancementAgent" value="false"/>
<property name="openjpa.RuntimeUnenhancedClasses" value="supported" />
It works now, but OpenJPA throw this warning:
SEVERE: 52 myApp WARN [http-thread-pool-8080(5)] openjpa.Enhance - Creating subclass for "[class myApp.model.entities.AbstractEntity, class myApp.model.entities.Post]".
This means that your application will be less efficient and will consume more memory than it would if you ran the OpenJPA enhancer. Additionally, lazy loading will not be available for one-to-one and many-to-one persistent attributes in types using field access; they will be loaded eagerly instead.
I think this can't be the solution.
Update #2:
Refer to fvu's answer, I've tried to define the -javaagent jvm parameter in the domain.xml and over the web admin console. After a restart appeared the problem again.
Update #3:
Refer to update #2, I've played a bit around. There must be thrown an error, when the -javaagent parameter is used, but the file is missing, right?. Yes, there it is:
Waiting for domain1 to start .Command start-domain failed.
Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
Error occurred during initialization of VM
agent library failed to init: instrument
Error opening zip file or JAR manifest missing : /tmp/openjpa.jar
If I copying the agent to this location, this error doesn't appear, but openjpa could still not enhance my entities!
If you're still having issues... I'd highly recommend biting the bullet and setting up build time enhancement. You'll be much happier in the long run if you get that going.
A couple of ideas:
add the Java agent for enhancement to GF's JVM option, see this link for an example of how to install a javaagent and OpenJPA's doc 5.2.3, enhancing at runtime. That emulates enhancer activation in desktop apps as closely as possible IMO.
However, when I read chapter 5.2.4 of the OpenJPA docs it might be capable of picking up the correct enhancer automatically. Try copying openjpa.jar to the domain's library directory, and check what happens after a server restart.

Richfaces 3.x under weblogic 8.1

I have been developing a small project meant to run under weblogic 8.1.
Richfaces according to documentation states that it supports weblogic 8.1.
Weblogic 8.1 uses servlet specification 2.3 with jsp 1.2
This has been working on my locally installed version of weblogic 8.1 but when deploying to the sparc server, I start running into trouble. I have worked through some of the initial headaches, but then I got an error 500 and couldnt get the details. But after some effort I have come out with this...
javax.servlet.ServletException: javax/servlet/jsp/JspContext
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:344)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6987)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
JspContext is not part of jsp 1.2 it's newer. I am thinking this exception is originally a ClassNotFoundException or something similar considering the message. There is no 'cause' attached to the exception.
Following are the jar files contained in my web-application.
antlr-2.7.6.jar
asm-1.5.3.jar
asm-attrs-1.5.3.jar
cglib-2.1_3.jar
commons-beanutils-1.6.jar
commons-collections-3.2.jar
commons-digester-1.5.jar
commons-lang-2.4.jar
commons-logging-1.0.3.jar
dom4j-1.6.1.jar
ehcache-1.2.3.jar
hibernate-3.2.4.sp1.jar
jsf-api-1.1_02.jar
jsf-impl-1.1_02.jar
jstl-1.0.jar
jta-1.1.jar
log4j-1.2.15.jar
richfaces-api-3.1.6.SR1.jar
richfaces-impl-3.1.6.SR1.jar
richfaces-ui-3.1.6.SR1.jar
xercesImpl-2.9.1.jar
xml-apis-1.3.04.jar
I'm running out of options, I'll be trying to figure out who has the dependency on the JspContext class... but if someone could give me some insight it would be greatly appreciated. Oh, I cannot make many changes to the production web-logic server. I'd prefer not to make any at all, chances are those changes will be denied
Oh this error occurs when attempting to view the page, so deployment is successful.
Ok, I have solved my problem. Not the way I wanted to but it's working (atleast to what I know right now).
After using google (again) I found a comment with someone mentioning using richfaces 3.0.1.
Now I have seen many people say use version xxx even 3.3.x. After all I did get it working with 3.1.6 but on the windows version of weblogic (which could have possibly been tainted by some other weblogic version I have installed).
So I have modified my pom for maven to depend on:
<groupId>org.richfaces</groupId>
<artifactId>richfaces</artifactId>
<version>3.0.1</version>
This is not optimal, but I geuss it works.
Some taglibrary references needed changing, and packages changed to some extent.
I could post my project configuration for this if anyone ever needs it. Getting this all to work on weblogic 8.1 was not straight forward. But the reference documentation for 3.1.6 is to my knowledge incorrect by saying it support weblogic 8.1
jsp-api-2.1.jar contains the missing class, so you could try using it (either replace it in weblogic, or try in your /lib), but I can't predict what would happen.

Resources