unable to deploy application on cloudfoundry raising error 404 Not Found - cloud-foundry

i am trying to deploy spring application on cloudfoundry.but as a build war file of project using mvn package command.after that i used vmc push --appname target(directory)
i finished all the steps that need to push on cloudfoundry.
finally i got message uploading application-name....ok
then i entered command vmc apps
then it shows all my pushed applications....
there was url(http://cloudapp-project-master.cloudfoundry.com/) for my deployed application.
which i copied and placed in browser then it giving me 404 Not Found nginx
i don't know where is the problem....
Please help me to get out of this.
advanced thanks....

Can you look at the logs folder to see if the files there give more information.
vmc logs <app-name>
or
vmc files <app-name> logs/stderr.log
vmc files <app-name> logs/stdout.log

What is the status of the app when you run vmc apps? I would recommend you to file a ticket at http://support.cloudfoundry.com with detailed information about the issue and maybe share the project so that they can reproduce the issue easily. You will need the account registered in cf.com to be able to login.

Related

Run "git pull" for a Django project running on Windows Server 2016 IIS

My current set up has a Django project running on Windows 2016 IIS.
The project is hosted on GitHub for collaboration and I would like to set up a GitHub webhook so whenever there's a push to master branch from any of the collaborators, the IIS Server will run a "git pull" to update the project on the server.
What is normally the setup for this?
What I have tried so far is to create an endpoint in the Django project, this endpoint whenever called will run Python subprocess to run "git pull" command in the project itself. However, whenever I run it, it get a 500 response from IIS.
Thanks #VonC for helping.
I have looked to the log (which was the one in XML) but it wasn't much help.
What I'm posting here was my workaround, not exactly to the answer for the question above.
I used django-background-tasks to add the command subprocess.run(['git', 'pull']) as a task to run later (after a few seconds after that by the #background decorator).
Error 500 means the IIS server throws an error.
You need to check said IIS server logs in order to check at what point in the execution of the webhook endpoint script the error occurs.

Trying to Use the InfoRecoverySample in IS 5.0.0

I'm trying t use the InfoRecoverySample in IS 5.0.0. I was able to build it as according to the instructions here:
https://docs.wso2.com/display/IS500/Recovering+Account+Information+Using+a+Webapp
However after placing the war file in [IS_HOME]/repository/deployment/server/webapps/ and restarting, I get errors in the application logs. Unfortunately they are very vague:
org.apache.axis2.deployment.DeploymentException: Error occurred while deploying webapp : [IS_HOME]/repository/deployment/server/webapps/InfoRecoverySample.war
Error occurred while deploying webapp : [IS_HOME]/repository/deployment/server/webapps/InfoRecoverySample.war
Error while deploying webapp: StandardContext[InfoRecoverySample.war].File[repository/deployment/server/webapps/InfoRecoverySample.war]
My best guess is that the pom.xml file is out of date because I see lots of references to 4.2.0. This is the pom.xml file I'm using:
https://svn.wso2.org/repos/wso2/people/chamathg/samples/is/InfoRecoverySample/pom.xml
Does it sound like I'm on the right track? If so, is there an updated pom.xml file (or sample project) out there?
TIA,
Mike
Deploy the war file in your tomcat/webapps folder, not the identity server webapps. then access via localhost:8080
edit:
The way the pom is designed is for deployment on your localhost, not the wso2 server. Despite what the instructions say. However, you can deploy it to [IS_HOME]/repository/deployment/server/webapps/ as long as you remove most of the jar files that are created in the war's WEB-INF/lib directory. These will conflict when being run from the IS. The only one you need to leave is org.wso2.carbon.identity.sso.agent-1.2.0.jar. remove, re-zip, and then redeploy.

Deploying django project on AWS elastic beanstalk

I am following the tutorial for deploying a django project on AWS elastic beanstalk here:
http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html
My app works when I test locally but when I deploy, I'm getting a 404 error. Looking at the event logs, I see this message:
Error running user's commands : An error occurred running '. /opt/python/ondeck/env && PYTHONPATH=/opt/python/ondeck/app: django-admin.py syncdb --noinput' (rc: 127) /bin/sh: django-admin.py: command not found
That leads me to believe that the tutorial is missing a part about installing django files on the server or at least configuring my project to recognize django-admin.py. I have django installed on my local machine so it works there.
I know python support is brand new for elastic beanstalk but has anyone deployed django to it?
I believe you don't need to put container_commands in .config because there is no database or table at this moment.
Did you made the step?: Freeze the requirements.txt file.
(djangodev)# pip freeze > requirements.txt
Note
Make sure your requirements.txt file contains the following:
Django==1.4.1
MySQL-python==1.2.3
I had the same problem because I skipped it. Once I did it, add, commit and push. It works!
I followed the same tutorial recently and had a similar result.
At step 6, upon seeing the default django 'congrats' page render locally, I deployed to EB as instructed and got a 404 instead of the default 'congrats' page.
I decided to use the code up to that point as a foundation for following the 'getting started with django tutorial' which led me to a successful rendering of a 'home' view. This is a much more useful place to be anyway. I do agree that there is something wrong with the AWS tutorial and posted to the AWS forums here.
If you can, you should try to access the log file; it might give you a better idea of what's going on. Here's a link that might help:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.loggingS3.title.html

deploy a node.js application to api.cloudfoundry.com. and got an error

Error 402: App packaging failed: 'Failed synchronizing resource pool'
I got this error when deploy a node.js application to api.cloudfoundry.com.
the vmc I used is:
vmc 0.3.10
I want to know how does this error happened. Is there something wrong with my vmc? or something wrong with my node.js application?
Thank you.
You'll definitely want to upgrade to the latest vmc. "gem update" should refresh it to 0.3.18 for you but if not, "gem install vmc" to grab the newest.
What steps did you follow to deploy the app - did you just run vmc push and follow the prompts, did you have a manifest.yml file in place (probably not as vmc 0.3.10 may have pre-dated manifest support), did you provide additional parameters to vmc push?

django non-rel rollback

I cancelled a deployment to GAE while using django non-rel's manage.py deploy.
Now when I try to redeploy it says Another transaciton is already in progress and use appcfg to rollback.
But django non-rel doesn't have appcfg.py so how can I rollback or fix this issue?
I've scoured the internet and can't find any answers. I've waited about half an hour and it still displays this message.
manage.py deploy calls appcfg.py in order to deploy.
appcfg.py is in the SDK. you must have the SDK installed somewhere if "manage.py deploy" is working. you can look around for it, or download the SDK again.
There's no reason you don't have access to appcfg.py
If you need more help finding it, add details about what platform you're running on, where you installed the appengine SDK and where your python folder is.
What do you mean by "I don't have access to appcfg.py"?
Try going to cmd (for windows), navigate to your app directory, and type in the following:
appcfg.py rollback .
Hit return (enter key) and see if that works. If not, what does it display?