Apache Tomcat : How to check the JVM argument set in Tomcat Server - tomcat8

What is the way to check the JVM arguments in Apache Tomcat Server running on Unix machine.

Related

How to enable AJP port in Payara Micro and Use Apache server as proxy

I am using Payara micro community edition to deploy a microservice REST APIs. I need to enable AJP port so that the Apache proxy server listens to the AJP port 8192.
java -jar payara-micro-5.2020.5.jar --deploydir ./payara/webapps --rootDir ./payara --postbootcommandfile ./payara/postboot.txt
./payara/webapps folder contains the microservice WAR file.
postboot.txt content:
create-network-listener --protocol http-listener-1 --listeneraddress 0.0.0.0 --listenerport 8192--jkenabled true jk-connector
The command execution has no issues and following ports are enabled "Http Port(s)": "8080, 8192".
I am able to use the microservice APIs locally (http://localhost:8192/). But the requests from Apache proxy shows Bad Gateway error.
Am I missing some configuration for AJP port enabling in Payara Micro?
AJP port is enabled for Payara by adding this line in the domain.xml
<network-listener protocol="jk-listener" jk-enabled="true" port="8192" name="jk-connector" thread-pool="http-thread-pool" transport="tcp"></network-listener>

I cannot start Apache Web Server using XAMPP 7.2.26-0 on MacOS Mojave Version 10.14.5

I could install successfully XAMPP 7.2.26-0 on MacOS Mojave Version 10.14.5. The problem is that I cannot start Apache:
In the server events, I see this:
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Stopping all servers...
Stopping MySQL Database...
/Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh : mysql stopped
Restarting all servers...
Starting MySQL Database...
/Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh : mysql started at port 3306
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
Starting ProFTPD...
Exit code: 8
Stdout:
Checking syntax of configuration file
proftpd config test fails, aborting
Stderr:
2020-01-07 11:33:11,210 Jaimes-MacBook-Pro.local proftpd[24257]: warning: unable to determine IP address of 'Jaimes-MacBook-Pro.local'
2020-01-07 11:33:11,211 Jaimes-MacBook-Pro.local proftpd[24257]: error: no valid servers configured
2020-01-07 11:33:11,211 Jaimes-MacBook-Pro.local proftpd[24257]: fatal: error processing configuration file '/Applications/XAMPP/xamppfiles/etc/proftpd.conf'
Do think think this is caused by an IP address conflict or something else?
UPDATE 1
Since I am not interested in ProFTPD, I am only trying to start Apache Web Server and this is what I see in the server events:
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
That would make me think that Apache Web Server started successfully. Nonetheless, I still see its status as "Stopped".
UPDATE 2
See below the configurations that I have for Apache Web Server. I have not changed anything. I am using the default configurations.
Add to your hosts file:
127.0.0.1 Jaimes-MacBook-Pro.local
I installed Uniform Server Zero (a Portable WAMP Server) on Windows instead. Thank you.

No response from running Tomcat: does not start, does nothing

I'm using Ansible to spin up a new Amazon EC2 install, and then I install Java and Tomcat (via the yum module). After placing the war for sample project from the Apache website in the webapps directory, I go and run the the command (below), nothing happens. It returns with response, no error. I've checked both the IP and port 8080 and Tomcat is not running.
[centos#sonar-test webapps]$ sudo systemctl start tomcat
[centos#sonar-test webapps]$ sudo systemctl start tomcat
[centos#sonar-test webapps]$
For reference, I was following this tutorial as well:
https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-7-on-centos-7-via-yum
From your comment on my question running curl in your ec2 instance
When I curl I get a large html document with various apache-esque things on it
It means Tomcat is installed and running.
If you don't access it, its because of your security group rules
In your ec2 console, select the Security Groups option. Edit the rules that is associated with your ec2 instance (the one running Tomcat) and permits inbound connections to port 8080 (so you can make request to your Tomcat server) and port 80 if you're running Apache (or nginx/another web server). If you're not sure about security, you can restrict the inbound traffic to come only from your IP so you can test but no-one else can make request.

Stopping apache mina server

I have written a tcp server in Apache Mina.The server listens to a port n do the process. I have deployed this in jboss server. But now i am not able to stop the server.
I have done the following things for the stop program:
acceptor.dispose();
acceptor.unbind();
acceptor.setCloseOnDeactivation(true);
But the port is still active and the server still runs.
Can anybody help me in understanding how to stop the server.
As you can see in Apache Mina Acceptor service can be stopped and waiting for it using acceptor.dispose( true ). Also you can use isDisposing() method to verify that.

How to run Tomcat on Linux (which has glassfish on port 8080)

I am trying to run to tomcat on linux where glassfish is already running on port 8080 ( you can check here - vhost2.cs.rit.edu:8080 . So i changed the tomcat port to 8181 by editing the server.xml file. NOw with the command startup.sh and i get the following output
Using CATALINA_BASE: /home/krs8785/apache-tomcat-7.0.54
Using CATALINA_HOME: /home/krs8785/apache-tomcat-7.0.54
Using CATALINA_TMPDIR: /home/krs8785/apache-tomcat-7.0.54/temp
Using JRE_HOME: /usr
Using CLASSPATH: /home/krs8785/apache-tomcat-7.0.54/bin/bootstrap.jar:/home/krs8785/apache-tomcat-7.0.54/bin/tomcat-juli.jar
Tomcat started.
I am assuming that tomcat is now working. Now when i test the server by - vhost3.cs.rit.edu:8181 I get
No data received on the browser.
What is the problem here and how do i solve it?
The problem may be unrelated to tomcat. I think your first step should be to exclude networking issues.
I have assumed you are accessing vhost3.cs.rit.edu:8181 from another machine. If that is the case, try to access localhost:8181 from vhost3.cs.rit.edu. If this is not possible in a conventional browser, perhaps because it is a headless server with X forwarding disabled then use a terminal based browser. Try typing the following in the terminal on vhost3.cs.rit.edu
lynx localhost:8181
If you are able to see a representation of a tomcat splash page then you can attribute it to networking issues. This could be firewall related (perhaps even an issue with iptables on linux).