Django + React App in Azure gives a server error - 500 everytime - django

I have deployed a Django app to Azure through Github actions to Azure app service. But it gives a Server error 500 everytime. I have configured the static files and react template properly. In the Diagnose tab there's no error is displaying. How can I troubleshoot and find the error or Is there any other things to configure in Azure? I hosted a same copy in Heroku and it works there.

Make sure you are using the below steps:
SCM_DO_BUILD_DURING_DEPLOYMENT=true – With this setting set to true - Kudu will execute build steps on your site during deployment.
DEBUG = 0 - please check (if this can make any change) after adding this config to your configuration.
You need to enable the Detailed error pages in your portal. This may give a detailed log to know why it happened.
Try Adding Application Insights to your App to check the detailed logs
Best practices to deploy your Application
Refer here Link 1 & Link 2

Related

Django Project is not hosting in Cpanel

Problem occuring
My Django project is not hosting on cpanel. I have created 2 app in my django project(Affiliate, members). app and project file
This message is showing in my domain when I hosted :
We're sorry, but something went wrong.
The issue has been logged for investigation. Please try again later.
Technical details for the administrator of this website:
Error ID:
9d01091b
Details:
Web application could not be started by the Phusion Passenger application server.
Please read the Passenger log file (search for the Error ID) to find the details of the error.
You can also get a detailed report to appear directly on this page, but for security reasons it is only provided if Phusion Passenger is run with environment set to development and/or with the friendly error pages option set to on.
For more information about configuring environment and friendly error pages, see:
Nginx integration mode
Apache integration mode
Standalone mode
Standart hosting providers doesn't support python or django. You should use ssh and manual installation.

Ionic AWS Error

I am attempting to connect my Ionic mobile app to AWS backend and keep getting the same error.
Cannot find module "../aws-exports"
I've checked the node-modules folder and this is missing, but I have no idea what I should put here to fix this error.
The same code is in a lot of files in this app.
const aws_exports = require('../aws-exports').default;
I'm not sure what this code does exactly. If anyone has an experience with Ionic that could help that would be great.
Thanks,
Matthew.
You need to follow the steps in the README. Specifically, the section on Creating AWS Mobile Hub Project. When you init the AWSMobile project, aws-imports is created for you.
P.S. aws-amplify has introduced some changes in the last couple of weeks that cause the ionic starter to not work. Follow these steps to fix the errors.
If you sign into your Amazon console and you go to your Mobile Hub.
https://console.aws.amazon.com/mobilehub/home#/
You can click on your project and it will return the ID in the URL as follows:
https://console.aws.amazon.com/mobilehub/home#/YOUR_ID_HERE/build
You can then run the following command:
awsmobile init <mobile-hub-project-id>
The AWS Mobile Hub scripts should then fetch all relative dependencies and make the appropriate installations to rectify the issue.

trying to setup TinyWebDB on google cloud, but deploy not working

I am trying to follow the instructions on this page, and they are working great, until the part where I deploy from my Google App Engine Launcher. When I click deploy I should see something like this:
But instead, I see something like this:
and the end result is that my app doesn't get deployed to xxxxxxx.appspot.com, it redirects me to http://localhost:8080/?code=4/EfmizPdAPVDgoSInA8mS1KVOvQTkWX4ziFnEpG3XKxA#
I'm a begginer with this kind of tech, please, any suggestions on how to troubleshoot?
Found the answer here. In my case, what worked was to first disable the app in the App Engine Launcher, and only then hit deploy. First time I tried, it authenticated, then second time I deployed, it deployed successfully. Thanks Arnie.
In case, I post his other suggestions:
1) remember to give your google id access to less secure apps.
2) remember to go to appspot.com or https://appengine.google.com/ and accept terms and conditions. Your project should also be active on https://console.developers.google.com/project
3) use correct versions of python and google app engine SDK
4) Before hitting deploy button on google app engine stop the app from running on your local host. It will NOT deploy while it is running locally on local host.

Rest Web Service,

i am approaching the development of Restful web services for the first time. I tried to follow this guide for Netbeans . I am stuck at the testing of the web service.
When i open the
http://localhost:8080/WebServicesTest/test-resbeans.html
page, none of the root resources appears in the left menu. (there should be entities.customer and entities.discountcode)
I really can't find a solution.
Thanks in advance to anyone who likes to give me a hint.
--------------- Edit
If i click on CustomerDB --> Deploy i get an error
In-place deployment at C:\Users\utente\Documents\NetBeansProjects\CustomerDB\build\web
GlassFish Server 4, deploy, null, false
C:\Users\utente\Documents\NetBeansProjects\CustomerDB\nbproject\build-impl.xml:1071:
The module has not been deployed.
See the server log for details.
The line 1071 of build-impl.xml is
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
I checked out the referenced tutorial.
Which exact path did you follow? Did you change anything?
Most likely your CustomerDB application is not deployed correctly (see GlassFish Server output in NetBeans) and thus is not able to expose the web service and thus is not displayed in the test page (nothing visible in the side bar).
I tried the tutorial myself and had that phenomenon when using another database ("test" instead of the sample db, which was not connectable in my installed environment), resulting in a message that "test__pm" resource was not found. I then created a conection pool and a jdbc reosurce for test and then it worked.

Django application deployment problem and error logs

I am trying to deploy my django application to VPS but I get 505- Internal Server Error and it is normal for the first time.
However, the admin of the VPS server do not allow me to see the error logs of the Apache Server. In such situation, is there any way to view the real error messagges/logs ?
Thanks
If you deployed your app with DEBUG=True maybe the error message can help you.
Your vps admin should give to you at least a copy of your log files.. i don't see another way..