Heroku process not starting after deploying it - heroku

I'm pretty new to Heroku and I tried three times to deploy my code on it without success. I'm following this tutorial and I get stuck when it asks me to do heroku ps:scale web=1 on which I receive Scaling web processes... ! Resource not found. This sounds not really correct. All the previous steps seems working correctly. Here is the logs of the command git push heroku master:
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 279 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Node.js app detected
-----> Resolving engine versions
Using Node.js version: 0.4.7
Using npm version: 1.0.106
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
npm WARN nodeunit#0.5.1 package.json: bugs['web'] should probably be bugs['url']
> mongodb#0.9.7-3-5 install /tmp/build_2xv21ycwhho11/node_modules/mongodb
> node install.js
================================================================================
= =
= To install with C++ bson parser do <npm install mongodb --mongodb:native> =
= =
================================================================================
mongodb#0.9.7-3-5 ./node_modules/mongodb
> mongodb#0.9.7-3-5 install /tmp/build_2xv21ycwhho11/node_modules/mongodb
> node install.js
================================================================================
= =
= To install with C++ bson parser do <npm install mongodb --mongodb:native> =
= =
================================================================================
xmlhttprequest#1.3.0 /tmp/build_2xv21ycwhho11/node_modules/xmlhttprequest
redis#0.6.0 /tmp/build_2xv21ycwhho11/node_modules/redis
mongoose#2.5.5 /tmp/build_2xv21ycwhho11/node_modules/mongoose
mongodb#0.9.7-3-5 /tmp/build_2xv21ycwhho11/node_modules/mongodb
juggernaut#2.0.5 /tmp/build_2xv21ycwhho11/node_modules/juggernaut
socket.io#0.6.18 /tmp/build_2xv21ycwhho11/node_modules/juggernaut/node_modules/socket.io
redis#0.5.11 /tmp/build_2xv21ycwhho11/node_modules/juggernaut/node_modules/redis
node-static-maccman#0.5.3 /tmp/build_2xv21ycwhho11/node_modules/juggernaut/node_modules/node-static-maccman
optimist#0.1.9 /tmp/build_2xv21ycwhho11/node_modules/juggernaut/node_modules/optimist
jquery#1.6.3 /tmp/build_2xv21ycwhho11/node_modules/jquery
jsdom#0.2.13 /tmp/build_2xv21ycwhho11/node_modules/jquery/node_modules/jsdom
htmlparser#1.7.4 /tmp/build_2xv21ycwhho11/node_modules/jquery/node_modules/htmlparser
jade#0.20.1 /tmp/build_2xv21ycwhho11/node_modules/jade
html2jade#0.1.16 /tmp/build_2xv21ycwhho11/node_modules/html2jade
express#2.3.4 /tmp/build_2xv21ycwhho11/node_modules/express
connect#1.4.1 /tmp/build_2xv21ycwhho11/node_modules/express/node_modules/connect
qs#0.1.0 /tmp/build_2xv21ycwhho11/node_modules/express/node_modules/qs
mime#1.2.2 /tmp/build_2xv21ycwhho11/node_modules/express/node_modules/mime
ejs#0.4.2 /tmp/build_2xv21ycwhho11/node_modules/ejs
connect#1.8.5 /tmp/build_2xv21ycwhho11/node_modules/connect
qs#0.4.1 /tmp/build_2xv21ycwhho11/node_modules/connect/node_modules/qs
mime#1.2.4 /tmp/build_2xv21ycwhho11/node_modules/connect/node_modules/mime
formidable#1.0.8 /tmp/build_2xv21ycwhho11/node_modules/connect/node_modules/formidable
Dependencies installed
-----> Discovering process types
Procfile declares types -> (none)
-----> Compiled slug size is 7.0MB
-----> Launching... done, v4
http://stark-winter-4562.herokuapp.com deployed to Heroku
To git#heroku.com:stark-winter-4562.git
43e3a5e..84f9cd8 master -> master
I don't know if this can be of any help, but I guess this output is pretty different from the one seen in the tutorial, just in case.
Can anyone point out what's wrong, or what am I doing wrong? Thanks.

