Created an osgi bundle (jsp hook) in liferay. Using the server tab in Liferay Workspace environment, added the bundle to configured server.
Checked the osgi shell with
lb -s mytest.hook
START LEVEL 20
ID|State |Level|Symbolic name
455|Installed | 1|mystest.hook (1.0.0.201603221133)
The state is "Installed". Not sure how to proceed further in terms of the deployment. How will the State change to "Active" ?
Try the following command:
start 455
Probably your bundle does not resolve correctly. You should get a an exception that tells you the reason after calling start.
I was able to get it deployed successfully by actually putting it to the deploy folder, from which the Liferay's deployer kick's in and does the rest. So basically the deployer doesn't get notified when you do it from the server tab and add you project for deployment.
Related
When I start my spring boot app as a systemd service I receive this error:
start-stop-daemon: warning: this system is not able to track process names longer than 15 characters, please use --exec instead of --name.
Spring boot seems to build the process name from the jar name and the directory the jar is contained in. Is there any way to fix this aside from renaming the jar, and the directory it's contained in, to be shorter than 15 characters?
If I try to edit spring boots startup script to use --exec instead of --name then I get another error:
'start-stop-daemon: unable to stat /opt/program/programname_optprogramname (No such file or directory)
It appears that this issue is fixed in Spring boot 2.0.2. So if you run into this issue upgrading might fix it (not to imply that upgrading is always a simple effort)
In Hippo, There are two web applications packaged as war files inside a directory called webapps, a number of libraries in a directory called shared/lib, another set in a directory called common/lib, and some configuration files such as a log4j descriptor and a Tomcat context descriptor in the conf directory.
But in Heroku, I can not find the directory of tomcat to deploy these directory like the structure of Hippo (shared/lib, common/lib, conf)
Thank you
Hippo requires access to the entire Tomcat instance for setup at least. I've read through the Heroku documentation (most of it just skimmed), but I can't see that they provide that access.
However, there is possibly a second option which you may be willing to try; build Hippo in a docker image, and deploy that into Heroku:
Creating a docker container for hippo
Deploying docker container to Heroku
I haven't tried or tested any of this, so I can't guarantee it's success. But if you're limited to using Heroku, then it's at least worth a try.
Also, if you manage to get it running using docker, I would be extremely interested to know more details.
I want to create an init.d service for my spring-boot app.
I want it to be stopped by default and only run when the user runs service my-app start.
Where do I set MODE=service as described on below page.
http://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html
Found I needed to add the embeddedLaunchScriptProperties option to the Spring Boot Maven
I have tried deploying my meanjs on heroku.
I forked this https://github.com/meanjs/mean
1.) Login to heroku
2.) Deploy and connect github repositor
enabled automatic deploy CI
Click on Manual Deploy
On the build log it says "Bulid succeded"
My question is.
Why am I getting this application error?
When all I did was forked the repository and deployed it on heroku?
https://serkolgame.herokuapp.com/
Did you add a mongoDB to your app? Without it, the startup process is likely to fail.
Here are some options:
If you are using the default dev environment - then just add the mongodb connection string in development.js and restart the server
If you are using the prod environment - then you can use environment variables uri: process.env.MONGOHQ_URL or process.env.MONGOLAB_URI
This is assuming you have a mongoDB sandbox setup somewhere, if you don't, you'll first need a mongodb sandbox (get one from Heroku, Compose.io, or MongoLab).
I am using jenkins CI to build my project. After the build I had post steps shell script copy the war to WSO2 application servers /repository/deployment/server/webapps/ folder. But what I observed was sometimes ( not always ), the server failed to redeploy the web application. Most of the times the web application would be redeployed using the new war file copied by jenkins into the webapps folder. But sometimes this did not happen. At such times the only solution was to stop the wso2as server, delete the web applications folder leaving only the new war file in wenapps directory and start the wso2as server again. This deployed the new war file and testing could proceed.
But we need to run automated selenium tests. So for the tests to run we need the new war file to be deployed reliably on every jenkins build.
So I wrote a little script in the jenkins post step like below :
#!/bin/bash
/home/kk/wso2as-5.0.1/bin/wso2server.sh stop &&
sleep 1m &&
rm -rf /home/kk/wso2as-5.0.1/repository/deployment/server/webapps/Duster_App1* &&
cp /home/kk/.jenkins/workspace/Dusters_App1/target/Duster_App1-${MAVEN_VERSION}.war /home/kk/wso2as-5.0.1/repository/deployment/server/webapps/Duster_App1.war &&
/home/kk/wso2as-5.0.1/bin/wso2server.sh start &&
echo Starting wso2as
This script runs. The wso2as server is stopped, the webapp folder is deleted, the new war file is copied corectly in place, I get the 'Starting wso2as' message on jenkins console output, BUT the wso2as server does not start. It remains in the stopped state. I introduced the sleep 1m line after the wso2server.sh stop command thinking the server may be taking time to shut down and hence fails to start again by the time the wso2server.sh start command is run. But no. The server is stopped cleanly before the start command is run as I have verified by following the log file as well as by ps aux command.
So what could be preventing the server from starting again?
IMO writing a script to delete webapp folder and restart the server from time to time would not be a good idea. I would suggest you to do following steps and then try the deployment from your jenkins build server to AppServer repository/deployment/server/webapps.
1.) Stop the server
2.) Open the [AS_HOME]/repository/conf/tomcat/catalina-server.xml config file
3.) Now make the unpackWARs attribute in Host element "false"
4.) restart the server
By default AppServer would extract the WAR file inside webapps, and it is possible that this could cause intermittent issues when deploying the same webapp again and again. Please try this way and see.
The WSO2 servers are OSGI based. The modules offer also web services for all tasks you can do in the admin console. If you start the server as ./wso2server.sh -DosgiConsole and you can list all service interaces with osgi> listAdminServices. You will find i.e. interfaces to upload WAR, CAR and AAR archives. The upload is one stateless call, but the handling of the artifact upload is a little bit tricky and you have also to deal with the self signed certificates of the WSO2 server. You can do the upload in a script language of your choice or make a simple Jenkins plugin and integrate this into your build job.
If you want comfort and don't do it yourself, use this Jenkins post-build plug-in to deploy the WAR into the WSO2 AS via the deployment web service API: https://github.com/ma-ha/Jenkins-WSO2AS-Deployer