JBoss EAP 6.1 + HornetQ cannot enable AIO - jboss6.x

I'm trying to enalbe AIO on ERHL (6) running Jboss EAP 6.1 with messaging enabled (HornetQ). I enabled ASYNCIO in the journal-type, but when I start the server I get:
13:00:00,307 WARN [org.jboss.as.messaging] (MSC service thread 1-3) JBAS011600: AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
I know, 'libaio' is already installed:
Package libaio-0.3.107-10.el6.x86_64 already installed and latest version
What do I need to do to get it working?
Thanks.

By default JBoss EAP 6 don't include jbossas-hornetq-native package. Take a look in the following links:
Installing Native Components and Utilities
Install Native Components and Native Utilities (RPM
Installation)
$ yum groupinfo jboss-eap6
Group: JBoss EAP 6
Mandatory Packages:
jbossas-appclient
jbossas-bundles
jbossas-core
jbossas-domain
jbossas-hornetq-native
jbossas-jbossweb-native
jbossas-modules-eap
jbossas-product-eap
jbossas-standalone
jbossas-welcome-content-eap
jbossas-hornetq-native package
$ rpm -ql jbossas-hornetq-native
/usr/share/jbossas/modules/org/hornetq/main/lib
/usr/share/jbossas/modules/org/hornetq/main/lib/linux-x86_64
/usr/share/jbossas/modules/org/hornetq/main/lib/linux-x86_64/libHornetQAIO.so
Note the jbossas-hornetq-native package is included for high availability in JBoss EAP 6 but it is not activated by default.

Related

In Ubuntu, How to set Tomcat 9 to use Java 17?

As the title described, in Ubuntu 20.04 how to set Tomcat 9 to use Java 17 ?
Recently I repacked the war file of my web project with Spring Boot 3.0.1 which requires Java 17 to run, trying to deploy it to Tomcat 9 container at an Ubuntu 20.04 server.
It seems that the best way is to utilize the setenv.sh.
I've followed some documents,
created a folder bin in /usr/share/tomcat9, touched file of setenv.sh,
edited its content with JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64.
Then run sudo systemctl start tomcat9, but failed.
sudo systemctl status tomcat9 said "No JDK or JRE found - Please set the JAVA_HOME variable or install the default-jdk package",
Installed openjdk-17-jre-headless, and removed openjdk-11-jre-headless at first. Both Tomcat9 and JRE 17 is installed by apt package manager.
Even if you managed to run tomcat 9 with java 17, a web app using spring boot 3.x or spring framework 6.x would still not be able to run there.
Reason is that starting with spring boot 3.0 or spring framework 6.0 the web application needs to conform to jakarta servlet api. According to doc for tomcat the jakarta servlet api (servlet v5.0) is supported from tomcat 10 and later.
As described in doc
Apache Tomcat 10.0.x
Apache Tomcat 10.0.x builds on Tomcat 9.0.x and
implements the Servlet 5.0, JSP 3.0, EL 4.0, WebSocket 2.0 and
Authentication 2.0 specifications (the versions required by Jakarta EE
9 platform).
So you have to use tomcat 10 instead of tomcat 9.

Pupperserver with Adopt-OpenJDK

We are in transition from Puppetmaster 3.8 to Puppet server(OpenSource) 5.3.
As a prerequisite for Puppetserver 5.3 installation requires Java 8 runtime packages. Can we install Adopt-OpenJDK with Pupperserver 5.3?
Puppetserver runs just fine on OpenJDK, but I strongly recommend that you run the server on an officially-supported platform (RHEL, CentOS, Debian, Ubuntu, or SLES), and use one of Puppet, Inc.'s official packages for that system. These each express a dependency on an appropriate Java 8 package, and they will configure Puppet properly to work in conjunction with that implementation. On the platforms for which I have knowledge of the details, it is the distro's OpenJDK build that is used.
It should be possible to [re]configure Puppetserver to use an Adopt-OpenJDK implementation of the Java 8 runtime, but this is swimming upstream.
Thanks John.Adding one more point here puppetserver has a dependency on openjdk-8-jre-headless:amd64.But adopt open jdk is not providing headless package.So we suspect this may cause issue as puppetserver will look for the headless package.