Your procfile needs to be called Procfile with a capitalised P

Related

Error: Git "Error deploying the application"

I'm using Git to mount an app to Scalingo, but when I do "git push scalingo master" it shows me this:
XXXXX+AAAA#AAAA MINGW32 ~/Desktop/Scalingo (master)
$ git push scalingo master
Counting objects: 1120, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1043/1043), done.
Writing objects: 100% (1120/1120), 16.71 MiB | 1.53 MiB/s, done.
Total 1120 (delta 208), reused 0 (delta 0)
<-- Start deployment of vinumtest -->
Fetching source code
Fetching deployment cache
-----> Installing requirements with pip
You must give at least one requirement to install (see "pip help
install")
Build complete, shipping your container...
Waiting for your application to boot...
! Error deploying the application
! → Your application has stopped unexpectedly when starting
! Read the output and fix your code accordingly
! Common errors: http://doc.scalingo.com/deployment/start-
error#crashed
! Need help? Email us: support#scalingo.com
To git#scalingo.com:test.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#scalingo.com:test.git'
The actual result is that I cant do the command "git push scalingo master"
As the message in the deployment is telling you:
You must give at least one requirement to install (see "pip help install")
It seems that your requirements.txt does not contain any dependency. All the Python modules you're using should be listed in this file.
What kind of application are you trying to deploy?
Whatever is the app, you have to ensure that your application is working on your local workstation before deploying it.
Regards,
-- Léo

DialogFlow app does not get deployed in Heroku

I have no experience whatsoever with using dialog flow so I'm trying to follow this youtube tutorial
to make a bot. Now, the bot works well when I tested it on the DialogFlow console, but it doesn't get deployed on Heroku. Whenever I try to open the url where the app's supposed to be deployed in, I keep on getting "Internal server error" (this used to be {"speech":"","displayText":"","source":"webhook"} before I applied this). It says "Failed to load resource: the server responded with a status of 500 (Internal Server Error)" in the console.
I tried following the docs here but I used Heroku instead of Google Platform and I'm not sure if I'm doing things right.
This is the current build log I got from the latest build:
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): 4.1.1
engines.npm (package.json): unspecified (use default)
Resolving node version 4.1.1...
Downloading and installing node 4.1.1...
Using default npm version: 2.14.4
-----> Restoring cache
Skipping cache restore (not-found)
-----> Building dependencies
Prebuild detected (node_modules already exists)
Rebuilding any native modules
ejs#2.5.7 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/ejs
express#4.16.2 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/express
accepts#1.3.4 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/accepts
mime-types#2.1.17 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/mime-types
mime-db#1.30.0 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/mime-db
negotiator#0.6.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/negotiator
array-flatten#1.1.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/array-flatten
body-parser#1.18.2 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/body-parser
bytes#3.0.0 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/bytes
content-type#1.0.4 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/content-type
debug#2.6.9 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/debug
ms#2.0.0 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/ms
depd#1.1.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/depd
http-errors#1.6.2 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/http-errors
inherits#2.0.3 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/inherits
setprototypeof#1.0.3 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/http-errors/node_modules/setprototypeof
statuses#1.3.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/statuses
iconv-lite#0.4.19 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/iconv-lite
on-finished#2.3.0 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/on-finished
ee-first#1.1.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/ee-first
qs#6.5.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/qs
raw-body#2.3.2 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/raw-body
unpipe#1.0.0 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/unpipe
type-is#1.6.15 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/type-is
media-typer#0.3.0 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/media-typer
content-disposition#0.5.2 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/content-disposition
cookie#0.3.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/cookie
cookie-signature#1.0.6 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/cookie-signature
encodeurl#1.0.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/encodeurl
escape-html#1.0.3 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/escape-html
etag#1.8.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/etag
finalhandler#1.1.0 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/finalhandler
parseurl#1.3.2 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/parseurl
fresh#0.5.2 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/fresh
merge-descriptors#1.0.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/merge-descriptors
methods#1.1.2 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/methods
path-to-regexp#0.1.7 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/path-to-regexp
proxy-addr#2.0.2 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/proxy-addr
forwarded#0.1.2 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/forwarded
ipaddr.js#1.5.2 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/ipaddr.js
range-parser#1.2.0 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/range-parser
safe-buffer#5.1.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/safe-buffer
send#0.16.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/send
destroy#1.0.4 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/destroy
mime#1.4.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/mime
serve-static#1.13.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/serve-static
setprototypeof#1.1.0 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/setprototypeof
utils-merge#1.0.1 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/utils-merge
vary#1.1.2 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/vary
node-env-file#0.1.8 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/node-env-file
js#0.1.0 /tmp/build_07222934258aa157e39d784f7e60dd1c/digracesion-make-sandwich-9119d54/node_modules/js
Installing any new modules (package.json)
-----> Caching build
Clearing previous node cache
Saving 2 cacheDirectories (default):
- node_modules
- bower_components (nothing to cache)
-----> Build succeeded!
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 11.5M
-----> Launching...
Released v3
https://make-sandwich.herokuapp.com/ deployed to Heroku
Please help me fix this error. I've posted the code here.
additionally, i've tried deploying the app on localhost and i keep getting this error:
Error: Cannot find module 'js'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at new View (C:\Users\EtoNalangGamitinMo\Downloads\make-sandwich-master\make-sandwich-master\node_modules\express\lib\view.js:81:14)
at Function.render (C:\Users\EtoNalangGamitinMo\Downloads\make-sandwich-master\make-sandwich-master\node_modules\express\lib\application.js:570:12)
at ServerResponse.render (C:\Users\EtoNalangGamitinMo\Downloads\make-sandwich-master\make-sandwich-master\node_modules\express\lib\response.js:1008:7)
at C:\Users\EtoNalangGamitinMo\Downloads\make-sandwich-master\make-sandwich-master\index.js:22:11
at Layer.handle [as handle_request] (C:\Users\EtoNalangGamitinMo\Downloads\make-sandwich-master\make-sandwich-master\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Users\EtoNalangGamitinMo\Downloads\make-sandwich-master\make-sandwich-master\node_modules\express\lib\router\route.js:137:13)
The problem is that the directions at https://dialogflow.com/docs/getting-started/basic-fulfillment-conversation assume you're using Google's Cloud Functions (GCF). GCF makes it simple to deploy node.js functions without some boilerplate code required to attach those functions to an HTTP endpoint.
Heroku, however, needs to have those endpoints explicitly setup. GCF expects an express-like environment, which is one that Heroku also supports. Based on the barebones Heroku example at https://github.com/heroku/node-js-getting-started/blob/master/index.js, you might need to add lines such as this (which I haven't tested) to invoke your makeSandwich function:
const express = require('express')
const PORT = process.env.PORT || 5000
express()
.use(express.static(path.join(__dirname, 'public')))
.get('/', (req, res) => exports.makeSandwich( req, res ))
.listen(PORT, () => console.log(`Listening on ${ PORT }`));
You'll also need to adjust your package.json to make sure it includes the express package.

