I am trying to run the xtend Server (ServerLaucher.xtend) as a Java Application. It works if I execute it in eclipse. If I open the Run Configuration, click on Show Command Line, copy the code from it (which looks like this one)
/usr/lib/jvm/java-8-openjdk-amd64/bin/java
...
mydsl.web.ServerLauncher
and run it in a normal terminal, the server starts as normal and says that it is available under localhost:8080. The problem, however, is that, in contrast to running it in Eclipse, the website doesn't work and I got the error website:
HTTP ERROR 503
Problem accessing /. Reason:
Service Unavailable
Powered by Jetty://...
Related
I have developed an application in javafx. It works very well on my laptop even when I deploy it and run on my computer, but when I install it on another pc the application starts normally, but does not display any interface (the task bar it is present). When I run the .jar with java -jar monapp.jar command I have an error in console
error shown in the console
Please help.
I built Springboot micro services application, here i am making rest call to other website which was SSL certificate protected, i imported certificate to my java keystore and i am able to make rest call and able to get response when i am debugging that application from eclipse IDE, but when i am trying to run the jar from command prompt using the command java -jar xxx.jar then application starts and run time unable to get response from the same site. I have configured JAVA_HOME environment variable in my system and using the same jre for Eclipse and command prompt , i have no clue what caused this issue. Any one help me identifying root cause.
Thanks
I got stuck in the steps to deploy the play-java application to standalone server. I am using Ubuntu instance running onEc2 machine. After reading the official documentation I followed these steps:
Install typesafe activator to $Home/activator
Copy my project folder to $Home/activator/projects using Jenkins
Run cd $Home/activator/projects/project
Run dist command. It generate the project sh file
Run cd $HOME/activator/projects/sample/target/universal. It shows me three things i.e. sample-1.0.zip , tmp.
Run unzip sample-1.0.zip
Run cd $Home/activator/sample/target/universal/sample-1.0/bin. It shows me two scripts i.e. sample (for mac and linux) and smaple.bat (for windows).
Now, I tried to run this command as documentation says: sample-1.0/bin/sample -Dplay.crypto.secret="abcdefghijk" but it got stuck and shows nothing except a prompt on terminal.
What next steps are required to run the application in daemon mode. So that server will continue to run always?
Another question is why do I need to follow these steps because just after copying the project I can easily run activator run command to sample folder to run the server.
EDIT-1
Now I am getting Error: Could not find or load main class play.core.server.ProdServerStart while running sample -Dplay.crypto.secret="abcdefghijk" command
Play Framework modes
Play like other frameworks can run in different modes because we are usually like to run our program in different situation and these situations need their configuration. Production is one of play modes. In this mode as the name suggested we are ready to deploy our application where user can use.As a result requirements are different.
Some common configuration in Production mode :
We are confining https
Using production data base not testing one
Play doesn't show errors
Play framework run as long term process and if you are log out of your server your application will run
If your app fails Play will clone another application and run that so your app run forever except you turn it off.
and so on (it is based on your Production config file)
Your answer :
If you just want to test your app in remote server and see what happened, it's okay to use activator run this command runes Play app in development mode and application will killed if you exit or log off (error will shows up and so on). But if you want to use your app for Production it is necessary to run all of these steps.
i tried to install the openCMS in my local system . after doing all the steps in the manual i got the 404 error . i tried from CMD to run the setup it shows E:\Tomcat5\webapps\opencms\WEB-INF>setup
The input line is too long.
The syntax of the command is incorrect. can any one help me with this
You are not supposed to run the setup from command line. You need to deploy the opencms.war into Tomcat's webapps folder, then start Tomcat, then you can run the setup via browser:
http://localhosthost:8080/opencms/setup/
See http://www.opencms.org/en/development/installation/server.html
I have a batch file which start Tomcat as follows (when running it on Windows it works fine)
...
start C:\Users\root\tomcat\tomcat2\bin\startup.bat
The batch file is called from Jenkins as follows
I have this error in the Jenkins Consol at the end of the build
D:\jenkins\workspace\Start 3T2>start C:\Users\root\tomcat\tomcat2\bin\startup.bat
Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information
Finished: SUCCESS
When I check the task manager I see that the server is started but in background. I need actually to start Tomcat it in the Console.
This is what I did :
I added -Dhudson.util.ProcessTree.disable=true in jenkins-slave.xml
used to start jenkins slave service.
I added set BUILD_ID=dontkillme in startup.bat to stop Jenkins from
stopping the process in the end.
I think Tomcat start correctly in the end but not in Console. I'm running Windows 2012 server/Tomcat7/Jenkins 1.578.
Any idea on how to start Tomcat in a Console ?
AFAIK, if you're trying to start Tomcat console on a given machine which has Jenkins configured as service, it will not work. To make it work, you will have to connect to the given machine using JNLP. In case it's a standalone system and you want to open a Tomcat console using Jenkins, you will have to set up a Slave on the same machine and that too using JNLP (Launch slave agents via Java Web Start) in the Launch method section in Jenkins > Manage Jenkins > Manage Nodes > Slave Node's Configure page.
You can connect to the slave using any of the methods shown below. You will see the below option as soon as you configure the slave node and click Save. I ran the highlighted command from the Win command prompt. In my set up, i had configured Master and Slave on the same machine. I have Win 7 Professional, 64-bit laptop.
Once you run the command, you will see a small window that will pop-up and will display 'Connected' message as shown below:
At least for me, i checked that hudson.util.ProcessTree.disable=true & BUILD_ID parameters were not required. The only thing that i needed was to make sure that the following property is unset: HUDSON_SERVER_COOKIE
P.S.: You might have to make sure to start JNLP on reboot. A start-up script will do that. Also, ensure that your project/job is tied to the given slave which is running using JNLP mechanism.
i was going crazy with this , as shutdown.sh worked from Window-Master-Jenkin-->Linux-Slave-Jenkins, but startup.sh was not happening on my linux-slave-jenkins though startup.sh execution showed success message, as there were no logs anywhere, it was difficult to troubleshoot, not sure how and why setting up "export HUDSON_SERVER_COOKIE= " just before running startup.sh worked. Anyway Thanks a lot.