CloudFoundry app returning null not found error - spring-mvc

I am completely new to Cloud development. I have created a Spring Project and deployed that into cloud foundry. On my local system, app runs fine without any issues. But when i go to Cloud Foundry and try to run my application via cf url, i am getting null Not found error. Please see the screenshot below. Could you please let me know how to resolve this issue.

Related

Firebase CLI authentication problem in cloud shell

I'm trying to deploy a test web application using Firebase. I found this Google documentation to deploy a test application 1. I am able to clone a Github repository and enable Firebase on the project. The Firebase web app was created, and I used my Google account as an authentication method. I enabled the web app in Cloud Firestore, and everything seems to be working fine on the Firebase side.
My project is being deployed using GCP and running the application using Cloud Shell. The Firebase version installed is 9.22.0. I got to the point where I need to authorize the Firebase CLI with the following command:
firebase login
According to the instructions, I'm supposed to get the following message: “Allow Firebase to collect CLI usage and error reporting information?” and authorize by pressing Y, and enter to generate an URL. I need to paste the URL in the browser to authenticate with the account being used to generate a verification code and then use it in the Cloud Shell prompt.
Once I run the firebase login command, it never prompts me with “Allow Firebase to collect CLI usage and error reporting information?” It generates the link, and I paste it in the browser and I get the following screen:
I have tried cleaning the browser cookies thinking it was a browser issue, but I kept getting the same error. I have tried different browsers, but keep getting the same error. I recreated the project several times, but Cloud Shell never prompts me to allow Firebase. I have created the project in another GCP account, and we have the same problem. The instructions were followed according to the documentation, but I cannot move forward because it is not allowing me to authorize the Firebase CLI. Does anyone have any insight on the issue? Any help would be very welcome.
1 https://firebase.google.com/codelabs/firebase-web#3
As mentioned in this documentation:
The firebase login command opens a web page that connects to localhost on your machine. If you're using a remote machine and don't have access to localhost, run the command with the flag --no-localhost.
Run the following command in your terminal:
firebase login --no-localhost
Tried the steps in the documentation you provided and I was able to launch the app successfully.

Use fs.unlinkSync with full path to remove file in project, it works on local server, but it gives error(5xx) after deployed to azure web app

I have an app that builds with Vuejs and Nodejs server.
I created a folder called 'uploads' in the project to temporary store all of the files that was uploaded to the server.
When the uploaded action is ready, I have a restAPI to clean the file in folder 'uploads' with the given absolute path. I use fs.unlinkSync to remove the temp file in the rest api.
Everything works perfectly on local, but after I deploy to azure web app, whenever the restapi for removing a file is triggered, it gives me 502 bad gateway error.
I have checked a lot of information, still can not solve this problem. Wonder if anyone have experience with it?
Log from Azure Web App
Failed to forward request to application. Encountered a System.Threading.Tasks.TaskCanceledException exception after 300196.724ms with message: The operation was canceled.. Check application logs to verify the application is properly handling HTTP traffic.
Try to use fs.unlink(path, callback), then you can log more error details in callback function.
Suggestion
You also can use try..catch... to get more exception message. Get error details should be useful to you to solve the problem.
About Log from Azure Web App, I'm not sure how you use it, or use the default. The exception caught by the code may be more helpful to you.
If you use linux platform, you can use remote debugging.
Azure Remote Debugging for Node.js

Where can I see logs or details for error Azure "An error has occurred." for an API call on Azure?

I have an ASP.NET API and works great as local and using Postman.
Then I decided to publish to Azure since I tried on other free host SOMEE and never worked.
Principal API page on Azure works fine but when I tried to call a controller shows the error
{"Message":"An error has occurred."}
and I don't even know where to check more details about this error.
I tried the same on a Somee.com host and same thing happens
Azure portal offer to you some resources to investigate your issue
Log stream (in your App Service page, under Monitoring section), can give you some info of you api call.
Advanced Tools (in your App Service page, under Development Tools), can give you more information of your app settings, deployment info, wwwroot folder, etc...
It can be a deployment issue(related to the app service configuration, maybe you are using a docker container?) or a simple error in your connection string, so review your app service settings:
it's usually one of these(some) problems.
all the best

Deploying asp.net web api to azure app service

Problem: after deploying my asp.net core web api to azure app service I can't get a response from the expected endpoint
Steps followed:
I have an api that works fine when serving from my local machine, developed using Visual Studio Code. (The code for that is here https://github.com/samrae7/blog-api FYI)
I followed the instructions in this video: https://www.youtube.com/watch?v=C8J_CRy2_XA to push the files up to Azure App services. Basically I used the VS Code azure app service extension to create a webapp on azure and push my files.
I can see my files have been pushed to Azure ( by logging in to the portal and looking) but when I navigate to the expected URL of my api, http://sams-blog-api.azurewebsites.net, I get 'site not found'. If I try to send a request to the expected endpoint (I append /api/resource as this is the path of the endpoints on my local machine) I get '404 not found'
So my question is what do I have to do to actually get my api up and running online after pushing the files to azure app service
Thanks
Your website is not accessible due to missing DNS entry. I check it using the mxtool
https://mxtoolbox.com/SuperTool.aspx?action=a%3asams-blog-api.azurewebsites.net&run=toolpage#
Please ensure that your url is correct.
The basic answer to this question was that I had not understood that you have to create a Database in azure for your deployed app to connect to, and you need to set the connection string as an env variable in azure so that it knows where to look, and you should also add code that automatically updates the database on launch.
This tutorial was what helped with that: https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-dotnetcore-sqldb
I then hit another issue where the deployed app was still returning a generic 500 server error. By enabling 'Diagnostic logs' via the azure portal, and downloading the logs, I saw this detailed error: The configuration section 'httpProtocol' cannot be read because it is missing a section declaration referring to a piece of config in my Web.config. I deleted it (I don't need it for now) and that fixed the issue

Failure Deploying Meteorjs app using developer account (not on Galaxy)

After following the Meteorjs instructions and successfully creating an app, the deployment step failed. I am familiar with the developer account and the normal procedure. The Error being provided is stating that I have unauthorized access to Galaxy and that I am attempting to deploy on it (this is the paid cloud service of Meteor released recently and not the testing cloud service of Meteor.com for developers). I am not understanding why this redirection is occurring. It would be helpful to point out the issue. The name of the app being deployed follows the format appname.meteor.com. Please also note that
The developer-account dependency was installed
The app was created through the Meteorjs dashboard
I was also logged in from the console prior to deploying
Thanks in advance
I would like some clarity on the process you're attempting, however meteor killed free hosting in March of 2016 (three months ago at the time of this post).
This post explains the details of MDG cancelling that service.
This means there is no longer a testing cloud service, which seems like what you're attempting to deploy to (can't tell as you've given no specifics on your process), there is only Galaxy.

Resources