How to successfully deploy to bot service through app service local git deploy? - azure

I've developed a simple chatbot based on the sample python bot (24. ms graph auth bot) and was deploying it through the CLI - it worked like a charm. However, the deployment was taking ages (at least 7 minutes per deployment) and I've tried to use other deployment methods because I have to prototype authorization on the Azure side (I'm not allowed to install ngrok...). I've had a few problems with git deployment to Azure App Service but finally it seemed like it started to work, the problem is - once I thought it'll work, instead of errors I'm receiving empty log.
Last line in the botname.scm.azurewebsites.net/api/vfs/LogFiles/date_code_docker.log:
2020-03-03 07:41:41.123 INFO - Container botname_0_letters for site botname initialized successfully and is ready to serve requests.
It usually indicated that everything works correctly. However, there is nothing in the botname.scm.azurewebsites.net/api/vfs/LogFiles/date_code_default_docker.log - as if there was nothing running. Bot service through webchat receives Internal Server Error. When I was debugging it there was data in the default_docker.log with errors about gunicorn app:app, but since I've solved it and container started to be initialized successfully - the default_docker.log doesn't get any new lines, it looks like the app wasn't working.
Any clue what might be a reason of it? Why is the log empty and bot doesn't work? Deployment from .zip file through Azure CLI worked correctly, it has AppID and AppPassword set up (and it worked through the .zip deployment), is there anything I should take care of when deploying from local git which is done automatically when deploying .zip through CLI?

Related

Unable to run the angular application. Getting error No such file exists robots933456.txt

I am running the angular application in Microsoft Teams and deploying it on Azure.
But it's not running up as it is looking for the robots933456.txt route.
It wasn’t the case before today.
Please guide me on how to proceed further.
On running the app the logs shows:
The error was natively on my side nothing to do with the above but pretty much seen and raised by people so thought of sharing below:
After doing some research figured out I can safely ignore this message. /robots933456.txt is a dummy URL
the path that App Service uses to check if the container is capable of serving
requests. A 404 response simply indicates that the path doesn't exist, but
it lets App Service know that the container is healthy and ready to respond
to requests.
https://github.com/MicrosoftDocs/azure-docs/issues/32472

How to update page information of Nodejs app deployed using Heroku free hosting on a daily basis?

I have a nodejs app which needs to fetch some data (download a picture to the server and fetch some related text) from an API once a day at midnight and updates the fields my index.ejs file.
Unfortunately because of restrictions around the free Heroku accounts, my app goes to sleep after 30 minutes of inactivity, so I can't use a cron-job for this.
I tried heroku scheduler, but it doesn't work. I added node server.js as a job, but it doesn't run it. I tried removing the job and adding it again, but it didn't work. My app runs fine in local environment, or when I initially push it to heroku, or when I do heroku run node server.js.
I tried the creating a separate server file with no JS extension and added #!/usr/bin/env node to the but it said "bash command not found" when I tried to heroku run node server.js.
I'm really confused. Any help will be appreciated.
Cheers

Issues with a Node app deployed through elastic beanstalk

I'm deploying a node app to an ec2 instance through aws elastic beanstalk. I set up a cron job with the cron node package that, on tick, will run a sequelize query, parse the data returned, then send it in the body of an email.
When testing locally, it works fine and the email gets sent. When i deploy it using awsebcli command eb deploy, it says the deploy was successful, but I don't receive any emails.
At first I believed the npm start command wasn't working on the server, but I checked the error logs and it appears sequelize is throwing a time out error when trying to connect.
I wrote a configuration for sequelize to connect to multiple schemas at once. Three of those schemas are hosted on the same RDS, one on a seperate RDS.
I've done almost the exact same thing with another node app and it worked fine. The only thing different is the additional schema on a seperate RDS that I'm connecting to fine on my local machine.
Any thoughts or suggestions would be appreciated.
EDIT: Checked server logs and found Sequelize connection error.
Found that the issue was caused by security groups on aws preventing my instance from connecting to one of the DBs it needed.
Edit:
Specifics have been requested. Since this is a very old post and I don't have access to AWS anymore, I can venture a guess on what I did.
If my memory serves correct, the db I was blocked by was hosted in a different aws account. Changing the security group on the DB was not an option as security on that account was firmly maintained. The reason I was able to connect locally was because the facility I was working at had a whitelisted IP on the DB security groups. I eventually settled on running the script on my local machine, since my machine rarely left that location and it did not matter where the script was run, just that it ran periodically. Ideally though, I would have been able to change the security group on the db to allow incoming traffic from my server.

Openshift - Scaling app does not start

I'm using Openshift with nodejs. When I use a single gear, no issue to get my app working but when I use a scaling app, even if the git push command says 'success', the app returns a 503 error.
When I execute rhc tail , my first log output is correctly written.
Do you know how can I figure out what happen?
Thanks.

Pusher keeps giving 401 error on production

I have Pusher integrated into my web app. It's a Java based app running on Windows server 2008. The Pusher Server library is the one available on their website.
I've been using Pusher on my development machine and staging machine with no problem. I only use public channels, and only 2 public channels (an admin channel and an "other user" channel. Everything works as expected when my application is deployed to dev or staging servers.
Errors start occurring when I push to production though. I continually get 401 errors, like Pusher isn't authenticating my credentials. This is despite the fact that the credentials between dev/staging/prod are exactly the same, and the code is unchanged.
Am I missing some setting? Firewall setting? Is Pusher caching some information I don't know about? I'm at a loss about where the problem could lie.
To prove the error is specifically on the production server only, I can log in as an "other user" against the production machine (loading the Pusher client code), then fire an event as an admin on my development machine (loading the Pusher server code) and it works. When I fire the same admin event from my production machine, that's when the 401 errors occur.
Server returned HTTP response code: 401 for URL: http://api.pusherapp.com/apps/....
Found this after digging around a while. My system time was off by an hour on the production server, which gave the error from Pusher, and explains why it worked fine on dev and staging but failed on production with exactly the same code.

Resources