Revel app with local packages in heroku

I am trying to deploy a revel app in heroku, in which I have this folder structure:
+Base
+app
+controllers
-app.go
+views
+models
-user.go
+routes
+conf
+public
+test
.godir
In app.go I try to include models and routes doing this:
import("base/app/models")
I am able to run app in local, and after I can use models.User. I had tried to make a lot of ways to import these local packages in heroku:
import("../models")
import("../models/user")
import("./app/models")
import("./base/app/models")
I don't remember now all attempts, but I am trying it for a long time and I don't know ho to do.
I am using locally go 1.6, and 1.4 when I push. And this is the trace that appears when I run git push heroku master
Counting objects: 93, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (86/86), done.
Writing objects: 100% (93/93), 11.68 KiB | 0 bytes/s, done.
Total 93 (delta 50), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Revel app detected
remote: -----> Using go1.4
remote: -----> Running: go get -tags heroku ./...
remote: can't load package: /tmp/build_02574263f0810eec437968b2e73f635d/.go/src/base/app/controllers/gorp.go:10:2: local import "../models" in non-local package
remote: ! Push rejected, failed to compile Revel app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to ndc-console.
remote:
To https://git.heroku.com/ndc-console.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/ndc-console.git'
It happens using import("base/app/models").
Any solution?? Thank you.
EDIT
I log into heroku bash (running heroku run bash) and I see the folder structure, and it is something like:
bin
dev
more...
app /*This is the base folder*/
app
controllers
views
models
routes
config
public
.go /*this is the GOPATH*/
src
github.com
golang.org
gopkg.in
base-test /* This name is because I change the original name, from base-test to base... */
/* IS IT IMPORTANT? */
/* Inside this folder the app is duplicated */
In this way I tried too import("base-test/app/models") and too including all path from root (trying absurd things).
I hope it helps to find a solution. Thanks.
Ok!!! done!!
Finally, the old name of the project was generating a problem. It seems that when I change the name of the heroku app, heroku doesn't change the name of the folder when it will be compiled... AND I need change too the content of the .godir file and set it as base-test (the old name).
So now the imports I have looks like: import("base-test/app/models").
Thank you everyone.

cant git push heroku master - buildpacks

well simply this is what i am getting;
sa#sa-VPCW11S1E:/opt/hubot/bin$ heroku buildpacks
=== young-everglades-12415 Buildpack URL
heroku/java
sa#sa-VPCW11S1E:/opt/hubot/bin$ sudo git push heroku master
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 2.14 KiB | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Failed to detect set buildpack https://codon- buildpacks.s3.amazonaws.com/buildpacks/heroku/java.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to young-everglades-12415.
remote:
To https://git.heroku.com/young-everglades-12415.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/young- everglades-12415.git'
sa#sa-VPCW11S1E:/opt/hubot/bin$
although i did set a buildpack on the app git push failed because no buildpack detected ?
How can i resolve this, and is it actually the right steps towards deploying hubot ?
The heroku build packs still use the detection script to identify the language in use. Since Hubot is not a java project and it looks like you are using the java build pack, I suspect the detection script failed.
To fix this, try removing the buildpack.
% heroku buildpacks:remove heroku/java
After this I would try,
% git push heroku master
(Optional) I believe the rediscloud addon is needed for some scripts. You can add it with,
% heroku addons:create rediscloud
Then watch the logs heroku logs and see what happens.
There is a good deployment guide in hubot/deploying/heroku.md

"Push rejected, failed to compile Multipack app" when deploying heroku-buildpack-nodejs and heroku-buildpack-ruby-minimal

I'm using heroku-buildpack-multi:
BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
I'm trying to deploy with two buildpacks and am getting the following error:
Fetching repository, done.
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 325 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-nodejs.git
! Push rejected, failed to compile Multipack app
Here are the contents of my .buildpack
https://github.com/heroku/heroku-buildpack-nodejs.git
https://github.com/dpiddy/heroku-buildpack-ruby-minimal.git
It used to be intermittent but it's now happening every time I try to deploy.
Strangely enough, the official heroku ruby project seems to have gone missing...
https://github.com/heroku/heroku-buildpack-ruby
Note that it is still on this page: https://github.com/heroku
You need a package.json for the node buildpack. So, something like:
{
"private": true,
"name": "my-rad-proj",
"version": "0.1.0",
"engines": {
"node": "~0.10.21"
}
}
As well as the Gemfile for ruby.

Resources