Setup JMX exporting in Wildfly 15 domain configuration with JDK11 - jmx

I'm trying to setup JMX exporting to plug in Prometheus metrics. Wildfly 15 with Java 11 is used. In domain config I have such a block:
<jvm-options>
<option value="-Djboss.modules.system.pkgs=org.jboss.byteman,org.jboss.logmanager"/>
<option value="-Djava.util.logging.manager=org.jboss.logmanager.LogManager"/>
<option value="-Xbootclasspath/a:/opt/wildfly/wildfly-15.0.1.Final/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.5.Final.jar:/opt/wildfly/wildfly-15.0.1.Final/jboss-modules.jar:/opt/wildfly/wildfly-15.0.1.Final/modules/system/layers/base/org/slf4j/impl/main/slf4j-jboss-logmanager-1.0.3.GA.jar:/opt/wildfly/wildfly-15.0.1.Final/modules/system/layers/base/org/wildfly/common/main/wildfly-common-1.4.0.Final.jar"/>
<option value="-javaagent:/opt/wildfly/wildfly-15.0.1.Final/jmx_prometheus_javaagent-0.3.1.jar=58080:/opt/wildfly/wildfly-15.0.1.Final/jmx_prometheus.yml"/>
</jvm-options>
This setup works fine with Java8, a similar setup works fine in Wildfly 10.
But the Wildfly15+Java11 bundle results in such an error:
[Server:wf01] Exception in thread "main" java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
Tried various workarounds found all over the Internet but to no avail. Any clues?

Related

Chef Cookbooks: Installing Jenkins plugin with chef failing

I am trying to setup a Jenkins server using one of the Chef cookbooks from the supermarket. Unfortunately it is failing with the below error. The plugin recipe requires for the Global security configuration - "Enable CLI with remoting" to be enabled. Can anybody help me to enable it from a Chef recipe so that
java -jar jenkins-cli.jar -s http://localhost:8080 -remoting
installs the plugin.
Thanks
Here is the error log
java.io.IOException: No X-Jenkins-CLI2-Port among [X-Jenkins, null, Server, X-Content-Type-Options, X-You-Are-In-Group-Disabled, X-Hudson, X-Permission-Implied-By, Date, X-Jenkins-Session, X-You-Are-Authenticated-As, X-Required-Permission, Set-Cookie, Expires, Content-Length, Content-Type]
at hudson.cli.CLI.getCliTcpPort(CLI.java:311)
at hudson.cli.CLI.<init>(CLI.java:137)
at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:82)
at hudson.cli.CLI._main(CLI.java:615)
at hudson.cli.CLI.main(CLI.java:426)
Suppressed: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/cli?remoting=true
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:101)
at hudson.cli.CLI.connectViaHttp(CLI.java:163)
at hudson.cli.CLI.<init>(CLI.java:141)
As per the official documentation, remoting option is disabled by default. you can enable it by going to Configure Global Security. I don't think by programatically we can't enable it. For more details use this official link. Remoting Connection Mode | official Jenkins
This is the solution they are providing for your problem. Hope this helps.
Go to Manage Jenkins > Configure Global Security and choose "Fixed" or "Random" under TCP port for JNLP agents.
You can enable the remoting option by writing a bit of Groovy that gets run when Jenkins starts, but a better option is to configure the proper authentication and use the ssh or http methods.
https://github.com/chef-cookbooks/jenkins#authentication
See also: https://stackoverflow.com/a/51106793/3794873

Fatal slow performance after Grails 3 upgrade

I have updated small application to Grails 3.2.3. After some issues this is now resolved Grails 3.x update - bootRun failed
But unfortunately the application is unusable. On my high-end laptop ThinkPad 460p I cant even load home page of application. It's loading for ages and then CSS styles are not loaded at all. There is no error messages for grails run-app or IDEA Run Configuration.
I have no idea what to do now, all configuration is described here Grails 3.x update - bootRun failed
Thank you.
Chrome network profiling
Are you behind a company firewall? Are your pages trying to access remote javascript and/or css files? The process trying to access these may hang or timeout eventually.

