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!!!
Related
I need to deploy my spring boot rest api to my VPS server, to do so I installed JAVA and MAVEN. I ran it using sudo java -jar myfile.jar it is working but the problem is that after sometimes it stops and my webservice send me error 503.
I would like to know how to deploy it and run without it stopping.
PS : There is no page ".html" to be accessed that's the reason I want to deploy as JAR
I've deployed application on provider server on URL:
http://my.domain.net/my-spring-boot-app/
Provider use Tomcat as java app container. App connects to PostgreSQL, and it can do this only from this server host - because it is a restriction (probably on pg_conf). That it's important, because an error shows only on server site. How can I debug remotely my Spring Boot (war!) application, when I use maven & eclipse pack?
I don't know about the PostgreSQL issue but seems to me that this has nothing to do with data access layer or tools as it is basically a Java application which implies the rules for all JVM applications.
So in order to set up your server for remote debug, you have to hack the jvm (catalina in your case as you are running a Tomcat server) startup options by adding below entry to your startup script:
For a Windows system:
set CATALINA_OPTS="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n %CATALINA_OPTS%"
For a *nix system:
export CATALINA_OPTS="-agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n $CATALINA_OPTS"
There is a shortcut to the below instruction, using the catalina startup script options, if that represents an alternative for you: catalina jpda start
You application is then up and listening on the configured port (8787 is this sample, which you must be open), and you can then attach your IDE (Eclipse) to debug the application remotely:
Navigate to Run -> Debug Configurations
Create a new Remote Java Application configuration
In the Connect tab setup the run configurations including the Host and Port
From the Common tab, check the Debug option.
Apply and Run you configuration.
I'm looking into installing Jenkins, in the instructions it says
"Easy installation: Just java -jar jenkins.war, or deploy it in a
servlet container. No additional install, no database."
I understand the servlet container method, but does the above statement mean that just installing Java and running the .war file will somehow spinup a webserver and start serving http request ?
Yes, the war file contains the built-in Winstone servlet container, and running that command will start it and make it listen for requests on port 8080.
Edit: Jenkins 1.535 and above bundles Jetty (rather than Winstone). You can still run it with java -jar jenkins.war.
Jenkins comes bundled with Winstone, a very lightweight servlet container. As such, Jenkins can be started from the command line as stated by the instructions without any additional software installation.
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.
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