10
votes
Accepted
NGINX not passing all request headers to Tomcat
Headers containing underscores are considered invalid by nginx, which is why it will not pass them by default. The behaviour can be overridden by the underscores_in_headers directive. For example:
...
9
votes
CentOS 7 httpd failed to make connection with backend
To fix this, first test by setting the boolean dynamically (not permanent yet):
/usr/sbin/setsebool httpd_can_network_connect 1
If that works, you can set it so that the default policy is changed ...
8
votes
Accepted
how to add multiple roles to an admin user in Apache tomcat 8?
You need to define the appropriate roles (see the documentation for the full list), and add them to the user's roles attribute, using a comma as the separator:
<tomcat-users>
<role ...
8
votes
Tomcat - How does the setenv.sh work?
No. startup.sh runs in a different process than the process from which you launch it. Specifically, when a shell script is launched it runs in a newly created subshell of the current shell. And while ...
6
votes
Tomcat - How does the setenv.sh work?
The startup.sh script may be sourcing the setenv.sh file to get the variable's value, but if it does, the variable will only be set within the environment of the startup.sh script, not in your ...
6
votes
Accepted
logrotate not able to truncate catalina.out
The problem got resolved after changing the permissions of /etc/logrotate.d/tomcat file.
Before:
$ ls -lht /etc/logrotate.d/tomcat
-rwxr-xr-x 1 root root 308 Apr 25 2018 /etc/logrotate.d/tomcat
...
5
votes
-bash: ./catalina.sh: No such file or directory
[site /home/public]$ cd $CATALINA_HOME/bin
You should not blindly follow recipes via copy and paste. If you haven't set the CATALINA_HOME variable this will take you to /bin, which obviously (...
5
votes
How can I remove everything except last n bytes from the file in Linux?
catalina.out should be mostly empty, meaning the application intercepts all errors and handles them itself, possibly logging them elsewhere as configured. But more often than not, nothing such is done ...
4
votes
Tomcat logrotate error: tomcat:1 bad rotation count '7 compress missingok size 5M }'
Each configuration directive needs to be on its own line:
/opt/tomcat9/logs/catalina.out {
copytruncate
daily
rotate 7
compress
missingok
size 5M
}
4
votes
Accepted
Java: what exactly does a headless install mean?
In the Java world, “headless” means “with no GUI”, where GUI is understood as a local UI (as opposed to a UI rendered on some remote system using HTML for example). So most server applications work ...
3
votes
How to upgrade tomcat8 server on ubuntu?
In a given Ubuntu release, software typically doesn’t get upgraded to newer upstream versions, it only gets security patches and fixes for serious bugs. In Tomcat’s case, Ubuntu 16.04 has 8.0.32 plus ...
3
votes
Using FreeBSD Ports & Packages, Installing Tomcat on FreeBSD 12 installs Java 8 rather than my already-installed Java 12
When pre-built binary packages don't meed your needs, it pays to consider ways to build what you need from source via FreeBSD's extensive ports system.
Some FreeBSD ports support a make config target ...
3
votes
Accepted
Tomcat unable to execute VBoxManage: NS_ERROR_FAILURE (0x80004005)
I had the same problems. I was affected by a systemd limitation.
Inspect your systemd Tomcat service (with your exact version):
sudo systemctl cat tomcat9.service
#
# Systemd unit file for Apache ...
2
votes
Accepted
Strange error logging in BBB
The error hints about a configuration file bbb_api_conf.jspmissing.
Checking out the github of the project, that file can be found as it is:
<%!
// This is the security salt that must match the ...
2
votes
Accepted
How to install Apache Tomcat 8 on centos 7?
after you have installed java on your system, you need to do as i mention here:
#mv apache-tomcat-7 /opt
#useradd tomcat
#chown -R tomcat:tomcat /opt/apache-tomcat-7
To Install tomcat you need to ...
2
votes
Tomcat 8 limit size of Catalina.out
You may use logrotate to manage Catalina.out
https://dzone.com/articles/how-rotate-tomcat-catalinaout
2
votes
Starting Tomcat 8 on Raspbian - Job for tomcat8.service failed
I ran through your setup steps using my RPi 3 Model B, running PIXEL via Raspbian.
Once you've installed tomcat8, systemctl needs to be made aware of the change:
sudo systemctl daemon-reload
Then, ...
2
votes
Accepted
HTTPD using same port multiple times
I get the impression you know this already: since you’re running your Tomcat instances listening on the same IP address, you need to make sure that every single port that Tomcat uses is set up ...
2
votes
Accepted
Remove OpenJDK/JRE and installed Oracle JDK, now Tomcat fails
I'd suggest you a robust way of binding Tomcat to specific version of JDK.
Under tomcat_location_dir/bin subdir you can find setenv.sh file.
Modify it by adding line:
JAVA_HOME=/path/to/desired/...
2
votes
Accepted
How to install Apache Tomcat 9 using apt-get?
Tomcat 9 isn’t available in the repositories (yet). Your best option is to install one of the binary distributions available from Apache.
2
votes
Linux Machine time mismatch with all other logs time
The timezone setting of your session is not necessarily the same as the system default timezone. If you set the TZ environment variable fo your session, make sure you set it in your application start-...
2
votes
Tomcat startup.sh file works but starting tomcat.service does not
This question finally helped me out:
https://stackoverflow.com/questions/34614710/why-is-systemd-stopping-service-immediately-after-it-is-started
in /etc/systemd/system/tomcat.service I removed
...
2
votes
Tomcat startup script output not available with piping (grep)
First thanks to @Zeitounator and @A.B for their comments!
After some testing on different tomcat versions and digging deeper I've found, that indeed the issue is in have_tty being set to zero.
Using ...
2
votes
Where does the systemctl Tasks (limit=) come from and can I temporarily change it?
Thanks all for the help. I increased the size of my server, as well as the memory allocated to my JVM, but that did not help. I had expected the Tasks limit to increase automatically upon reboot or ...
2
votes
How can I remove everything except last n bytes from the file in Linux?
tail catalina.out > catalina.new
rm catalina.out
mv catalina.new catalina.out
Then you have to restart or reload tomcat to append logs to new file (it still has opened file descriptor of old ...
2
votes
How can I remove everything except last n bytes from the file in Linux?
Instead of treating the symptom, treat the disease.
As others have mentioned, "proper logging" will save you from this. But proper logging involves the development team, a develop-test-...
2
votes
Java: what exactly does a headless install mean?
The headless is some weird term (and I hope becoming obsolete) to describe a system without keyboard and screen. For Java, it means it will not have support for GUI interface, which it is a ...
1
vote
SELinux blocks tomcat web application to load Java native library (JNI) from /tmp folder
I think you forgot to run restorecon after defining the fcontext:
$ semanage fcontext -a -t tomcat_tmp_t "/tmp/app_*(/.*)?"
$ restorecon -rv /tmp
References
https://noobient.com/post/165972214381/...
slm♦
- 373k
1
vote
Accessing different servers with same domain name
As an architectural solution, which is very dependent of the particular application you've got, I'd suggest you consider something like this:
Set up DNS so that your canonical website name points to ...
1
vote
Logrotate Tomcat log file
According to this documentation you should keep the rotatable option as true (default) so that it does not write always to the same file.
Also you can format the filename string to a fixed value, so ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tomcat × 197linux × 45
java × 33
centos × 31
apache-httpd × 30
ubuntu × 16
debian × 15
rhel × 12
ssl × 11
logrotate × 8
permissions × 7
webserver × 7
software-installation × 6
bash × 5
logs × 5
configuration × 5
docker × 5
certificates × 5
shell-script × 4
systemd × 4
security × 4
proxy × 4
https × 4
ssh × 3
networking × 3