Configuring Geb and Spock on Jenkins (Grails)

I cannot use port 8080 for my testing. When I set the port to another open port (8090) Geb-Spock tests work fine, but only while running locally on IntelliJ. However, if I try and run a Jenkins build, I come out empty handed. I am pretty certain the problem has something to do with my GebConfig.groovy.
Note: I am using xvfb to aid the browser, and I am fairly certain it is configured correctly as it is producing results when configured to 8080.
Running on port 8090...
Running on port 8080...
Attempted Solutions:
Specify which port to use in Jenkins run configuration (which seems to get the server running just fine)
grails -Dgrails.server.port.http=8090 test-app functional: -echoOut --refresh-dependencies
There is also an option in the Jenkins grails build to set the port, which works just as well
peform a grails clean before running
Various configurations within GebConfig.groovy, including changing the baseUrl
The first example from Book of Geb
import org.openqa.selenium.firefox.FirefoxDriver
driver = { new FirefoxDriver() }
The geb-grails example - https://github.com/geb/geb-example-grails/blob/master/test/functional/GebConfig.groovy
No GebConfig at all
Other info:
Grails Version: 2.3.6
Java Version: 1.7.0_79 (open jdk)
OS: Fedora 20 (local), Ubuntu server 12 lts (Jenkins)
IntelliJ: 14.0
BuildConfig.groovy
dependencies{
test "org.gebish:geb-spock:0.10.0"
test "org.seleniumhq.selenium:selenium-support:2.45.0"
test "org.seleniumhq.selenium:selenium-firefox-driver:2.45.0"
}
plugins{
test ":geb:0.10.0"
}

Deploying Grails Atmosphere app in JBoss 7

Greeting,
I'm trying to make this example work in Grails 2.1 using atmosphere plugin. When running in development environment on Tomcat it does not work, probably because Tomcat does not support web-services.
So I'm deploying it on JBoss 7.1. It does not work as well. And the following exception could be found in the log file
AtmosphereFramework exception: java.lang.IllegalStateException: The servlet or filters
that are being used by this request do not support async operation
I found the article related to async servlets support in Grails. Seems that Servlet3AsyncWebXmlProcessor should add async support to web.xml. But somebody should invoke it.
I think that atmosphere plugin is responsible for allowing async communication.
Have I missed something? Could you please help to make it work on AS7?
Ideally, I would like to figure out the way of running atmosphere applications in development environment? Is it possible?

JBoss 6 migration: error deploying grails app

I am attempting to deploy a war (a grails 1.3.7 app) to an jboss 6 which had been in a jboss 5 environment. The war is not dependent on jboss services or j2ee (it could have been deployed straight to tomcat). When deploying to jb6, I get the following error message:
14:54:17,281 ERROR [AbstractKernelController] Error installing to Real:
name=vfs:///opt/jboss-6.0.0.Final/server/jbossweb-standalone/deploy/pip.war
state=PreReal mode=Manual requiredState=Real:
org.jboss.deployers.spi.DeploymentException: Error during deploy:
vfs:///opt/jboss-6.0.0.Final/server/jbossweb-standalone/deploy/app.war
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:185) [:2.2.0.GA]
...
...
...
Caused by: java.lang.RuntimeException: Neither any mapped-name/lookup/jndi-name
specified nor any ResourceProvider could process resource-env-ref named env/cxf
of type org.apache.cxf.Bus
It seems as though JBoss support services are not able to get created, but don't see any underlying problems preventing the service creation. Also some other web apps are deployed to this instance of jboss, so the overall installation is "sound". I've done some investigation, but not sure where to go next. Any ideas as or pointers as to the likely problem?
This looks like a problem with JNDI, you have a reference to a JNDI in your project, more than likely your web.xml, this resource is not defined as a service in your Jboss server deploy directory, for instance a jdbc.xml definition you are relying on.

Resources