Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying of todos example fails #2

Open
mikkom opened this issue Jun 16, 2015 · 1 comment
Open

Deploying of todos example fails #2

mikkom opened this issue Jun 16, 2015 · 1 comment

Comments

@mikkom
Copy link

mikkom commented Jun 16, 2015

Hi,

I tried to follow the instructions at http://www.managingsoftwaredebt.com/2015/03/25/deploying-meteor-apps-to-cloud-foundry/ the best I could, but did not manage to get the todos example running on Cloud Foundry. One thing I needed to change was the command for creating the MongoDB service. I used cf create-service mongolab sandbox todos-mongo since at least the Pivotal CF was not offering a mongodb service.

These are the contents of manifest.yml

---
applications:
- name: meteor-todos
  memory: 512M
  buildpack: https://github.com/csterwa/cf-meteor-buildpack.git
  services:
    - todos-mongo

And here's the tail of log output:

2015-06-16T09:44:27.92+0300 [STG/0] ERR + echo Meteor 1.1.0.2 has been installed in your home directory (/.meteor).
2015-06-16T09:44:27.92+0300 [STG/0] ERR Meteor 1.1.0.2 has been installed in your home directory (
/.meteor).
2015-06-16T09:44:27.92+0300 [STG/0] ERR + readlink /home/vcap/.meteor/meteor
2015-06-16T09:44:27.92+0300 [STG/0] ERR + METEOR_SYMLINK_TARGET=packages/meteor-tool/1.1.3/mt-os.linux.x86_64/meteor
2015-06-16T09:44:27.92+0300 [STG/0] ERR + dirname packages/meteor-tool/1.1.3/mt-os.linux.x86_64/meteor
2015-06-16T09:44:27.92+0300 [STG/0] ERR + METEOR_TOOL_DIRECTORY=packages/meteor-tool/1.1.3/mt-os.linux.x86_64
2015-06-16T09:44:27.92+0300 [STG/0] ERR + LAUNCHER=/home/vcap/.meteor/packages/meteor-tool/1.1.3/mt-os.linux.x86_64/scripts/admin/launch-meteor
2015-06-16T09:44:27.92+0300 [STG/0] ERR + cp /home/vcap/.meteor/packages/meteor-tool/1.1.3/mt-os.linux.x86_64/scripts/admin/launch-meteor /usr/local/bin/meteor
2015-06-16T09:44:27.93+0300 [STG/0] ERR + type sudo
2015-06-16T09:44:27.93+0300 [STG/0] ERR + echo Writing a launcher script to /usr/local/bin/meteor for your convenience.
2015-06-16T09:44:27.93+0300 [STG/0] ERR Writing a launcher script to /usr/local/bin/meteor for your convenience.
2015-06-16T09:44:27.93+0300 [STG/0] ERR + echo This may prompt for your password.
2015-06-16T09:44:27.93+0300 [STG/0] ERR This may prompt for your password.
2015-06-16T09:44:27.93+0300 [STG/0] ERR + [ ! -d /usr/local/bin ]
2015-06-16T09:44:27.93+0300 [STG/0] ERR + sudo cp /home/vcap/.meteor/packages/meteor-tool/1.1.3/mt-os.linux.x86_64/scripts/admin/launch-meteor /usr/local/bin/meteor
2015-06-16T09:44:27.93+0300 [STG/0] ERR sudo: no tty present and no askpass program specified
2015-06-16T09:44:27.94+0300 [STG/0] ERR + cat
2015-06-16T09:44:27.94+0300 [STG/0] ERR Couldn't write the launcher script. Please either:
2015-06-16T09:44:27.94+0300 [STG/0] ERR (1) Run the following as root:
2015-06-16T09:44:27.94+0300 [STG/0] ERR cp "/home/vcap/.meteor/packages/meteor-tool/1.1.3/mt-os.linux.x86_64/scripts/admin/launch-meteor" /usr/bin/meteor
2015-06-16T09:44:27.94+0300 [STG/0] ERR (2) Add "$HOME/.meteor" to your path, or
2015-06-16T09:44:27.94+0300 [STG/0] ERR (3) Rerun this command to try again.
2015-06-16T09:44:27.94+0300 [STG/0] ERR Then to get started, take a look at 'meteor --help' or see the docs at
2015-06-16T09:44:27.94+0300 [STG/0] ERR docs.meteor.com.
2015-06-16T09:44:27.94+0300 [STG/0] ERR + trap - EXIT
2015-06-16T09:44:27.94+0300 [STG/0] OUT -----> Done
2015-06-16T09:44:27.94+0300 [STG/0] OUT -----> Updating PATH with Meteor
2015-06-16T09:44:27.94+0300 [STG/0] OUT -----> Building meteor bundle
2015-06-16T09:44:34.27+0300 [STG/0] ERR Supply the server hostname and port in the --server option for mobile app
2015-06-16T09:44:34.27+0300 [STG/0] ERR builds.
2015-06-16T09:44:34.30+0300 [STG/0] ERR /tmp/buildpacks/cf-meteor-buildpack/bin/compile: line 75: cd: deploy/bundle/programs/server: No such file or directory
2015-06-16T09:44:34.30+0300 [STG/0] OUT -----> Installing npm dependencies
2015-06-16T09:44:34.82+0300 [STG/0] OUT npm ERR! install Couldn't read dependencies
2015-06-16T09:44:34.82+0300 [STG/0] OUT npm ERR! package.json ENOENT, open '/tmp/staged/app/package.json'
2015-06-16T09:44:34.82+0300 [STG/0] OUT npm ERR! package.json This is most likely not a problem with npm itself.
2015-06-16T09:44:34.82+0300 [STG/0] OUT npm ERR! package.json npm can't find a package.json file in your current directory.
2015-06-16T09:44:34.82+0300 [STG/0] OUT npm ERR! System Linux 3.16.0-39-generic
2015-06-16T09:44:34.83+0300 [STG/0] OUT npm ERR! command "/tmp/staged/app/.vendor/node/bin/node" "/tmp/staged/app/.vendor/node/bin/npm" "install"
2015-06-16T09:44:34.83+0300 [STG/0] OUT npm ERR! cwd /tmp/staged/app
2015-06-16T09:44:34.83+0300 [STG/0] OUT npm ERR! node -v v0.10.38
2015-06-16T09:44:34.83+0300 [STG/0] OUT npm ERR! npm -v 1.4.28
2015-06-16T09:44:34.83+0300 [STG/0] OUT npm ERR! path /tmp/staged/app/package.json
2015-06-16T09:44:34.83+0300 [STG/0] OUT npm ERR! code ENOPACKAGEJSON
2015-06-16T09:44:34.83+0300 [STG/0] OUT npm ERR! errno 34
2015-06-16T09:44:34.83+0300 [STG/0] OUT npm ERR!
2015-06-16T09:44:34.83+0300 [STG/0] OUT npm ERR! Additional logging details can be found in:
2015-06-16T09:44:34.83+0300 [STG/0] OUT npm ERR! /tmp/staged/app/npm-debug.log
2015-06-16T09:44:34.83+0300 [STG/0] OUT npm ERR! not ok code 0
2015-06-16T09:44:34.84+0300 [STG/0] OUT -----> Checking for post_compile script
2015-06-16T09:44:41.89+0300 [STG/43] OUT -----> Uploading droplet (90M)
2015-06-16T09:44:51.33+0300 [DEA/43] OUT Starting app instance (index 0) with guid a1f1e0e5-b71c-4940-9391-8eacb12b8627
2015-06-16T09:44:55.85+0300 [App/0] ERR
2015-06-16T09:44:55.85+0300 [App/0] ERR module.js:340
2015-06-16T09:44:55.85+0300 [App/0] ERR throw err;
2015-06-16T09:44:55.85+0300 [App/0] ERR ^
2015-06-16T09:44:55.86+0300 [App/0] ERR Error: Cannot find module '/home/vcap/app/deploy/bundle/main.js'
2015-06-16T09:44:55.86+0300 [App/0] ERR at Function.Module._resolveFilename (module.js:338:15)
2015-06-16T09:44:55.86+0300 [App/0] ERR at Function.Module._load (module.js:280:25)
2015-06-16T09:44:55.86+0300 [App/0] ERR at Function.Module.runMain (module.js:497:10)
2015-06-16T09:44:55.86+0300 [App/0] ERR at startup (node.js:119:16)
2015-06-16T09:44:55.86+0300 [App/0] ERR at node.js:935:3
2015-06-16T09:44:55.86+0300 [App/0] OUT
2015-06-16T09:44:55.94+0300 [DEA/43] ERR Instance (index 0) failed to start accepting connections
2015-06-16T09:44:56.00+0300 [API/0] OUT App instance exited with guid a1f1e0e5-b71c-4940-9391-8eacb12b8627 payload: {"cc_partition"=>"default", "droplet"=>"a1f1e0e5-b71c-4940-9391-8eacb12b8627", "version"=>"9dd1a67e-5c83-49cc-8b5e-cd7a2affb4db", "instance"=>"5e2dda678d034e04afd10e31a434bee5", "index"=>0, "reason"=>"CRASHED", "exit_status"=>8, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1434437095}
2015-06-16T09:44:56.01+0300 [API/0] OUT App instance exited with guid a1f1e0e5-b71c-4940-9391-8eacb12b8627 payload: {"cc_partition"=>"default", "droplet"=>"a1f1e0e5-b71c-4940-9391-8eacb12b8627", "version"=>"9dd1a67e-5c83-49cc-8b5e-cd7a2affb4db", "instance"=>"5e2dda678d034e04afd10e31a434bee5", "index"=>0, "reason"=>"CRASHED", "exit_status"=>8, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1434437095}

Any ideas what's going wrong? I'll be happy to provide you with more information if needed.

@rws-github
Copy link

rws-github commented Jun 14, 2016

We found that we had to increase the size of the disk and file descriptors:

applications:
- name: xxx
  file_descriptors: 99999
  disk_quota: 2000M
  ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants