How can I debug my failed deployment on Heroku? - heroku

Trying to deploy a Node app and usually have no issues at all. Now I'm having TypeScript resolution errors that only fail on Heroku but work locally and I have no idea how to test it ON Heroku.
I know I can do heroku run bash but then I'm just in an empty directory without my code.
I'd like to heroku run bash after the failed build and look around and run my commands as Heroku would so I can see why I'm having module resolution errors.
Can't find anything about it on Google whatsoever

Related

Heroku deployment error via codeship

I want to deploy django app to heroku via codeship and it generate an error and that is wget -O/dev/null http://something.herokuapp.com
How to fix the problem
Marko from the Codeship team here. Could you paste some more log output, or open a ticket on https://helpdesk.codeship.com?
Judging from the command you pasted above, I'd guess the check if the Heroku app, that you just deployed to, is running fails and this causes the build itself to fail.
Without any additional configuration we check the root URL for your application at http://HEROKU_APP_NAME.herokuapp.com via wget and see if it returns an HTTP/2xx or HTTP/3xx status code.
If it does, the check succeeds, else the build fails.
You can take a look at the script we use to perform the check at https://github.com/codeship/scripts/blob/master/utilities/check_url.sh

Parse Dashboard - works locally, blank on Heroku

I am running Parse dashboard locally - works fine
Deployed to Heroku (see references below) - it runs but does now load anything (blank screen). No errors in the log - app is up and running.
I have tried to deploy based on the following links:
Stackoverflow
Codementor
The issues came down to the bundles/ directory not being pushed correctly to git (and thus Heroku).
Make sure you run 'npm install' on your local directory
Make sure you add/commit the entire directory to git.

Have Heroku App Restart it self from Heroku

So, if I run the command heroku ps:restart event_machine.1 --app app-name I get what I want. However, I'm trying to automate our travis-ci deploy process. What needs to happen is the following:
We have a successful test run.
Next, we deploy the code
If we deploy the code successfully, we need to execute a few rake tasks that tell an external service to rebuild it self.
Once this is fired off, we need to restart the heroku app. In travis, ideally, this would be executed on the heroku machine via a deploy run command. This would be done in much the same way that we run bundle exec db:migrate.
Does anyone have any thoughts on how we we can restart a particular dyno(s) via a command that can be ran via heroku run something as that is what travis is executing in the deploy run.
So, to answer this we had a procfile that is executing a rake command to spin up event machine. We've modified this at the proc file level to first tell the external service to rebuild it self, before starting the event machine. This takes travis completely out of the deployment loop, which is better because it allows Heroku and Travis to each do what they should be responsible for.

Edit files on Heroku

I'm stuck at this simple task.
I have some configuration files that should be ignored by Git. But after commit to Heroku, I always get Application Error.
If I ignore those files then I have no way to get around the situation, but adding them to Git is definitely not a good idea.
Is there any way to ssh into Heroku server, I found no instructions on Heroku?
You can run a bash shell for your heroku app by doing this. Note that it will spin up another dyno, which will shut down when you exit the shell:
heroku run bash

Why cant I run my rails app using heroku locally?

I am working on a new project that is using heroku, I get this error when I try to run the app locally:
Moped::Errors::ConnectionFailure at / Could not connect to any secondary or primary nodes for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address="127.0.0.1:27017">]>
and I think it has something to do with Heroku because if I type
$ heroku info,
i get this error:
! You do not have access to the app disrupt.
I can't find this error anywhere on the internet, on any forums and there is nothing in the Heroku documentation.
The error normally just means that the MongoDB server is not running locally. Try starting it up by running mongod. Otherwise check you mongoid.yml to see how the development and test environments are set up to connect to MongoDB.
The other error that you get from heroku looks like a separate issue. As tolgap suggests you may just not be authenticated with heroku.

Resources