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.
Related
I had problem with Websphere.
I want to run test.jar in websphere.
I copy test.jar in dropins and run "sh ./server start --archive="java -jar ../dropins/test.jar"
Starting server --> ok
But console.log empty
It's not clear from your description exactly what you're trying to do, but based on your title, I assume you're trying to run a Java application. Liberty is an app server for running Java EE apps, but given that you're trying to run a file ending in .jar, that is more typical of a standalone (Java SE) app. Also, the command line you're using is mixing options, the --archive option is for specifying a target file for the server package or dump operation. See the IBM help topic https://www.ibm.com/docs/en/was-liberty/base?topic=line-server-command-options for more details. On the Liberty app server, you can deploy Java EE (not Java SE) apps by copying the .ear or .war of the app to the dropins directory. If you provide additional details about the contents of test.jar and what you're trying to achieve, you'll get a more complete answer.
When I compile my maven-based project I have the resulting jar file in 'target/my-application'. When I run locally my application (I use Payara Micro if this is important) I have the following in log:
Payara Micro URLs
http://localhost:8080/my-application-1.0-SNAPSHOT
How do I get rid of my-application-1.0-SNAPSHOT from URL address?
As per request, I'd say that:
What type of application is that? EAR/WAR?
war application (however, maven creates for me "payara-uber-jar"
and I run the application via java -jar filename.jar
What application server is it running on?
Payara micro
Are you using maven?
Yes, I am.
Hello according to Paraya documentation what you need to do is:
java -jar payara-micro.jar --deploy NAMETHATYOUWANT.war
And then the context path will be /NAMETHATYOUWANT
https://www.davidsalter.co.uk/payara-micro-context-path/
I am running Ubuntu 16.04 and I need to install and run Restcomm JSS7 stack as a JBoss AS Service.
I followed this video tutorial to install JBoss AS 7. Then I set the JBOSS_HOME environment variable to installation directory of JBoss AS 7. As a result, I was able to start the JBoss AS successfully by executing ./run.sh in the bin sub-folder of the installation directory.
Then I followed this guide to install Restcomm JSS7 stack. For that, I downloaded restcomm-jss7-7.4.1404.zip, unzipped it to /opt/ and then navigated to the ss7-jboss sub-directory and then executed ant deploy,
and the result was
...
BUILD SUCCESSFUL
which according to the guide is an indication of the service deployed successfully.
Then I am following CHAPTER 4 SECTION 4.1 of this user manual to run it as a JBoss AS Service. According to it,
All you have to do to start the Service is start the JBoss AS. This
will automatically start the SS7 Service. To start the JBoss Server
you must execute the run.sh (Unix) or run.bat (Microsoft Windows)
startup script in the /bin folder (on Unix or
Windows).
TWO PROBLEMS:
My <jboss_install_directory>/bin does NOT have a run.sh script. Because of this reason, I tried by running JBoss AS by using the regular standalone.sh script.
Next in the user manual, it is stated:
Result: If the service started properly you should see following lines
in the Unix terminal or Command Prompt depending on your environment:
(Note: I have pasted the following excerpt from user manual here, since it is too long to paste in this question.)
But I see none of those lines in my terminal. Rather, my terminal output of running ./standalone.sh is pasted here.
So I don't know how and where to proceed from here. Please help.
NOTE: This question is NOT a duplicate of my other question. Like I mentioned in the question titles, this question is about why my JBoss AS installation doesn't contain a run.sh script, and what would be its alternative. The other question is about some possible command to find out the JBoss Services started when it is running? When a beginner is starting to learn something, their entire purpose Not getting the job done. They have many confusions/questions in their mind.
The documentation documents how to start a JBoss 5.1 server but your installation uses a JBoss 7.1 server, which is why you have to use standalone.sh instead of run.sh to start the server and why the logs are different.
Since you correctly reach the JBoss AS 7.1.0.Final "Thunder" started in 3955ms line I wouldn't worry too much (except about using a documentation that is clearly outdated).
The documentation of your product only declares compatibility with JBoss 5.1.0. While it may work on later releases, you might want to check if there's a more recent version of your product. I wouldn't recommend installing JBoss AS 5.1.0 as it isn't supported anymore and will contain security breaches.
I have installed JRE and now I'm trying to install Solr by following the Solr Reference Guide.
The guide dictates:
Stop your Java servlet container.
Copy the solr.war file from the Solr distribution to the webapps directory of your servlet container...
Start your servlet container, passing to it the location of your Solr Home in one of these ways:
Set the Java system property solr.solr.home to your Solr
Home. (for example, using the example jetty setup: java
-Dsolr.solr.home=/some/dir -jar start.jar). Configure the servlet container so that a JNDI lookup of java:comp/env/solr/home by
the Solr webapp will point to your Solr Home. Start the
servlet container in the directory containing ./solr: the default Solr
Home is solr under the JVM's current working directory
($CWD/solr).
Questions:
Where do I find this Java Servlet container?
Where/how do I execute those commands to start/stop/configure the Java Servlet container?
How do I set Java system properties?
Mine was quite straight forward. After downloading the file, I extracted it to a folder on my Server. I used the Command Line to complete the installation.
With the Command line, navigate to the example folder inside the solr-X.XX.X folder you extracted the file to, once there run the java command:
cd C:/<folder>/app/solr-X.XX.X/example
java -jar start.jar
It would perform the installation for you, like magic.
You can access SOLR by visiting localhost:8983/solr
I'm using a Windows Server though, it may be different on yours, but I guess the logic is the same.
You should to install Apache Tomcat. All information about these servers you can find here.
You also could to install Jetty, JBoss, vSphere, tc vFabric Server ... but I think that you'll setup tomcat and solr easier (it is mine personal opinion, if you are familiar with any one, use them of course).
Tomcat setup is described here.
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.