build-impl.xml:1045: Deployment error: Starting of Tomcat failed - java

I just installed apache tomcat 8 and this error appears with I try to start the server:
C:\Users\Ahmed\Documents\NetBeansProjects\TestWeb\nbproject\build-impl.xml:1045: Deployment error: Starting of Tomcat failed.
See the server log for details.
and the log file is empty.
Here is the line 1045 in build-impl.xml that has the error:
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>

I found the solution and I am sharing it so it can be useful for someone else:
If you were searching for a solution you probably found a solution saying to go toC:\apache-tomcat-8.0.36-windows-x64\apache-tomcat-8.0.36\bin
then open catalina.bat on Notepad++ and search for set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%" and set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%" and remove the double quotes.
but for some of people this might not be enough you might also need to search for set "JAVA_OPTS=%JAVA_OPTS% %JSSE_OPTS%" and remove the double quotes from here two and the server will run probably.

You need to change the owner of the Tomcat directory. On Linux or BSD do this:
chown -R username /usr/local/apache-tomcat-8.0/
Make sure to use the path to your Tomcat directory

Related

Why tomcat wont start with Failed to start apache tomcat web server tomcat.service: Control process exited, code=exited status=203

What i wanted to do
I installed fresh linux Ubuntu 16.04 to setup a test developing environment.
I wanted to install
java 8
tomcat 8
So i applied this tutorial and know that i dont have any previously java or
tomcat installed before.
Tutorial for java 8 and tomcat 8
Tutorial 2 same as the before with some more little hints
What is the problem
When i reached the step of starting tomcat , it failed.
Failed to start apache tomcat web server tomcat.service: Control process exited, code=exited status=203.
How i tried to reproduce:
I followed the tutorial on a fresh virtual box on ubuntu 16.04.
And after i tried lot of the solution like the below:
Playing with chmod and permissions.
Un install and re install
Updating my ubuntu
Restarting my ubuntu
Reloading services
Double Quotation suggestions in .service paths in (/etc/systemd/system/tomcat.service).
Commenting CATALINA_HOME line in .service file in (/etc/systemd/system/tomcat.service).
Other googling solutions.
Solution:
From a very small comments from here ( Thanks for the hint )) )
After i got the fail i ran
You should run ‘journalctl -xn’ for more details about why Tomcat
failed to start. Thanks.
It gave me the main reason here is screen shot and notice in RED.
ALL PATHS WAS WRONG ==> So i had to fix about five places for the right path... check Number 2 in Orange check image .
JAVA_HOME PATH was wrong ==> so to change and find the correct one do this
Then change in tomcat.service
check this image again this time look at 1 in bold yellow it should point to JDK.
Result:
So, apparently i had the path wrong , and it WORKED.
Summary:
When applying some tutorial keep an eye when you extract tomcat or etc..
because it may differ.
alternatively you can just start tomcat by going to /path/to/tomcat/bin/ and running ./startup.sh
it will spit out all the variables it is using and you can configure your tomcat.service file accordingly.
MY OS: POP!_OS (linux)
For me it was because i pointed JAVA_HOME to the wrong location. i pointed it to the binary folder but it should just be the home directory where you installed java. heres the turtorial that i followed
https://www.vultr.com/docs/how-to-install-apache-tomcat-8-on-centos-7
it even helps you set up a tomcat user, although i changed just 3 variables. my entire systemd file is here
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=forking
Environment=JAVA_HOME=/usr/java/jre1.8.0_261 # i accidently had it /jre.../bin instead of just /jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
# the linked article had the entire thing in quotes?
# but only the value needs to be in quotes
Environment=CATALINA_OPTS='-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment=JAVA_OPTS='-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID
User=tomcat
Group=tomcat
[Install]
WantedBy=multi-user.target

unable to install Weblogic server 12C, the jar file is not even opening

