Apache server not starting but in Eclipse it shows starting - java

I have installed Apache Tomcat server in my "D:" drive and Eclipse is configured with it. When I start the server from Eclipse it shows started.
But when I enter
http://localhost:8080
It shows following error and not load the Apache server.
the netstat shows the following.
So how can I fix this. Need some help. Thank you!

You are running Tomcat from eclipse in that case, the default tomcat project is not available therefor you are not able to see Apache Tomcat.
So you need to try accessing your app as http://localhost:8080/myWebApp. And if you want to see the Apache Tomcat UI than start the Apache Tomcat from the bin folder using startup.bat file or an application exe which shows you CMD prompt (black screen). But than to access your myWebApp than you must deploy it in Apache tomcat's webapps folder.
You may also want to configure the welcone-file or load-on-startup servlet if you are using jsp-servlet technology.
For further information please refer official documentation from Apache Tomcat or search on Google/YouTube for visual examples.

You can try the following steps,
Try with your your_machine_ipaddress:8080
OR
Try with different port say 8181.
Go to tomcat_installed_directory/conf/server.xml
Search for the string "connector port=" and change the port from 8080 to 8181
Restart the tomcat and try with localhost:8181 or localhost:8181/yourwebappname or your_machine_ipaddress:8181
OR
If you are behind proxy server and trying to access tomcat running in some other machine, then add the ip address of the machine where tomcat is running to your browser bypass proxy.

Related

tomcat starts but doesnt show up in browser when entering: localhost:8080 or ip:8080 Centos7 vm

so I've manually installed tomcat version 9.0.10 and the newest java JDK.
I've correctly added the manager-gui and admin-gui users. i have went into the server.xml files and found that all the ports were correct.. (connecting to default port 8080) I had to do []# unset CATALINA_HOME or else it wouldn't let me start tomcat so I did and it started but when I went to the browser and typed in the localhost:8080 it didn't show, it only says firefox could not establish connection with server localhost:8080 so I went into logs to see if there were any errors and sure enough there was an error like so: /usr/local/tomcat/apache-tomcat-9.0.10/bin/catalina.sh: line 464: /usr/bin/Java/jdk-10.0.2/bin/bin/java does not exist.. and its probably right why would there be /bin/bin/ like that in a directory.. so i went into the catalina.sh file copied what it had inside into a blank file in documents and went to line 464 (txt editor numbered the lines for me) and what i found was this line at 464: eval $_NOHUP "\"$_RUNJAVA" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS %CATALINA_OPTS\
but I have no idea what to do about it.. i think i might have a path problem or could be a port problem but I don't think so... I've installed apache and it works great in the browser with localhost.. could that affect the tomcat access maybe?
anyway, id really appreciate any help I can get.. I'm very new to this by the way. I'm sorry, I couldn't copy and paste from my virtual machine so I had to type it. im on centos 7.
I think you are looking for tomcat deployment page where you can manage your artifact. If that is correct
First thing you need to check is that whether your installation contains tomcat manager application.
You can verify this by looking in to this path ("apache-tomcat-9.0.10\webapps\manager") If this path is absent you may have to reinstall your tomcat.
Try downloading the zip from the below path and start the server.
If you are trying to deploy your custom application you may have to provide the context path for accessing you application. Also you can verify the deployment by looking in to the above path. For eg: if you are trying to deploy test.war then a folder named test will appear in the webapp folder.
Hope this helps.

Jenkins Deployment on linux

I have configured Jenkins server into Apache tomcat 9.0.0M4 , I deployed the jenkins.war files into tomcat server.
The below error message appears when trying to navigate to localhost:8080/jenkins.
(awt is not properly configured on this server. perhaps you need to
run the container with "-Djava.awt.headless=true")
HELP Please!!!

Deploy java program on Linux

A web application has been developed in C# which hits my Java code through a restful web service which returns a JSON response.This process was working on a local machine with tomcat server. Now my Java application needs to be hosted on an external server in Linux environment.
Using putty, I logged into the particular hostname and as a root admin.
I have installed Java JDK 1.7, Apache tomcat server 7, my Java application as a war file is placed in the webapps folder. I can start the tomcat server too.
My question is:
How do I hit my application from windows. Is it http://x.y.z.k:8080//MYAPPNAME(war file name)/?
How do i check the java logs in the linux env?
Also I have a set of files that I read from my windows folders as in C://uploads//file.txt or C:\DeveloperTool\Pluggins\
I replaced them with the linux structure in my java code. as /home/opt/file.txt
Will this work?
How do I hit my application from windows. Is it
http://x.y.z.k:8080//MYAPPNAME(war file name)/?
If 8080 is the port Tomcat is configured to listen on (I think by default, it is), then that is correct. Bare in mind the web app name is case sensitive. You can configure this setting in $TOMCAT_HOME/conf/server.xml
How do i check the java logs in the linux env?
Since you're using a remote shell over SSH, you will want to use either tail or less to monitor logs in real time. The log files are stored in $TOMCAT_HOME/logs.
Try
$ less +F /path/to/tomcat/logs/catalina.out
catalina.out is the main file when running Tomcat on *nix systems.
Also I have a set of files that I read from my windows folders as in
C://uploads//file.txt or C:\DeveloperTool\Pluggins\
I replaced them with the linux structure in my java code. as
/home/opt/file.txt Will this work?
As Lutz Horn mentioned in the comments, try it. In theory, that should work fine as long as the permissions are setup properly.

