How can i disable FINE level logs on JBoss EAP 7.2? - jboss

I am trying to disable FINE level logs on JBoss EAP7.2, is there way to disable them by modifying standalone.xml or another config file?

The preferred option would be to use the web console or CLI. For a logger that is already configured:
/subsystem=logging/logger=your.logger.name:write-attribute(name=level, value=INFO)
If the root logger has been set to fine/debug then you can change that like:
/subsystem=logging/root-logger=ROOT:write-attribute(name=level, value=INFO)
If you want to only see INFO and higher messages on a specific handler:
/subsystem=logging/console-handler=CONSOLE:write-attribute(name=level, value=INFO)

Related

Jboos connectivity Issue

I am getting the following error when trying to connect my application to jboss:
WARN | ISPN004022: Unable to invalidate transport for server:
/127.0.0.1:12222 ERROR | ISPN004017: Could not fetch transport
org.infinispan.client.hotrod.exceptions.TransportException:: Could not
connect to server: /127.0.0.1:12222
Tried searching a lot for a solution. It would be great is someone could help me out with this. Thanks
You must recall the following actions:
Make sure that your webapp is using the same port as defined in the socket-binding definitions for hotrod in the standalone.xml for JDG configuration folder;
Make sure that your webapp is using the proper inject annotations for your RemoteCacheManager class (remember to use the #ApplicationScopped annotation at the class definition and for additional methods used to get the cache instance);
If you are using JBoss and JDG on the same host, you must check declarations of the JBOSS_HOME environment variable. This variable must be assigned to the JDG installation home directory and not the JBoss EAP home (check also port-offset settings at startup if you're using a custom shell script);
If you are not using both products on the same host, check firewall and network settings;
Remember to re-deploy the application always after every modification and check both EAP and JDG console output for warnings and/or errors.
The following errors are related (for example):
14:38:42,610 WARN [org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory] (http-127.0.0.1:8080-1) ISPN004022:
Unable to invalidate transport for server: /127.0.0.1:11322
14:38:42,610 ERROR [org.infinispan.client.hotrod.impl.transport.tcp.TcpTransportFactory] (http-127.0.0.1:8080-1) ISPN004017:
Could not fetch transport: java.lang.IllegalStateException: Pool not open

How can I set http.port in application.conf by using playframework2.4(Scala)

I could set http.port in applicaton.conf by using playframework1.2.7
like this
http.port = 9020
jpda.port = 8020
also jdpa.port.
But in play2.4.
I cannot set http.port in application.conf like this.
I know that I can do like this when I run this project.
activator "run 9020"
But it is too troublesome for me.
If you have some ideas,
please share your idea.
You cannot specify port in aaplication.conf during run mode (but this can be used while deploying).
In run mode the HTTP server part of Play starts before the application has been compiled. This means that the HTTP server cannot access the application.conf file when it starts. If you want to override HTTP server settings while using the run command you cannot use the application.conf file. Instead, you need to either use system properties or the devSettings setting shown above.
Source: https://www.playframework.com/documentation/2.4.x/Configuration#HTTP-server-settings-in-application.conf
Also look at full server configuration options
https://www.playframework.com/documentation/2.4.x/ProductionConfiguration#Server-configuration-options

Cant access to FTP using Eclipse

I am using the Remote System software on Eclipse. I can successfully log in to my FTP account but when I try to view the directories, I get the following message:
Message: Operation failed due to network I/O error
'java.net.SocketException: Connection reset by peer: socket write
error'
Any ideas are welcome.
Looks like there could be some negotiation issue.
Try following solution:
I've got the same exception and in my case the problem was in a
renegotiation procecess. In fact my client closed a connection when
the server tried to change a cipher suite. After digging it appears
that in the jdk 1.6 update 22 renegotiation process is disabled by
default. If your security constraints can effort this, try to enable
the unsecure renegotiation by setting the
sun.security.ssl.allowUnsafeRenegotiation system property to true.
http://www.oracle.com/technetwork/java/javase/overview/tlsreadme2-176330.html
Setting the System Properties/Mode Configuration The various modes are
set using the corresponding system properties, which must be set
before the SunJSSE library is initialized. There are several ways to
set these properties:
From the command line:
% java -Dsun.security.ssl.allowUnsafeRenegotiation=true Main Within
the application:
java.lang.System.setProperty("sun.security.ssl.allowUnsafeRenegotiation",
true); In the Java Deployment environment (Plug-In/Web Start), there
are several ways to set the system properties. (See Java Web App and
Next Generation Web Browser Plugin for more information.)
Use the Java Control Panel to set the Runtime Environment Property on
a local/per-VM basis. This creates a local deployment.properties file.
Deployers can also distribute a enterprise-wide deployment.properties
file by using the deployment.config mechanism. (See Deployment
Configuration File and Properties.)
To set a property for a specific applet, use the HTML subtag
"java_arguments" within the tag. (See Java Arguments.)
To set the property in a specific Java Web Start application or applet
using the new Plugin2 (6u10+), use the JNLP "property" sub-element of
the "resources" element. (See Resources Element.)

Connect HermesJMS to Wildfly 8.2

we recently changed our Application Server from Glassfish to Wildfly. With Glassfish we used QBrowser to monitor our JMS Queues, sadly that tool does not work with Wildfly.
After a quick search I found the Tool HermesJMS. Although there are lots of guides how to set up a connection to a JMS queue with it I couldn´t find anything directly for the JBoss Wildfly application server. After lots of reading through different guides I think I can now connect to the wildfly server but I just can´t connect to my jms queues.
First I tried to connect via JNDI InitialContext. Here´s my settings for it:
initialContextFactory: org.jboss.naming.remote.client.InitialContextFactory
providerURL: http-remoting://localhost:
urlPkgPrefixes: org.jboss.naming.remote.client
securityPrincipal: admin
securityCredentials: admin
It does connect but all I see are my deployed web applications and a "jms" folder. But they all contain the same web-applications again plus the jms folder and appear as a red circle with a white X in it.
So next I tried to set up a session manually via "Create new JMS Session" with following preferences:
Session: HornetQ
Plugin: HornetQ
Properties:
binding: jms/RemoteConnectionFactory
initialContextFactory: initialContextFactory: org.jboss.naming.remote.client.InitialContextFactory
providerURL: http-remoting://localhost:
urlPkgPrefixes: org.jboss.naming.remote.client
User: guest Password: pass
The guest user is an user I created in Wildfly as an application user
When I then double click on one of the queues it says that there is no such queue.
javax.jms.JMSException: There is no queue with name java:jboss/jms/queue/ngsEmailProvRequestQueue
at org.hornetq.jms.client.HornetQSession.createQueue(HornetQSession.java:397)
at hermes.impl.jms.SimpleDestinationManager.createDesintaion(SimpleDestinationManager.java:60)
at hermes.impl.JNDIDestinationManager.createDesintaion(JNDIDestinationManager.java:105)
at hermes.impl.jms.SimpleDestinationManager.getDestination(SimpleDestinationManager.java:137)
at hermes.impl.jms.AbstractSessionManager.getDestination(AbstractSessionManager.java:387)
at hermes.impl.DefaultHermesImpl.getDestination(DefaultHermesImpl.java:323)
at hermes.browser.tasks.BrowseDestinationTask.invoke(BrowseDestinationTask.java:122)
at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
at java.lang.Thread.run(Thread.java:745)
Does anybody know what I´m missing? Is it even possible to get HermesJms to work with Wildfly? Of if not is there an alternative monitoring tool for JMS queues?
Thank you for your help.
To work with Wildfly, follow this doc: https://developer.jboss.org/wiki/UsingHermesJMSWithHornetQ
Second part: Configuring HermesJMS for JBoss7 / EAP6 with HornetQ
And change those values:
binding=jms/RemoteConnectionFactory
initialContextFactory=org.jboss.naming.remote.client.InitialContextFactory
providerURL=http-remoting://localhost:8080
urlPkgPrefixes=org.jboss.naming.remote.client
In the destinations, change also:
Name: sample
Domain: QUEUE
Maybe you could have a look at JMSToolbox on sourceforge: https://sourceforge.net/projects/jmstoolbox/?source=directory
i recently revisited this as the team is moving from glassfish (yaye...) to wildfly. I tried with wildfly9 and it works.
I think it is a matter of exporting your queue name. see below
java:/jms/queue/test does not work
java:jboss/exported/jms/queue/test works
Note: wildfly9.2 is the final version that has hornetq. wildfly 10++ supports artemis instead.

Cannot get Glassfish to log my apps debuug level logs

I am using commons-logging swith the following commons-logging.properties:
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
I have set my app logger to FINEST in GF4 ui management console but it only logs INFO messages. Any ideas why?
Also where is it more appropriate to set my log levels, under server-config or default-config?
Thanks
I managed to find the answer in Oracle's documentation. GF3 (and apparently GF4) set the min level to the root level to INFO. The global log settings must be changed in GF props file: logging.properties which is usually under the domain/conf directory
http://docs.oracle.com/cd/E19798-01/821-1751/ghmep/index.html