jenkins does not get war properly exploded - giving tomcat start page - jenkins

I downloaded latest jenkins.war (1.530) and just exploded it locally. When I go to localhost:8080 I get only apache tomcat start page instead of dashboard.
Am I missing something?
Running on OSX 10.8.2 with java Oracle 1.7.0_17

You're missing the context name in the URL, try:
localhost:8080/jenkins

exploded it locally
where exactly ? within tomcats' webapps folder ? If yes, then you have to start tomcat first.
and then visit the url http://localhost:<port>/<extractionFolderName> for e.g. http://localhost:8080/jenkins
I also use Jenkins and I prefer to use the standalone version of it, that's more manageable, and then one can run jenkins on different port, without worrying about tomcat's webapps, context and memory consumption.
http://jenkins-ci.org/content/thank-you-downloading-os-x-installer - here you can find the OS X installer.

Related

setting up jenkins with jenkins.war

I have installed latest jenkins.war from
https://updates.jenkins-ci.org/download/war/
after that I have triggered that WAR file as
java -jar jenkins.war in command prompt.
I have attached the screen shots of the same.
As I could understand from the logs that, port which jenkins trying to operate on is already in use.
would appreciate the any help on this!
By default, Jenkins will bind on port 8080 (listening address will be http://localhost:8080), you can change this port by editing the jenkins.xml file that is located in the directory where you installed Jenkins.
Change it for another value and relaunch. (or try to find who is already listening on this 8080 port, probably a web server)
By the way, instead of downloading the jenkins.war, it would be better to use the native windows installer, that will install/start jenkins as a service.
You can change the port without editing jenkins.xml. This can be useful when you are doing an initial setup where you don't have a jenkins.xml yet.
java -jar jenkins.war --httpPort=<your port>
You can also run Jenkins this way with an existing jenkins.xml. In my case I can access the Jenkins UI using both ports. When one of both ports is already used by the system like in your case, Jenkins won't start.

Do I need to install Tomcat and MySQL on the Linux server to deploy Grails app?

My Grails app is based on
Gradle with Grails 2.4.4,
Tomcat plugin 7.0.55,
and MySQL plugin(mysql:mysql-connector-java:5.1.29).
Do I need to install Tomcat on the server?
Do I need to install MySQL on the server?
Both Tomcat and MySQL are not installed on dev environment(on my PC), but it seems working.
Container
While all the other answers pointed out, that you need already a container (which of course is true) there is also the option to use one of the "standalone" plugins (like e.g. https://grails.org/plugin/standalone). This will package your app as a fat jar, where the container and your app are part of a jar, that you simply run by java -jar myapp.jar (of course your would integrate that into your regular startup scripts on the server).
This is in general no bad option, since many WAR-deployed apps don't need any of the full blown container features anyway and you would be able to configure everything in place for your workload and don't have to compromise for all running wars (or your ops team). On the downside, if there is a security problem etc. with the container you would have to roll a new jar.
/With grails 3, which uses Spring Bootstrap, this even is a default option, since the preferred way of deploying. Spring Boot 1.2 supports Tomcat, Jetty, and Undertow by default./
Database
You can use a MySQL from "somewhere" else. But this is nitpicking, since you really need a MySQL somewhere (BTW: you really should start using MySQL also for your dev env, or you will be in for a few surprises once you put your stuff over to production).
Also be aware, that you can also keep using your H2 (see your datasource config) with files. This is an OK option (that saves you from installing a DB server) for small amounts of data you are storing and also there are other free database servers like PostgreSQL.
Obviously you have to install mysql and tomcat on the server.
During development you run grails from console, so you dont need tomcat as it will use embedded tomcat but still you need to have mysql installed, if you want to use mysql.
But on production, you create a war of your app using 'grails war command' and you deploy this war to a web container just like any other war, so you need tomcat and you will need mysql installed too.
In one word answer is 'Yes'.
Fact is when you are in development environment grails uses as an embedded tomcat server provided by the 'Apache Tomcat plugin' which version corresponds to grails version.
You've not installed mysql and you claimed 'it seems working'. That's funny! But it's not mysql who is working without being installed(!), rather it's also an integrated database provided by the 'H2 Database Plugin'.
So, when you'll deploy your grails app in Linux or another server certainly you need a tomcat server to handle user request to that app and a database where your data will be saved.

Installing Jenkins on a webserver

I've searched the whole internet for this. I have a website that is run by a hosting company. All the tutorials to install Jenkins assume I'm running my own Linux machine and can perform various commands.
Is there a way I can install Jenkins on this website using only FTP?
Thanks.
Maybe. If your hosting company provides Tomcat (or another servlet container/J2EE server like JBoss) then you can install Jenkins as a webapp inside of Tomcat. Typically it just involves placing the jenkins.war file in $TOMCAT_BASE/webapps.
If your hosting company does not provide Tomcat and doesn't allow you to run Java yourself from a shell then AFAIK you can't run Jenkins.

jenkins URL with computer name does not open page

I know this question is asked before but I could not find any right solution for that
I have install jenkins on my windows 7 as windows service, it works fine with default URL localhost:8080, but when I set //mycomputerName:8080 in configuration system- jenkins location and then save it and restarted jenkins and enter //mycomputerName:8080 in browser address jenking will not open. I have done the same installation on my laptop windows 7 without any problem, but on my desktop I have installed, uninstalled several times with the same problem.
I just want to give my solution
Go to Jenkins Home Directory ( I have mine in C:\Jenkins)
Edit jenkins.xml
Add this --prefix=/jenkins to the end of the argument as show below and restart the jenkins service ALL worked OK for me !
Example :
<arguments>-Xrs-Xmx256mDhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8080 --prefix=/jenkins</arguments>
Open Url http://localhost:8080/jenkins this should bring up the home page of jenkins
As I said in my question above many people have asked this question and had the same problem but all answer have been something from jenkins documentation and actually not solution.
so finally I found the problem and write it here probably for some people with the same problem
first I uninstalled jenkins removed all files, folder and everything related to jenking also from windows registry and installed jenking but did not work.
reinstalled windows (upgrade) and installed jenking again but did not work.
next I clean reinstalled windows and installed jenkins and in this case jenkins works as I expected but I do not know what was wrong with the windows.
Add to Vamshi's answer. Instead of the config in the
C:\Users\XXXX\AppData\Local\Jenkins\.jenkins\config.xml (you won't find <argument> in this file)
add the --prefix=\jenkins to the <argument> in jenkins.xml
C:\Program Files\Jenkins and restart the service.

Grails application in openshift

I am trying to deploy my grails application on an openshift server. I have created an instance using command "rhc app create MyApp jbossews-2.0". When I ssh to the server, I see a jboss folder but no tomcat folder. How can I deploy my .war file onto the server?
I think the Docs on how to deploy a binary file will help you with this, however what the docs do not say is that with Tomcat the deployments directory is called webapps but they work the same way (except for the marker files, tomcat does not use those).
You may want to check out https://github.com/gssOpenShiftsupportExamples/JavaSample as it shows an example of how to do this with JBoss (the same thing will work for Tomcat if you change the directory as denoted above).

Resources