Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

0 votes
1 answers
5782 views
JAVA OPTS Xms Xmx MetaspaceSize MaxMetaspaceSize relationship with server resources
I have just started working with jboss application servers and recently we had a problem when trying to deploy an application in a new test server (RHEL 7), it happened that, when starting the jboss service (jboss eap 7.1) with the application in the deployment area, the server began to freeze, that...
I have just started working with jboss application servers and recently we had a problem when trying to deploy an application in a new test server (RHEL 7), it happened that, when starting the jboss service (jboss eap 7.1) with the application in the deployment area, the server began to freeze, that is, it began to respond extremely slowly and it was necessary to turn it off, we solved the problem simply by adding more cpu and ram, in the configuration (standalone.conf) there are these parameters: JAVA_OPTS="-Xms4096m -Xmx4096m -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m Could you give me a brief explanation of the meaning of each one and its relationship with the memory and cpu of the server? Is there any rule or recommendation to take into account to configure these parameters and server resources? Thanks in advance.
miguel ramires (9 rep)
Jul 11, 2022, 11:01 PM • Last activity: Jun 11, 2025, 04:05 PM
2 votes
1 answers
2112 views
HOWTO detect when JBOSS is fully up and running and ready to accept deployments?
I have a simple "sanity-check" webapp that I wish to deploy on a JBoss EAP server as soon as it is started. But what does "started" mean? If my script that calls the jboss cli is launched too soon after JBoss reports it's done, I get a message saying {"WFLYDC0074: Operation failed or was rolled back...
I have a simple "sanity-check" webapp that I wish to deploy on a JBoss EAP server as soon as it is started. But what does "started" mean? If my script that calls the jboss cli is launched too soon after JBoss reports it's done, I get a message saying {"WFLYDC0074: Operation failed or was rolled back on all servers. Server failures:" => {"server-group" => {"main-server-group" => {"host" => {"master" => {"master-1-server-1" => "WFLYCTL0379: System boot is in process; execution of remote management operations is not currently available"}}}}}} How can I detect that JBoss is **really** ready to handle deployments? Alternatively, is there a mechanism by which I can autodeploy something on startup?
Steve Cohen (519 rep)
Mar 22, 2017, 02:46 PM • Last activity: Apr 17, 2025, 08:03 AM
1 votes
1 answers
33 views
Automate passing JBOSS installer arguments using Expect Command
I have a JBOSS Installer which when run manually it will prompt for input and below is the sample of the execution is as below [sp@sp baseInstaller]$ ./advStart.sh config Buildfile: /home/sp/jboss/sp/baseInstaller/build.xml init: config: [groovy] coa.install.props properties [groovy] [groovy] ? indi...
I have a JBOSS Installer which when run manually it will prompt for input and below is the sample of the execution is as below [sp@sp baseInstaller]$ ./advStart.sh config Buildfile: /home/sp/jboss/sp/baseInstaller/build.xml init: config: [groovy] coa.install.props properties [groovy] [groovy] ? indicates a response is required from you [groovy] [value] is the current value [groovy] to keep current value just press [groovy] or type new value and press [groovy] {value,value..} shows the allowed values [groovy] installer version 6.0.3.4 [groovy] [groovy] Jboss Server Config Options (changeable after initial config) [groovy] ------------------------------------------------------------- [groovy] ? host [sp.resource.com] resource.com [groovy] ip=10.50.55.90 [groovy] host changed to resource.com [groovy] ? bind to host only or all ports (all has security implications) [groovy] [host] [groovy] {host,all,custom} all [groovy] bind to host only or all ports (all has security implications) changed to all [groovy] ? min memory 64 I tried to frame an expect script to automate this process and below is my script [sp@sp baseInstaller]$ cat saba.sh #!/usr/bin/expect # Accessing command line arguments set arg1 [lindex $argv 0] set arg2 [lindex $argv 1] # Printing the arguments puts "Argument 1: $arg1" puts "Argument 2: $arg2" cd /home/sp/jboss/sp/baseInstaller spawn ./advStart.sh config # Expect the prompt for the argument with a timeout of 10 seconds expect { "? host [sp.resource.com]" { # Send the host value send "$arg1\r" exp_continue } "? bind to host only or all ports (all has security implications)" { # Send the argument value send "$arg2\r" } timeout { puts "Error: Timed out while waiting for the prompt." exit 1 } eof } -timeout 10 # Wait for the script to finish wait Now while executing this script, it is getting struck in the below place and not proceeding further. Can you please help me about this? [sp@sp baseInstaller]$ expect saba.sh resource.com all Argument 1: resource.com Argument 2: all spawn ./advStart.sh config Buildfile: /home/sp/jboss/sp/baseInstaller/build.xml init: config: [groovy] coa.install.props properties [groovy] [groovy] ? indicates a response is required from you [groovy] [value] is the current value [groovy] to keep current value just press [groovy] or type new value and press [groovy] {value,value..} shows the allowed values
sabarish jackson (628 rep)
Mar 13, 2024, 10:43 AM • Last activity: Mar 13, 2024, 03:34 PM
0 votes
1 answers
521 views
RHEL service works when starting manually, but won't start automatically when enabled for reboot. (main process exited, code=exited, status=126/n/a)
I created a linux service to start a shell script when the server (re)starts. While testing my server I saw that the service is able to start when I do it manually but won't start when I enable it with "systemctl". What is causing this? My logs: **systemctl status script.service** script.service - n...
I created a linux service to start a shell script when the server (re)starts. While testing my server I saw that the service is able to start when I do it manually but won't start when I enable it with "systemctl". What is causing this? My logs: **systemctl status script.service** script.service - name Loaded: loaded (/etc/systemd/system/scriptname.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2024-03-04 15:39:34 CET; 3min 45s ago Process: 1303 ExecStart=/usr/local/bin/scriptname.sh (code=exited, status=126) Main PID: 1303 (code=exited, status=126) Mar 04 15:39:34 sar systemd: Started ######. Mar 04 15:39:34 sar systemd: scriptname.service: main process exited, code=exited, status=126/n/a Mar 04 15:39:34 sar systemd: Unit scriptname.service entered failed state. Mar 04 15:39:34 sar systemd: scriptname.service failed. **journalctl -u servicename.service | tail -n 50** -- Reboot -- Mar 04 15:39:34 sar systemd: Started #####. Mar 04 15:39:34 sar systemd: scriptname.service: main process exited, code=exited, status=126/n/a Mar 04 15:39:34 sar systemd: Unit scriptname.service entered failed state. Mar 04 15:39:34 sar systemd: scriptname.service failed.
ansible_usah (3 rep)
Mar 5, 2024, 08:53 AM • Last activity: Mar 5, 2024, 11:29 AM
2 votes
1 answers
3919 views
Some packets are flagged as INVALID by iptables
I configured a proxypass rule in order to redirect requests from the port 443 to a JBoss server running on port 8080. All works fine except some 503 errors in the Apache log, around 10 per day: In the error log: > [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (12...
I configured a proxypass rule in order to redirect requests from the port 443 to a JBoss server running on port 8080. All works fine except some 503 errors in the Apache log, around 10 per day: In the error log: > [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8080 (127.0.0.1) failed In the access log, I've a corresponding 503 error. Nothing in my JBoss log. For each error, coincide a packet flagged as invalid in the kernel log. I performed a tcpdump and for each invalid packet, it was a tcp SYN from the proxy to the JBoss server. Why these packets are flagged as invalid ? Is that a serious problem ? Can I accept all invalid packets from 127.0.0.1 to dport 8080 ?
Bob Sauvage (331 rep)
Feb 18, 2014, 08:50 AM • Last activity: Feb 23, 2024, 05:01 PM
0 votes
0 answers
117 views
Rc local keep stopping and restarting
I want jboss to start on boot. I created a simple script on rc.local nohup /data/jboss-eap-7.2/bin/startup-server.sh 0.0.0.0 & It started after booting, but when I check the log, there's some point where jboss stopped and the program restarted and ran again. How do I make it so Jboss just runs norma...
I want jboss to start on boot. I created a simple script on rc.local nohup /data/jboss-eap-7.2/bin/startup-server.sh 0.0.0.0 & It started after booting, but when I check the log, there's some point where jboss stopped and the program restarted and ran again. How do I make it so Jboss just runs normally without stopping and restarting?
alya (1 rep)
Jul 4, 2023, 03:54 AM
1 votes
0 answers
40 views
Installing Jboss tools in ubunto is aborted
When installing "**Jboss tools 4.24.0 Final**" in Eclipse, the following error message appears: > Warning: You are installing software that contains unsigned content. > The authenticity or validity of this software cannot be established. > Do you want to continue with the installation? [![enter imag...
When installing "**Jboss tools 4.24.0 Final**" in Eclipse, the following error message appears: > Warning: You are installing software that contains unsigned content. > The authenticity or validity of this software cannot be established. > Do you want to continue with the installation? enter image description here By clicking on "**Install anywhere**", the installation is aborted and "**Jboss tools**" is not installed. Does anyone have an idea on the source of this error ? Thanks.
Dev Learning (11 rep)
Sep 19, 2022, 11:26 PM
-4 votes
2 answers
190 views
run scripts with option minus c
I have seen several scripts that use the -c option, what is the meaning of this -c option? For example: /opt/jboss/bin/standalone.sh -c standalone.xml I would like to know what is the difference between executing this command with the option minus c and without it: /opt/jboss/bin/standalone.sh stand...
I have seen several scripts that use the -c option, what is the meaning of this -c option? For example: /opt/jboss/bin/standalone.sh -c standalone.xml I would like to know what is the difference between executing this command with the option minus c and without it: /opt/jboss/bin/standalone.sh standalone.xml
miguel ramires (9 rep)
Dec 22, 2021, 01:01 PM • Last activity: Dec 22, 2021, 01:23 PM
0 votes
2 answers
5321 views
How can I update or upgrade BOSS Linux by terminal?
I use _EduBOSS Linux 3.0._ Since installation I still not update my OS. But I want to solve some Audio, Video and Graphics problems. To solve that problems I want update my BOSS Linux. **sudo apt-get update** Hit http://packages.bosslinux.in anokha Release.gpg Hit http://packages.bosslinux.in edubos...
I use _EduBOSS Linux 3.0._ Since installation I still not update my OS. But I want to solve some Audio, Video and Graphics problems. To solve that problems I want update my BOSS Linux.
**sudo apt-get update** Hit http://packages.bosslinux.in anokha Release.gpg Hit http://packages.bosslinux.in eduboss-3.0 Release.gpg Hit http://packages.bosslinux.in anokha Release Hit http://packages.bosslinux.in eduboss-3.0 Release Hit http://packages.bosslinux.in anokha/main Sources Hit http://packages.bosslinux.in anokha/contrib Sources Ign http://ppa.launchpad.net anokha Release.gpg Hit http://packages.bosslinux.in anokha/non-free Sources Hit http://packages.bosslinux.in anokha/main i386 Packages Hit http://packages.bosslinux.in anokha/contrib i386 Packages Hit http://packages.bosslinux.in anokha/non-free i386 Packages Ign http://ppa.launchpad.net anokha Release Hit http://packages.bosslinux.in eduboss-3.0/main Sources Hit http://packages.bosslinux.in eduboss-3.0/main i386 Packages Ign http://packages.bosslinux.in anokha/contrib Translation-sa_IN Ign http://packages.bosslinux.in anokha/contrib Translation-sa Ign http://packages.bosslinux.in anokha/contrib Translation-en Ign http://packages.bosslinux.in anokha/main Translation-sa_IN Ign http://packages.bosslinux.in anokha/main Translation-sa Ign http://packages.bosslinux.in anokha/main Translation-en Ign http://packages.bosslinux.in anokha/non-free Translation-sa_IN Ign http://packages.bosslinux.in anokha/non-free Translation-sa Ign http://packages.bosslinux.in anokha/non-free Translation-en Ign http://packages.bosslinux.in eduboss-3.0/main Translation-sa_IN Ign http://packages.bosslinux.in eduboss-3.0/main Translation-sa Ign http://packages.bosslinux.in eduboss-3.0/main Translation-en Err http://ppa.launchpad.net anokha/main Sources 404 Not Found Hit http://dl.google.com stable Release.gpg Hit http://dl.google.com stable Release Err http://ppa.launchpad.net anokha/main i386 Packages 404 Not Found Hit http://dl.google.com stable/main i386 Packages Ign http://ppa.launchpad.net anokha/main Translation-sa_IN Ign http://ppa.launchpad.net anokha/main Translation-sa Ign http://ppa.launchpad.net anokha/main Translation-en Ign http://dl.google.com stable/main Translation-sa_IN Ign http://dl.google.com stable/main Translation-sa Ign http://dl.google.com stable/main Translation-en W: Failed to fetch http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu/dists/anokha/main/source/Sources 404 Not Found W: Failed to fetch http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu/dists/anokha/main/binary-i386/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead. **How can I update BOSS Linux by terminal only?**
Madhav Nikam (229 rep)
Jun 6, 2015, 05:32 AM • Last activity: Dec 4, 2020, 12:39 PM
0 votes
1 answers
3315 views
JBOSS high CPU utilization
My Application is installed on JBOSS EAp 6.1 .Few days back we found that the application slowness or end user not able to access the application. We took `ps -aux` logs, and one of the output is below. [Mon Jun 12 08:55:29.218 2017] 500 46257 90.7 10.2 22713508 6779044 ? Sl Apr26 61791:48 /usr/lib/...
My Application is installed on JBOSS EAp 6.1 .Few days back we found that the application slowness or end user not able to access the application. We took ps -aux logs, and one of the output is below. [Mon Jun 12 08:55:29.218 2017] 500 46257 90.7 10.2 22713508 6779044 ? Sl Apr26 61791:48 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.45.x86_64/jre/bin/java -D[Standalone] -server -XX:+UseCompressedOops -Xms2048m -Xmx4096m -XX:MaxPermSize=512m -Djava Looks like this java process was hogging my CPU.but also its in Sl mode. This is my assumption. Can this be the reason of application problem? What could be the reason of high cpu usage? What is the role of this process in JBOSS application server? We didn't take thread dump and Gc logs (gc logs not enabled later we checked) and restarted the server. Now no logs.
user236419 (1 rep)
Jun 16, 2017, 01:20 PM • Last activity: Feb 19, 2020, 04:04 AM
1 votes
0 answers
625 views
Problem by configure JBoss EAP 6.x as Service on RHEL 7
I update my RHEL6 to RHEL7.7. But I must still use the Jboss EAP6.4.22 for a while. After the update of RHEL7 I have problem by starting the Jboss as a service. I've googled but till now haven't found any helpful information. Here below is my situation and what I did: After the installation of Jboss...
I update my RHEL6 to RHEL7.7. But I must still use the Jboss EAP6.4.22 for a while. After the update of RHEL7 I have problem by starting the Jboss as a service. I've googled but till now haven't found any helpful information. Here below is my situation and what I did: After the installation of Jboss EAP 6 (RPM text installation), there is the file /etc/init.d/jbossas I enable this as service with chkconfig jbossas on. Then I create a file called /usr/lib/systemd/system/eap6-jbossas-standalone.service and it looks as follows: [Unit] Description=JBoss EAP Systemctl script After=NetworkManager.service [Service] Type=forking ExecStart=/etc/init.d/jbossas start ExecStop=/etc/init.d/jbossas stop PIDFile=/var/run/jbossas/jbossas-standalone.pid I start the jboss with systemctl start eap6-jbossas-standalone. The jboss can be started but the cursor doesn't return. I have to use the ctrl+c to get the cursor. Then I try to stop the jboss with 'systemctl stop eap6-jbossas-standalone' but the jboss can not be stopped. As I check its status with systemctl status eap6-jbossas-standalone -l I got following messages: ... # systemctl status eap6-jbossas-standalone -l ● eap6-jbossas-standalone.service - JBoss EAP Systemctl script Loaded: loaded (/usr/lib/systemd/system/eap6-jbossas-standalone.service; static; vendor preset: disabled) Active: inactive (dead) Aug 28 10:04:59 s001ap21-test-n.ad001.proactiv.grp systemd: Failed to start JBoss EAP Systemctl script. Aug 28 10:04:59 s001ap21-test-n.ad001.proactiv.grp systemd: Unit eap6-jbossas-standalone.service entered failed state. Aug 28 10:04:59 s001ap21-test-n.ad001.proactiv.grp systemd: eap6-jbossas-standalone.service failed. Aug 28 10:15:24 s001ap21-test-n.ad001.proactiv.grp systemd: Starting JBoss EAP Systemctl script... Aug 28 10:15:24 s001ap21-test-n.ad001.proactiv.grp runuser: pam_unix(runuser:session): session opened for user jboss by (uid=0) Aug 28 10:15:24 s001ap21-test-n.ad001.proactiv.grp runuser: pam_unix(runuser:session): session closed for user jboss Aug 28 10:15:24 s001ap21-test-n.ad001.proactiv.grp runuser: pam_unix(runuser:session): session opened for user jboss by (uid=0) Aug 28 10:15:24 s001ap21-test-n.ad001.proactiv.grp runuser: pam_unix(runuser:session): session closed for user jboss Aug 28 10:15:24 s001ap21-test-n.ad001.proactiv.grp jbossas: Starting jbossas: runuser: warning: cannot change directory to /opt/rh/eap7/root/usr/share/wildfly: No such file or directory Aug 28 10:15:52 s001ap21-test-n.ad001.proactiv.grp systemd: Stopped JBoss EAP Systemctl script. What could be the reason?
thomas2004ch (111 rep)
Aug 28, 2019, 08:21 AM • Last activity: Aug 28, 2019, 09:07 AM
0 votes
2 answers
65 views
Is it possible to list everything a specific process is trying to do?
I have a web app in a jboss application server that gives a not understandable error. I’m 100% sure it is because it is trying to access a forbidden file system location. Is it possible to profile the program, in particular what is doing step by step (ex. Spawning processes, opening files, writing f...
I have a web app in a jboss application server that gives a not understandable error. I’m 100% sure it is because it is trying to access a forbidden file system location. Is it possible to profile the program, in particular what is doing step by step (ex. Spawning processes, opening files, writing files, etc)
Phate (329 rep)
Jun 26, 2019, 07:00 AM • Last activity: Jun 26, 2019, 12:18 PM
0 votes
0 answers
11009 views
wget failing with 404 File not found
I have two instances of jboss running on the same server with two different ports. ( 8280 & 10580). I am facing issue while downloading a file using `wget` on Port 10580 , but the file is getting downloaded on the other port. `wget` is failing with 404 Not found. $ wget server1:10580/version.html --...
I have two instances of jboss running on the same server with two different ports. ( 8280 & 10580). I am facing issue while downloading a file using wget on Port 10580 , but the file is getting downloaded on the other port. wget is failing with 404 Not found. $ wget server1:10580/version.html --2015-12-21 19:57:28-- http://server1:10580/version.html Resolving server1... 172.16.3.204 Connecting to server1|172.16.3.204|:10580... connected. HTTP request sent, awaiting response... 404 Not Found 2015-12-21 19:57:28 ERROR 404: Not Found. Permission on the file is as follows $ ls -l /data/jboss/myapp-a/deploy/myapp.war/version.html -rw-rw-r-- 1 jboss admin 54 Dec 16 11:59 /data/jboss/myapp-a/deploy/myapp.war/version.html Was able to access the same file using another instance of jboss in different location with same permission . $ wget http://server1:8280/version.html --2015-12-21 19:58:28-- http://server1:8280/version.html Resolving server1... 172.16.3.204 Connecting to server1|172.16.3.204|:8280... connected. HTTP request sent, awaiting response... 200 OK Length: 54 [text/html] Saving to: “version.html” $ ls -l /data/jboss/myapp-b/deploy/myapp.war/version.html -rw-rw-r-- 1 jboss admin 54 Dec 16 11:59 /data/jboss/myapp-b/deploy/myapp.war/version.html Any suggestions how to resolve the issue?
Zama Ques (3376 rep)
Dec 21, 2015, 11:08 AM • Last activity: Dec 1, 2018, 07:32 PM
0 votes
0 answers
297 views
Wildfly 14.01 Standalone wont start at Ubuntu 16.04.5 LTS
I can't even start wildfly without any deployment in wildfly 14 > sh standalone.sh > --server-config=../standalone/configuration/standalone.xml ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /home/00887661017/Desktop/wildfly-14.0.1.F...
I can't even start wildfly without any deployment in wildfly 14 > sh standalone.sh > --server-config=../standalone/configuration/standalone.xml ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /home/00887661017/Desktop/wildfly-14.0.1.Final JAVA: java JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true ========================================================================= Exception in thread "main" java.lang.NoClassDefFoundError: java/lang/ModuleLayer at org.jboss.modules.JDKModuleFinder.(JDKModuleFinder.java:45) at org.jboss.modules.JDKModuleFinder.(JDKModuleFinder.java:42) at org.jboss.modules.Utils.(Utils.java:44) at org.jboss.modules.LocalModuleLoader.(LocalModuleLoader.java:57) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(java.base@9-internal/Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(java.base@9-internal/NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(java.base@9-internal/DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(java.base@9-internal/Constructor.java:453) at org.jboss.modules.DefaultBootModuleLoaderHolder$1.run(DefaultBootModuleLoaderHolder.java:37) at org.jboss.modules.DefaultBootModuleLoaderHolder$1.run(DefaultBootModuleLoaderHolder.java:33) at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method) at org.jboss.modules.DefaultBootModuleLoaderHolder.(DefaultBootModuleLoaderHolder.java:33) at org.jboss.modules.Main.main(Main.java:391) Caused by: java.lang.ClassNotFoundException: java.lang.ModuleLayer at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-internal/BuiltinClassLoader.java:366) at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@9-internal/ClassLoaders.java:184) at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:419) ... 13 more Same process did work in CentOS. Edit, adding further info: java -version openjdk version "9-internal" OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src) OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode) Starting the server with no config file as paramether resulted in the same behaviour first presented.
vfbsilva (3757 rep)
Nov 1, 2018, 09:10 PM • Last activity: Nov 5, 2018, 05:30 PM
1 votes
1 answers
2788 views
How to pass Command to program open in shell?
I am writing a shell script to auto-deploy a program with Jboss-cli, in linux ubuntu. I need to open the jboss cli interface and execute some commands but I want to do this automatically. what it looks like cd /opt/jboss/bin ./jboss-cli.sh --connect the above line open the jboss command line. I woul...
I am writing a shell script to auto-deploy a program with Jboss-cli, in linux ubuntu. I need to open the jboss cli interface and execute some commands but I want to do this automatically. what it looks like cd /opt/jboss/bin ./jboss-cli.sh --connect the above line open the jboss command line. I would like to be able to send a command to the open program like: undeploy FlcErp.ear I've tried to echo it and give it straight text but nothing will execute until the Jboss program is done running. I've also tried ./jboss-cli.sh --connect undeploy "FlcErp.ear" but It reads "FlcErp.ear" as a command
Sam Orozco (113 rep)
Sep 22, 2016, 07:55 PM • Last activity: Jul 23, 2018, 02:28 PM
1 votes
2 answers
1777 views
How to write a script to verify Jboss just started
I have to write a script to run JBoss and also verify and inform JBoss has just started in system startup. Below code is to related to verifying part. Please correct logical and syntax mistakes I have done. Log record I am `grep`ing: > 2017-10-27 12:04:13,933 INFO [org.jboss.bootstrap.microcontainer...
I have to write a script to run JBoss and also verify and inform JBoss has just started in system startup. Below code is to related to verifying part. Please correct logical and syntax mistakes I have done. Log record I am greping: > 2017-10-27 12:04:13,933 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:1s:804ms !/bin/bash maxLoops=30 numLines=200 timeToSleep=3 success=0 Server_Log=$(/path_for_log/server.log) for (( try=0; try < maxLoops; ++try )); do atail=tail -n $numLines $Server_Log | grep "Started" | awk {'print $12'} if [[ $atail == "Started" ]] then success=1 break fi sleep $timeToSleep done if (( success )); then echo "Jboss started successfully" else echo "successful starting of Jboss is not ensured" fi Please find the error below that I am getting while executing the script as root: $ ./verify_jboss.sh: line 3: /log_path/server.log: Permission denied
Prabash (65 rep)
Oct 27, 2017, 10:00 AM • Last activity: Jul 23, 2018, 07:35 AM
1 votes
0 answers
1312 views
Restarting JBOSS EAP7 doesn't resume the service
Look at the below output, I am trying to restart the JBOSS Eap7 application on CentOS7 but it doesn't resume back. # ps -ef | grep java jboss 2906 2837 2 12:31 ? 00:00:15 java -D[Standalone] -server -verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+...
Look at the below output, I am trying to restart the JBOSS Eap7 application on CentOS7 but it doesn't resume back. # ps -ef | grep java jboss 2906 2837 2 12:31 ? 00:00:15 java -D[Standalone] -server -verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/opt/jboss/standalone/log/server.log -Dlogging.configuration=file:/opt/jboss/standalone/configuration/logging.properties -jar /opt/jboss/jboss-modules.jar -mp /opt/jboss/modules org.jboss.as.standalone -Djboss.home.dir=/opt/jboss -Djboss.server.base.dir=/opt/jboss/standalone -c standalone.xml root 3188 2245 0 12:41 pts/0 00:00:00 grep --color=auto java # systemctl status jbosseap7 ● jbosseap7.service - JBoss EAP7 Loaded: loaded (/etc/systemd/system/jbosseap7.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2018-06-11 12:31:30 EDT; 9min ago Process: 2791 ExecStop=/opt/jboss/bin/init.d/jboss-eap-rhel.sh stop (code=exited, status=0/SUCCESS) Process: 2824 ExecStart=/opt/jboss/bin/init.d/jboss-eap-rhel.sh start (code=exited, status=0/SUCCESS) Main PID: 2837 (standalone.sh) CGroup: /system.slice/jbosseap7.service ├─2837 /bin/sh /opt/jboss/bin/standalone.sh -c standalone.xml └─2906 java -D[Standalone] -server -verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -... Jun 11 12:31:19 node01.local.com systemd: Starting JBoss EAP7... Jun 11 12:31:19 node01.local.com runuser: pam_unix(runuser:session): session opened for user jboss by (uid=0) Jun 11 12:31:19 node01.local.com jboss-eap-rhel.sh: Starting jboss-eap: / Jun 11 12:31:30 node01.local.com jboss-eap-rhel.sh: [ OK ] Jun 11 12:31:30 node01.local.com systemd: Started JBoss EAP7. # systemctl restart jbosseap7 # systemctl status jbosseap7 ● jbosseap7.service - JBoss EAP7 Loaded: loaded (/etc/systemd/system/jbosseap7.service; enabled; vendor preset: disabled) Active: inactive (dead) since Mon 2018-06-11 12:42:03 EDT; 2s ago Process: 3363 ExecStop=/opt/jboss/bin/init.d/jboss-eap-rhel.sh stop (code=exited, status=0/SUCCESS) Process: 3223 ExecStart=/opt/jboss/bin/init.d/jboss-eap-rhel.sh start (code=exited, status=0/SUCCESS) Main PID: 2837 (code=exited, status=0/SUCCESS) Jun 11 12:41:32 node01.local.com systemd: Starting JBoss EAP7... Jun 11 12:41:32 node01.local.com runuser: pam_unix(runuser:session): session opened for user jboss by (uid=0) Jun 11 12:41:32 node01.local.com jboss-eap-rhel.sh: Starting jboss-eap: / Jun 11 12:42:03 node01.local.com jboss-eap-rhel.sh: jboss-eap started with errors, please see server log for details Jun 11 12:42:03 node01.local.com jboss-eap-rhel.sh: [ OK ] Jun 11 12:42:03 node01.local.com jboss-eap-rhel.sh: Stopping jboss-eap: [ OK ] Jun 11 12:42:03 node01.local.com systemd: Started JBoss EAP7. # ps -ef | grep java root 3372 2245 0 12:42 pts/0 00:00:00 grep --color=auto java ***Starting the service again works fine. But here I am trying to narrow down the restart issue. So any pointers to narrow down this issue would really be appreciated.*** # systemctl start jbosseap7 # ps -ef | grep java jboss 3478 3409 62 12:46 ? 00:00:10 java -D[Standalone] -server -verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/opt/jboss/standalone/log/server.log -Dlogging.configuration=file:/opt/jboss/standalone/configuration/logging.properties -jar /opt/jboss/jboss-modules.jar -mp /opt/jboss/modules org.jboss.as.standalone -Djboss.home.dir=/opt/jboss -Djboss.server.base.dir=/opt/jboss/standalone -c standalone.xml root 3596 2245 0 12:46 pts/0 00:00:00 grep --color=auto java # systemctl status jbosseap7 ● jbosseap7.service - JBoss EAP7 Loaded: loaded (/etc/systemd/system/jbosseap7.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2018-06-11 12:46:53 EDT; 9s ago Process: 3363 ExecStop=/opt/jboss/bin/init.d/jboss-eap-rhel.sh stop (code=exited, status=0/SUCCESS) Process: 3396 ExecStart=/opt/jboss/bin/init.d/jboss-eap-rhel.sh start (code=exited, status=0/SUCCESS) Main PID: 3409 (standalone.sh) CGroup: /system.slice/jbosseap7.service ├─3409 /bin/sh /opt/jboss/bin/standalone.sh -c standalone.xml └─3478 java -D[Standalone] -server -verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -... Jun 11 12:46:42 node01.local.com systemd: Starting JBoss EAP7... Jun 11 12:46:42 node01.local.com runuser: pam_unix(runuser:session): session opened for user jboss by (uid=0) Jun 11 12:46:42 node01.local.com jboss-eap-rhel.sh: Starting jboss-eap: / Jun 11 12:46:53 node01.local.com jboss-eap-rhel.sh: [ OK ] Jun 11 12:46:53 node01.local.com systemd: Started JBoss EAP7.
Gokulnath Kumar (95 rep)
Jun 11, 2018, 04:50 PM • Last activity: Jun 11, 2018, 04:55 PM
2 votes
1 answers
20129 views
jboss service is not starting up in CentOS7
Unable to fork initd scripts on Centos 7. I have installed JBOSS EAP7 which comes with inbuilt initd scripts to start the service. I start/stop/restart the services like the following which works fine. However, when I fork the same initd scripts via systemd it doesn't work. Any help would be appreci...
Unable to fork initd scripts on Centos 7. I have installed JBOSS EAP7 which comes with inbuilt initd scripts to start the service. I start/stop/restart the services like the following which works fine. However, when I fork the same initd scripts via systemd it doesn't work. Any help would be appreciated. # /opt/jboss/bin/init.d/jboss-eap-rhel.sh start Starting jboss-eap: /root [ OK ] # /opt/jboss/bin/init.d/jboss-eap-rhel.sh status jboss-eap is running (pid 3024) # /opt/jboss/bin/init.d/jboss-eap-rhel.sh stop Stopping jboss-eap: [ OK ] # /opt/jboss/bin/init.d/jboss-eap-rhel.sh status jboss-eap is not running # /opt/jboss/bin/init.d/jboss-eap-rhel.sh start Starting jboss-eap: /root [ OK ] # /opt/jboss/bin/init.d/jboss-eap-rhel.sh status jboss-eap is running (pid 3314) Forking the same initd scripts via systemd, gives an error. # cat /etc/systemd/system/jbosseap7.service [Unit] Description=JBoss EAP7 After=syslog.target After=network.target [Service] Type=forking ExecStart=/opt/jboss/bin/init.d/jboss-eap-rhel.sh start ExecStop=/opt/jboss/bin/init.d/jboss-eap-rhel.sh stop ExecReload=/opt/jboss/bin/init.d/jboss-eap-rhel.sh restart PIDFile=/var/run/jboss-eap/jboss-eap-standalone.pid [Install] WantedBy=multi-user.target # time systemctl start jbosseap7 Job for jbosseap7.service failed because a timeout was exceeded. See "systemctl status jbosseap7.service" and "journalctl -xe" for details. real **1m27.330s** user 0m0.008s sys 0m0.003s # time systemctl status jbosseap7 ● jbosseap7.service - JBoss EAP7 Loaded: loaded (/etc/systemd/system/jbosseap7.service; enabled; vendor preset: disabled) Active: failed (Result: timeout) since Mon 2018-06-11 07:04:29 EDT; 15s ago Jun 11 06:58:22 node01.local.com systemd: Starting JBoss EAP7... Jun 11 06:58:22 node01.local.com runuser: pam_unix(runuser:session): session opened for user jboss by (uid=0) Jun 11 06:58:22 node01.local.com jboss-eap-rhel.sh: Starting jboss-eap: / Jun 11 06:58:39 node01.local.com jboss-eap-rhel.sh: [ OK ] Jun 11 06:58:39 node01.local.com systemd: PID file /var/run/jboss-eap/jboss-eap-standalone.pid not readable (yet?) after start. Jun 11 07:04:28 node01.local.com systemd: jbosseap7.service start operation timed out. Terminating. Jun 11 07:04:29 node01.local.com systemd: Failed to start JBoss EAP7. Jun 11 07:04:29 node01.local.com systemd: Unit jbosseap7.service entered failed state. Jun 11 07:04:29 node01.local.com systemd: jbosseap7.service failed. real 0m0.045s user 0m0.004s sys 0m0.000s **Note:** I have even tried specifying the Timeout limit under [SERVICE] unit, but that still doesn't work. Without specifying the time limit it still takes a long time (1 minute & 27 seconds). What could be wrong here? **Additional Comments:** Sometimes it starts and sometimes it doesn't start. How can we nail down the failed one? # systemctl start jbosseap7 # systemctl status jbosseap7 ● jbosseap7.service - JBoss EAP7 Loaded: loaded (/etc/systemd/system/jbosseap7.service; enabled; vendor preset: disabled) Active: inactive (dead) since Mon 2018-06-11 07:32:47 EDT; 7s ago Process: 2913 ExecStop=/etc/init.d/jboss-eap-rhel.sh stop (code=exited, status=0/SUCCESS) Process: 2771 ExecStart=/etc/init.d/jboss-eap-rhel.sh start (code=exited, status=0/SUCCESS) Main PID: 2537 (code=exited, status=0/SUCCESS) Jun 11 07:32:15 node01.local.com systemd: Starting JBoss EAP7... Jun 11 07:32:15 node01.local.com runuser: pam_unix(runuser:session): session opened for user jboss by (uid=0) Jun 11 07:32:15 node01.local.com jboss-eap-rhel.sh: Starting jboss-eap: / Jun 11 07:32:46 node01.local.com jboss-eap-rhel.sh: jboss-eap started with errors, please see server log for details Jun 11 07:32:46 node01.local.com jboss-eap-rhel.sh: [ OK ] Jun 11 07:32:47 node01.local.com jboss-eap-rhel.sh: Stopping jboss-eap: [ OK ] Jun 11 07:32:47 node01.local.com systemd: Started JBoss EAP7. # ps -ef | grep jboss root 2924 2222 0 07:33 pts/0 00:00:00 grep --color=auto jboss # systemctl start jbosseap7 # systemctl status jbosseap7 ● jbosseap7.service - JBoss EAP7 Loaded: loaded (/etc/systemd/system/jbosseap7.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2018-06-11 07:33:35 EDT; 3s ago Process: 2913 ExecStop=/etc/init.d/jboss-eap-rhel.sh stop (code=exited, status=0/SUCCESS) Process: 2930 ExecStart=/etc/init.d/jboss-eap-rhel.sh start (code=exited, status=0/SUCCESS) Main PID: 2943 (standalone.sh) CGroup: /system.slice/jbosseap7.service ├─2943 /bin/sh /opt/jboss/bin/standalone.sh -c standalone.xml └─3012 java -D[Standalone] -server -verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:Nu... Jun 11 07:33:19 node01.local.com systemd: Starting JBoss EAP7... Jun 11 07:33:19 node01.local.com runuser: pam_unix(runuser:session): session opened for user jboss by (uid=0) Jun 11 07:33:19 node01.local.com jboss-eap-rhel.sh: Starting jboss-eap: / Jun 11 07:33:35 node01.local.com jboss-eap-rhel.sh: [ OK ] Jun 11 07:33:35 node01.local.com systemd: Started JBoss EAP7. **PS Results:** # ps -aux|grep jboss jboss 4559 0.0 0.0 113120 1540 ? S 07:58 0:00 /bin/sh /opt/jboss/bin/standalone.sh -c standalone.xml jboss 4628 49.4 33.9 3077608 640432 ? Sl 07:58 0:15 java -D[Standalone] -server -verbose:gc -Xloggc:/opt/jboss/standalone/log/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/opt/jboss/standalone/log/server.log -Dlogging.configuration=file:/opt/jboss/standalone/configuration/logging.properties -jar /opt/jboss/jboss-modules.jar -mp /opt/jboss/modules org.jboss.as.standalone -Djboss.home.dir=/opt/jboss -Djboss.server.base.dir=/opt/jboss/standalone -c standalone.xml root 4754 0.0 0.0 112644 952 pts/0 R+ 07:58 0:00 grep --color=auto jboss
Gokulnath Kumar (95 rep)
Jun 11, 2018, 11:08 AM • Last activity: Jun 11, 2018, 11:59 AM
1 votes
1 answers
3150 views
How can I understand if my system is using jBoss?
I have just noticed there is no space available in my server, therefore I need to remove something. It seems the `/opt/jboss-6.1.0` directory is taking more than 200Gb (unbelievable). I would like to remove it, but I am not sure if the server is using jBoss (I don't even know what it is). How can I...
I have just noticed there is no space available in my server, therefore I need to remove something. It seems the /opt/jboss-6.1.0 directory is taking more than 200Gb (unbelievable). I would like to remove it, but I am not sure if the server is using jBoss (I don't even know what it is). How can I understand if removing this folder will cause problems to the server? (I know we are using Apache Web Server) I have checked processes with: ps aux | grep jboss but nothing is found.
MeV (131 rep)
Oct 28, 2016, 09:57 AM • Last activity: Feb 12, 2018, 11:46 AM
1 votes
2 answers
1523 views
Cron job throwing error "service: not found [No such file or directory]" but when executed manually in terminal script works fine
`service jbossas status` -> command will check the jbossas status jbossas(PID) is running (if jbossas is running) jbossas is stopped (if jbossas is stopped) #!/bin/ksh #set -x OUT_LOG="$1" stus=$(service jbossas status) var=$(ps -ef | grep -i '[/]jboss') hname=$(hostname) if [ -z "$var" ]; then echo...
service jbossas status -> command will check the jbossas status jbossas(PID) is running (if jbossas is running) jbossas is stopped (if jbossas is stopped) #!/bin/ksh #set -x OUT_LOG="$1" stus=$(service jbossas status) var=$(ps -ef | grep -i '[/]jboss') hname=$(hostname) if [ -z "$var" ]; then echo "service jbossas status" >>$OUT_LOG echo "$stus" >>$OUT_LOG mail -s "Please check for possbile impact $(stus)" aaa@aaa.com /aaa/jboss_status.ksh.error 2>&1 Im receiving the mail with below subject "Please check for possbile impact" NOTE :"jbossas is stopped " is not getting printed at end of the subject In getting below error in the error file created by cron /aaa/jboss_status.ksh: service: not found [No such file or directory] The script is executing fine in cron but the output returned by the command : service jbossas status op: jboss stopped is not getting printed in the subject
star (173 rep)
Nov 19, 2016, 08:58 AM • Last activity: Sep 27, 2017, 09:55 PM
Showing page 1 of 20 total questions