unable to install Weblogic server 12C, the jar file is not even opening. Tried instaling from command prompt as Admin , ended up with error unable to access jar file. I have java 7 installed. Please help
info copied from log file..
2016-12-22 10:30:19,591 INFO [1] com.oracle.cie.nextgen.launcher.LogUtils - Extracting the installer . . .
2016-12-22 10:30:23,626 INFO [1] com.oracle.cie.nextgen.launcher.LogUtils - Finished self extraction to C:\Users\Anand\AppData\Local\Temp\orcl3227252922117189327.tmp.
2016-12-22 10:30:23,839 WARNING [1] com.oracle.cie.common.jni.WinRegistryHelper - Create Key Failed: HKEY_LOCAL_MACHINE\Software\Oracle
2016-12-22 10:30:23,839 SEVERE [1] com.oracle.cie.nextgen.launcher.PlatformHelper - createRegistry to add a value failed
2016-12-22 10:30:23,839 SEVERE [1] com.oracle.cie.nextgen.launcher.Launcher - Unable to access or modify the system registry. Select Run as Administrator when opening the Command Prompt and try again.
2016-12-22 10:30:23,872 SEVERE [1] com.oracle.cie.nextgen.launcher.Launcher - Unable to access or modify the system registry. Select Run as Administrator when opening the Command Prompt and try again.
Open the command prompt in administrator mode, then try this
java -d64 -jar fmw_12.2.1.2.0_wls.jar
Refer this link for further details:
https://docs.oracle.com/cd/E24329_01/doc.1211/e24492/guimode.htm#WLSIG198
Even I have got the same problem and its resolved,
Make sure you have done the below steps,
1.install java, a compatible version from the internet, and set JAVA_HOME and path variables.
JAVA_HOME: JDK home directory path
path: jdk>bin directory path
2.execute the below line in command prompt which is opened with a privilege [Run As An Administrator].
java -jar D:\softwares\servers\fmw_12.1.3.0.0_wls.jar
3.it will take a moment to extract all the files and installation begins.
I know this is an old post but, if someone new drops by, this may be usefull.
This problem is caused by a lack of permissions with the current OS Windows user.
You need to right click on top of the CMD icon and choose Run as Administrator.
Inside the DOS command line window go to your JDK source folder.
Then type the following command line:
java.exe -jar "path to the weblogic jar file".
Several checks will be madde and the weblogic installation window will appear.
"C:\Program Files\Java\jdk1.8.0_351\bin\java" -jar weblogic.jar
the above command works fine. you need to have the latest version of jdk installed in your machine.
weblogic.jar is the jar filename which has been downloaded.

Error starting Wildfly 10.0.0.Final

I haven't been able to find a specific answer to what could be causing this issue though I am hoping it is something quite simple.
Issue.
I have installed version 10.0.0.Final from the Wildfly website and extracted into C:\Program Files\wildfly-10.0.0.Final.
I then navigate to C:\Program Files\wildfly-10.0.0.Final\bin directory via windows command prompt and execute the standalone.bat command.
Wildfly doesn't start and I get the following exception:
java.lang.IllegalArgumentException: Failed to instantiate class "org.jboss.logmanager.handlers.PeriodicRotatingFileHandler" for handler "FILE"
If anyone has encountered this error message before, then your guidance would be greatly appreciated.
Thanks!
Ben
The error appears to be a result of either file permissions on the JBoss home directory, lack of space available, or a missing directory.
Relevant posts include:
Starting WildFly 8.2 under a user with limited permissions
Which suggests setting the JBOSS_BASE_DIR property to the root folder of the JBoss installation.
https://github.com/jboss-dockerfiles/wildfly/issues/24
Suggests this can occur if the root folder does not have enough space allocated for the user (typically running in Unix environments).
Error in starting Wildfly 8.0 server with JDK 1.8
The logs/boot.log didn't exist. The author manually created the file which then revealed a permission issue on the log file (more likely on the entire Jboss installation folder).
The issue was caused due to the command prompt. As I am using windows 10, I needed to be using Command Prompt (Admin),rather than just the normal cmd hence the permission issues alluded to previously by pczeus.
After using Command Prompt (Admin), I was able to start the server.

Error during starting tomcat in remote debug mode