`dotnet new command` in openSuse causes `No usable version of the libssl was found` error

I'm trying to develop .NET Core in openSuse. I did install the SDK and everything in tutorials. Now, when I try to run dotnet new console command, I get this error:
No usable version of the libssl was found
Aborted (core dumped)
I found this answer: (.NET Core 2.1 SDK Linux x64 No usable version of the libssl was found), but didn't get what should I do to solve problem. They seems are deep-linuxer (which I'm not, I'm just trying to learn linux). Have any idea how to run the command?
UPDATE: System info:
openSUSE Leap 15.0
Kernel Version 4.12.14-lp150.12.22-default
OS Type:64-bit
I was having the same problem running sqlpackage on Ubuntu 20.04 while dotnet was working regularly.
dotnet is distributed through apt as well as sqlserver, but for some reasons sqlpackage is instead distributed via zip here (https://learn.microsoft.com/en-us/sql/tools/sqlpackage-download?view=sql-server-ver15) and is still affected by missing libssl1.0.
Solved with
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.6_amd64.deb
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.6_amd64.deb
Can you install the libopenssl1_0_0 packages? .NET Core should pick it up and use it.
A slightly longer explanation for anyone who is curious:
OpenSSL is one of the most common cryptographic libraries used on Linux. It has multiple versions. Version 1.0 is kind of old, but heavily used. 1.1 is the newer version that was (relatively) recently released. 1.0 and 1.1 are not compatible. An application that expects 1.0 can not build against 1.1, nor run against it.
.NET Core 2.1, and all earlier versions only support OpenSSL 1.0.
Many Linux distributions are starting to make OpenSSL 1.1 the new default. But most of them still have a package for 1.0. So you just need to find and install that. On Fedora it's compat-openssl10. For openSuSE, it's libopenssl1_0_0. Then .NET Core will find it, pick it up and use it automatically.
Edit: As of March 2019, this shouldn't be required. We have updated .NET Core 2.1 and later to pick up and work with either OpenSSL 1.1 or 1.0 (whatever is available). So this problem should no longer happen with recent releases of .NET Core.
Ubuntu 22.04
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb
Still get this on Fedora 30 (with compat-openssl10 installed) when using the sqlpackage tool (https://learn.microsoft.com/en-us/sql/tools/sqlpackage-download?view=sql-server-2017).
$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.2.203
Commit: e5bab63eca
Runtime Environment:
OS Name: fedora
OS Version: 30
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/2.2.203/
Host (useful for support):
Version: 2.2.4
Commit: f95848e524
.NET Core SDKs installed:
2.2.203 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.4 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.4 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Dotnet works fine on it's own. But running sqlpackage does not work:
$ sqlpackage /tsn:localhost /tu:xx /tp:yyy /A:Import /tdn:mydb /sf:mydb.bacpac
Importing to database 'mydb' on server 'localhost'.
No usable version of the libssl was found
Aborted (core dumped)
I looking up "No usable version of the libssl was found" in github. You'll find many variants of the .Net core security library in C, each varient has very specific dll loads for exact libssl libraries and everything has to match perfect despite it being named differently in many.
For raspberry pi / debian it wants libssl 1.0.2 exactly, nothing else.
sudo apt-get install libssl1.0.2
should do the trick for the pi! I can't speak to other variants.

What's the location of the JavaFX runtime JAR file, jfxrt.jar, on Linux?

I'm trying to run some JavaFX code with Eclipse Kepler, with e(fx)clipse plugin installed, on a Linux machine, using:
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-5)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
My understanding is that although JavaFX has been included with the standard JDK since version JDK 7u6, the JavaFX runtime JAR file, jfxrt.jar, was left off of the Java runtime path on purpose until further testing between JavaFX and rest of the java infrastructure has been completed. For this reason you must manually add it to the project build path libraries when we create a new Java project.
I've been looking for that jar in both the following directories without success:
/usr/lib/jvm/java-7-openjdk-common/jre/lib/
/usr/lib/jvm/java-7-openjdk-amd64/lib
Where else should I look for it?
Update March 2021
The previous information in this answer is now obsolete for later versions of Java and JavaFX (e.g. Java 11+). This update provides info for more recent versions.
JavaFX is now available from openjfx.io or the public Maven repository as an SDK or a library set, or a module set. JavaFX has been partitioned into a set of dependencies rather than a monolithic jfxrt.jar library distributed with the Java runtime (as was previously the case with Oracle Java 8 for instance).
With versions 11+ of JavaFX, the location of the JavaFX jar files (and the native libraries to accompany them) will depend on how you build your project. For example:
If you use a build tool such as Maven or Gradle and specify JavaFX as a dependency, then the JavaFX jar files will be downloaded into your local Maven or Gradle repository (the same as other maven dependencies).
If you download the JavaFX SDK from openjfx.io (gluon), then the JavaFX jar files will be in the location you unzipped the SDK to.
The location of jfxrt.jar in Oracle Java 7 is:
<JRE_HOME>/lib/jfxrt.jar
The location of jfxrt.jar in Oracle Java 8 is:
<JRE_HOME>/lib/ext/jfxrt.jar
The <JRE_HOME> will depend on where you installed the Oracle Java and may differ between Linux distributions and installations.
jfxrt.jar is not in the Linux OpenJDK 7 (which is what you are using).
An open source package which provides JavaFX 8 for Debian based systems such as Ubuntu is available. To install this package it is necessary to install both the Debian OpenJDK 8 package and the Debian OpenJFX package. I don't run Debian, so I'm not sure where the Debian OpenJFX package installs jfxrt.jar.
Use Oracle Java 8.
With Oracle Java 8, JavaFX is both included in the JDK and is on the default classpath. This means that JavaFX classes will automatically be found both by the compiler during the build and by the runtime when your users use your application. So using Oracle Java 8 is currently the best solution to your issue.
OpenJDK for Java 8 could include JavaFX (as JavaFX for Java 8 is now open source), but it will depend on the OpenJDK package assemblers as to whether they choose to include JavaFX 8 with their distributions. I hope they do, as it should help remove the confusion you experienced in your question and it also provides a great deal more functionality in OpenJDK.
My understanding is that although JavaFX has been included with the standard JDK since version JDK 7u6
Yes, but only the Oracle JDK.
The JavaFX version bundled with Java 7 was not completely open source so it could not be included in the OpenJDK (which is what you are using).
In you need to use Java 7 instead of Java 8, you could download the Oracle JDK for Java 7 and use that. Then JavaFX will be included with Java 7. Due to the way Oracle configured Java 7, JavaFX won't be on the classpath. If you use Java 7, you will need to add it to your classpath and use appropriate JavaFX packaging tools to allow your users to run your application. Some tools such as e(fx)clipse and NetBeans JavaFX project type will take care of classpath issues and packaging tasks for you.
Mine were located here on Ubuntu 18.04 when I installed JavaFX using apt install openjfx (as noted already by #jewelsea above)
/usr/share/java/openjfx/jre/lib/ext/jfxrt.jar
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jfxrt.jar
On Ubuntu with OpenJDK, it installed in /usr/lib/jvm/default-java/jre/lib/ext/jfxrt.jar (technically its a symlink to /usr/share/java/openjfx/jre/lib/ext/jfxrt.jar, but it is probably better to use the default-java link)
The location of jfxrt.jar in JDK 1.8 (Windows) is:
C:\Program Files\Java\jdk1.8.0_05\jre\lib\ext\jfxrt.jar

Can i install JBOSS SOA-P into existed JBOSS EAP 5.1?

On my server UBUNTU SERVER 12.04 LTS, I installed JBoss EAP 5.1, and everything is working perfectly. Now I need to install JBOSS ESB, JBPM and JBoss Web Services. These 3 packages (except perhaps JBoss Web Services) are contained in JBoss SOA-P 5.2.
Given that JBoss SOA-P also contains JBoss EAP, how do I proceed? Is there a way to install individual packages missing, or can I install SOA-P on EAP? How?
If you have SOA-P 5.2 then I would just install and use that. EAP is included in the SOA-P and everything else you need, i.e. web services etc. should be in the jboss tools (I get them from the nightlies update site aka jboss soa tools). What is your end goal? Do you have a specific project or set of projects that are EAP specific?
also see this: JBoss Enterprise Application Platform vs JBoss Enterprise SOA Platform

Resources