Eclipse Tomcat7 Server Doesnt support Remote Host

My Problem is: When I try to add my Tomcat7 to Eclipse EE as a server, I get an error message that says:
"The currently selected server type does not support remote hosts"
Does anyone know how to solve this problem? Or how to enable remote hosts in Tomcat?
The Tomcat support in Eclipse is meant for running Tomcat locally on your own machine. That's necessary because Eclipse deploys web modules to Tomcat by copying them into a folder in the Tomcat installation. It can't deploy things to a remote Tomcat server because it can't copy files into a folder on a different computer.
Typically you'd run Tomcat on your own computer for development, and then (manually) deploy your application to a remote server when you want to make it available to the rest of the world.
As you can see in the image the "server host name" field is "localhost" which is correct parameter value.
Solution:-
in your case it would have been showing something like "cloud" or something else. please make sure that you pass correct value which is "localhost".
i also faced this issue .my case is "i already have created tomcat server and my tomcat server(8) is installation location is
"c:/xyz/apache-tomcat-8.0.28"
then i changed my tomcat server(8) location to another place `
"c:/abc/apache-tomcat-8.0.28"
`after that when i try to create new tomcat server 8.then it showing this error
i solved by changing server runtime Environments in eclipse
preferences => server => Runtime Environments
then select your tomcat type .you can remove the server and add new server runtime Environment or edit existing one by giving correct tomcat installation path.then it won't give "The currently selected server type does not support remote hosts" error.
When you add Tomcat to Eclipse as a server runtime, don't forget to check "Create a new local server".
While defining new Server in eclipse
In server host name box use localhost instead of cloud.
for me I had renamed the tomcat folder after installing and was getting this error message with STS and Tomcat 6. See bobthemagicman's answer here: Eclipse Juno Tomcat 6 Remote Host Not Supported
Try to delete the temp file in your workspace.
...workspace\ .metadata.plugins\org.eclipse.wst.server.core\tmp-data
then make a new server with a new server runtime environment.
Just change Server's Host Name to LOCALHOST
See here

I can't figure out to start glassfish within netbeans

When I click on Run it displays the following error message:
Starting GlassFish v3 Domain
GlassFish v3 Domain start failed.
/Volumes/Private/noname/Sites/projects/java/MyFirstServlet/nbproject/build-impl.xml:602: Deployment error:
GlassFish v3 Domain start failed.
See the server log for details.
BUILD FAILED (total time: 2 minutes 0 seconds)
But then I fire up Terminal in mac and use asadmin start-domain and it starts.
And in netbeans I then Run the project and it fires up Safari and displays the content.
But why can't glassfish start in netbeans? Any idea?
I've met the same problem as I was learning java web programming, but in windows env. I've spent much time guessing what that error could mean because the log file wasn't clearly saying that. Finally I found out that glassfish v3 was trying to run on 8080 port, which was already occupied by reportingservicesservice.exe which is sql server service. I didn't get to know how to switch the port used by glassfish, but I found that in netbeans 6.8 (which I use) in tools->servers I can add a new glassfish server instance which runs on a different, free port - that solved the problem :)
Netbeans IDE X.X --> Tools --> Servers
Add Server --> Choose Server --> GlassFish 3.X
then click (next) browse installation location click (next)
select (register local domain) domain name : domain 2
click on finish button
My problem was with the port 8080, when I type http://localhost:8080, I found that oracle 10g was using it first before I install netbeans 6.8 with glassfish, I deleted oracle database 10g and, wich made the 8080 port free, and now everything is fine, it works.
I just had the same problem, and it happened because of a version mismatch between the local server (Glassfish 4.1) and the remote (Glassfish 4.0).
Only thing that comes to my mind is to check if the JAVA_HOME is properly set. Guess GFv3 requires it to be set to the bin folder in the JDK installation. Just guessing...
Go to following link there i've wrote solution for it...
http://forums.netbeans.org/post-65058.html
I just ran into this same problem with both glassfish and tomcat in netbeans 6.9. My problem and solution were both simple. The problem: tomcat was already running on my machine on port 8080 and therefore netbeans could not create a new instance of either. The solution: shutdown the running instance of tomcat and let netbeans start it up for you. Hope this helps.
You must change the port of glassfish. To do this:
join C:\Program Files\SEMS-v3\glassfish\domains\domain1\config open the file domain.xml
and change the text in 8080 by 9999.
After you do this, enter the remove server netbeans glassfish glassfish addServer then add it so that it can recognize the port changed. Then Started On glassfish server, then run your project.
Here is the link: http://www.srikanthtechnologies.com/blog/java/changeglassfishport.asp
Got the same problem, here are the steps I followed to solve it:
remove the glassfish server under "Services > Servers"
close projet and Netbeans
locate the install directory of Glassfish and go to domains (GlassFish_Server\glassfish\domains).
delete the "domain1" directory
start Netbeans
recreate a Glassfish server
Don't forget to recreate your data sources and connection pools
i have start to learn java recently,i have encountered the same problem too but i found out that when the first time the guidebook ask me to add a server, i put in user and password.
so i give another try to remove the server and add it again without the password.
and it is working.
I faced the same problem and solved by configuring my netbeans config file.
Find NetBeans 8.2\etc\Netbeans.conf file and search for this line :
netbeans_default_options="
Add --locale en to the end before quotes. Eventually this line looks like:
disableMemoryMapping=true --locale en".
Restart Netbeans...

Categories

Resources