Tomcat is not starting in debug mode. Getting below logs.
C:\ApacheSoft\apache-tomcat-7.0.67\bin>catalina.bat jpda start
Using CATALINA_BASE: "C:\ApacheSoft\apache-tomcat-7.0.67"
Using CATALINA_HOME: "C:\ApacheSoft\apache-tomcat-7.0.67"
Using CATALINA_TMPDIR: "C:\ApacheSoft\apache-tomcat-7.0.67\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.7.0_79"
Using CLASSPATH: "C:\ApacheSoft\apache-tomcat-7.0.67\bin\bootstrap.jar;C:\ApacheSoft\apache-tomcat-7.0.67\bin\tomcat-juli.jar"
=transport=dt_socket was unexpected at this time.
Let me guess, you read a link called "HOW TO REMOTELY DEBUG APPLICATION RUNNING ON TOMCAT FROM WITHIN INTELLIJ IDEA" on blog.trifork.com.
The instructions say to do this for Windows in your setenv.bat:
set JPDA_OPTS="-agentlib:jdwp=transport=dt_socket, address=1043, server=y, suspend=n"
Yeah, that's not going to work. catalina.bat adds its own quotes, so it winds up trying to do this:
if not ""-agentlib:jdwp=transport=dt_socket, address=1043, server=y, suspend=n"" == "" goto gotJpdaOpts
A better plan is to do this:
set JPDA_OPTS=-agentlib:jdwp=transport=dt_socket,address=1043,server=y,suspend=n
I know this is from almost a year ago, but I ran into this, and ultimately had to remove "#echo off" from the Tomcat batch files and chase this down myself. Hopefully, this will get voted up so that it can save someone else this grief.
There is another possibility that you configure both two different ways to enable JPDA in jvm during starting tomcat in remote debug mode.
In windows, there're several ways to enable JPDA in jvm.
1.one way is :
open the startup.bat.
add the lines below
set JPDA_ADDRESS=8001
set JPDA_TRANSPORT=dt_socket
call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS%
2.the second way is:
create a setenv.bat file under CATALINA_HOME/bin directory.
and add the line below:
set JPDA_OPTS=-agentlib:jdwp=transport=dt_socket, address=1043, server=y, suspend=n
of course, they're other ways.
I have the same problem with you, but then I found I configured in these ways both, it will result in the failure to open the JPDA port, without any error details.
Then I chose the method 1 only, the port was opened successfully.
Hope this can help other newbies on this.
The space char in C:\Program Files\Java\jdk1.7.0_79 cause the problem.
Replace it with short name could solve the problem.
Execute command dir c:\PROGRA~1\Java\jdk1.7.0_79 and check the file list to verify whether PROGRA~1 is correct. If not, try PROGRA~2 and so on...
Then change environment variable JAVA_HOME or JRE_HOME to try again.

Glassfish server open source addition failed to install

i got the following error when i tried to install GlassFish Server glassfish-3.1.2.2-windows().exe
Executing command :C:\glassfish3\glassfish\bin\asadmin.bat --user admin --passwordfile - create-domain --savelogin --checkports=false --adminport 4646 --instanceport 7070 --domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920 domain1
C:\glassfish3\glassfish\bin\asadmin.bat --user admin --passwordfile - create-domain --savelogin --checkports=false --adminport 4646 --instanceport 7070 --domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920 do main1 The system cannot find the path specified.
print screen of error is following
I just ran into this same problem and it appears to be created by the batch files asadmin.bat and asenv.bat. The batch files read as follows (I've removed the REM statements and lines that didn't pertain to the problem:
asadmin.bat in c:\glassfish3\glassfish\bin
REM Always use JDK 1.6 or higher
REM Depends on Java from ..\config\asenv.bat
call "%~dp0..\config\asenv.bat"
if "%AS_JAVA%x" == "x" goto UsePath
set JAVA="%AS_JAVA%\bin\java"
goto run
:UsePath
set JAVA=java
:run
%JAVA% -jar "%~dp0..\modules\admin-cli.jar" %*
asenv.bat in c:\glassfish3\glassfish\conf
set AS_JAVA=C:\Program Files (x86)\Java
I could not figure out how to get Glassfish to just use the environment variable during install. I attempted to use the -j "(javapath)" argument, but this didn't solve the problem for me.
What worked, and I'm not proud of this solution, is to give Glassfish what it's looking for. If you put together the path its constructing above, you get C:\Program Files (x86)\Java\bin\java.exe. Since Java installs to C:\Program Files (x86)\Java\jre7\bin\java.exe, I simply copied the contents of C:\Program Files (x86)\Java\jre7\ to C:\Program Files (x86)\Java\ and Glassfish installed correctly.
If someone else has a better solution to this problem, PLEASE post it!
Full Disclosure:
Installing Glassfish 3.1.2.2 on Windows Server 2008, running on a VM.
Update: A co-worker of mine came up with a different solution that doesn't involve copying the contents of C:\Program Files(x86)\java\jre7.
During the Glassfish install, at the point where it's requesting a password for the admin account, edit the asenv.bat file and add the "jre7\" to the line I quoted above. This forces Glassfish to look in the proper folder.

Categories