Can setup WildFly 18 for automatic restart JVM after crash? - wildfly

can I setup WildFly 18 for automatic restart after a JVM crash?
We use the JNI interface for native applications and we has a periodicly crash JVM. Use full-ha and ha modes does't work. Аfter JVM-crash, we should manually start server.

WildFly AS is not able to restart itself after JVM crash. You can't configure this on the application server level.
Operating System should be able to monitor services and restart them after crashes.
If you are using linux based system, you can utilize systemctl manager. See following:
How to configure Systemd for starting WildFly
General information about Systemd and Systemctl

Related

how to start/stop tomcat 8 in redhat 7 using systemct

I'm running apache-tomcat-8.5.51 on RHEL 7.7 and are using a SysV init script to start/stop it. However, it seems that RHEL 7 doesn't use SysVinit to restart services after a reboot. Does anyone have the systemd/systemctl configuration for starting/stopping tomcat ? (And of course, RHEL7 stopped providing tomcat at tomcat7, not 8.)

Install kubernetes on debian stretch server without systemd

I am trying to install Kubernetes on Debian 9 (stretch) server, which is on cloud and therefore can't do virtualization. And it doesn't have systemd. Also, I'm trying for really minimal configuration, not big cluster.
I've found Minikube, https://docs.gitlab.com/charts/development/minikube/index.html which is supposed to run without virtualization using docker, but it requires systemd, as mentioned here https://github.com/kubernetes/minikube/issues/2704 (and yes I get the related error message).
I also found k3s, https://github.com/rancher/k3s which can run either on systemd or openrc, but when I install openrc using https://wiki.debian.org/OpenRC I don't have the "net" service it depends on.
Then I found microk8s, https://microk8s.io/ which needs systemd simply because snapd needs systemd.
Is there some other alternative or solution to mentioned problems? Or did Poettering already bribed everyone?
Since you are well off the beaten path, you can probably just run things by hand with k3s. It's a single executable AFAIK. See https://github.com/rancher/k3s#manual-download as a simple starting point. You will eventually want some kind of service monitor to restart things if they crash, if not systemd then perhaps Upstart (which is not packaged for Deb9) or Runit (which itself usually runs under supervision).

The server may already be running in another process

Several ports (8005, 8080) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
Can you please tell me what is the problem with Tomcat. I am running it on my Ubuntu machine.
Are you using tomcat with apache or other engine? If so you would have to change apache or tomcat ports so they do not overlap.
Maybe you start tomcat on system start and then you try to run it from eclipse? Before starting eclipse try to shutdown tomcat server.

How to install features in JBOSS FUSE?

I am able to check all the features using features:list
I wanted to install certain features in JBOSS Fuse, but the command
features:install camel-blueprint
is not working
I am getting error
Error executing command: The container is managed by fabric, please use fabric:profile-edit --featur
es camel-blueprint/0.0.0 target-profile instead. See fabric:profile-edit --help for more information.
How can install the required features in JBOSS FUSE.
in JBOSSFUSE_HONE/etc/org.apache.karaf.features.cfg file I have entry called featuresBoot and added all the needed features to be loaded in startup
But, the status for all the features are uninstalled.
JBoss Fuse uses profiles (fabric) to define what to install on container, so you edit profiles, and then assign profile(s) to containers.
Frankly its easier to watch a few videos to get more familiar
http://vimeo.com/album/2635012
For example the loan broker video is a good start.
If you do not want to use fabric, then you can install like old-school with manually commands like you do on Apache Karaf. But this requires you NOT to install fabric in JBoss Fuse.
Also there is the Red Hat JBoss Fuse documentation you can dive into (links to documentation from here)
http://www.jboss.org/products/fuse
You can also find more details at the fabric8 project (community project of JBoss Fuse) documentation at:
http://fabric8.io/#/site/book/doc/index.md?chapter=profiles_md
The short answer here is that you have probably already set up this instance of JBoss Fuse / Fuse Fabric to be container managed, via fabric:create.
To "reset" your local installation (be careful! this deletes all containers and related configuration), run this command in cygwin to delete data, instances and lock:
cd /wherever/fabric8-karaf-1.0.0.redhat-412
$ rm -rf data instances lock
Now, when you restart Fuse, you should be able to install features directly.
I have copied the text below from the error messages. It should work.
"please use 'fabric:profile-edit --features camel-blueprint/0.0.0 target-profile'"

How can i run java command as a service Centos 5?

i want to execute java -cp server.jar:mysql.jar server.NithServer this command as linux service how can i do that. & not working. centos 5
What's about using Java Service Wrapper?
It provides cross platform way of running java applications as services and also have a community version that should be enough for your purposes.
A seriously written service must have the bash script that accepts start, stop and restart parameters. Such script can be copied or better linked (original at /etc/init.d) to /etc/rc3.d or /etc/rc5.d and will be maintained by the system, executing shutdown and startup when required. Here there is a tutorial how to wrap Apache Tomcat as a service.