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

Error since 1.3 release #20

Open
sungwoncho opened this issue Mar 29, 2016 · 25 comments
Open

Error since 1.3 release #20

sungwoncho opened this issue Mar 29, 2016 · 25 comments

Comments

@sungwoncho
Copy link

Since 1.3 release, I get

line 75: cd: deploy/bundle/programs/server: No such file or directory

I think this line did not do its job.

I have been deploying fine until 1.3 release. The buildpack installs Meteor 1.3 now because the install script was updated. My app is using 1.2.1.

@djules75
Copy link

Same issue here.

@djules75
Copy link

Full error:

-----> Building meteor bundle
/home/vcap/.meteor/packages/meteor-tool/.1.3.0_3.fc5itk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:116
      throw error;
            ^
Error: ENOSPC, open '/home/vcap/.meteor/packages/meteor-tool/.build471771..1.1.10.ypfzk5++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-babel/node_modules/lodash/internal/baseFindIndex.js'
/tmp/buildpacks/cf-meteor-buildpack/bin/compile: line 75: cd: deploy/bundle/programs/server: No such file or directory

@snajjar
Copy link

snajjar commented Mar 29, 2016

+1

@globalise1
Copy link

Same here. My app is built in 1.2.1.

@snajjar
Copy link

snajjar commented Mar 29, 2016

I'm no longer seeing this error (after updating my project to meteor 1.3).

Now i see a staging error happening during the "meteor build" command:

ERR encountered error: Staging error: failed to stage application:
ERR Script exited with status 255

It's happening 9 times out of 10. Any idea guys?

@maresk
Copy link

maresk commented Mar 30, 2016

Same here, App was built in 1.2.1, I did not update to 1.3 but now on deployment it shows the following error everytime

-----> Updating PATH with Meteor -----> Building meteor bundle /home/vcap/.meteor/packages/meteor-tool/.1.3.0_3.fc5itk++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:116 throw error; ^ Error: ENOSPC, open '/home/vcap/.meteor/packages/meteor-tool/.build475703..1.1.10.1vbmylf++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/mkdirp/node_modules/minimist/test/long.js' /tmp/buildpacks/cf-meteor-buildpack/bin/compile: line 75: cd: deploy/bundle/programs/server: No such file or directory

@globalise1
Copy link

OK, so I have found a very hacky solution to this. The problem is that the Meteor install script has as a parameter "1.3". I simply copied the Meteor script from https://install.meteor.com/ into a new file hosted on Dropbox, and replaced the line 131, "TARBALL_URL = ..." with:

TARBALL_URL="https://d3sqy0vbqsdhku.cloudfront.net/packages-bootstrap/1.2.1/meteor-bootstrap-os.linux.x86_64.tar.gz"

This ignores the parameter "1.3" and downloads the previous version of Meteor when the script is run. I assumed IBM Bluemix is running Linux, so I used the linux.x86_64 parameter and it worked.

I then forked the cf-meteor-buildpack repository and replaced the curl https://install.meteor.com/ instruction with a curl request to my dropbox file containing the amended Meteor install script.

Finally, I run the cf push command referencing my fork of the buildpack rather than this one.

Result: my app is back up and running on Bluemix in 1.2.1.

I am new to Github, so please tell me how to make the amended Meteor install .sh file available on Github in a way that it can be called using curl, and I will do so. You guys can then inspect and use it if you want.

@globalise1
Copy link

OK, I have figured out how to get a Github file via curl!

I have created a Git repository for the amended Meteor install script here:

https://github.com/globalise1/meteor_install_1.2.1.git

I have also amended my fork of the cf-meteor-buildpack to reference the file on Github. Everything is now available for inspection.

https://github.com/globalise1/cf-meteor-buildpack

Hope this is useful to you.

PLEASE INSPECT ALL SCRIPTS CAREFULLY BEFORE USING THEM. I ACCEPT NO RESPONSIBILITY FOR ANY PROBLEMS THAT MIGHT OCCUR ON YOUR MACHINES.

@tab00
Copy link

tab00 commented Mar 31, 2016

I'm getting the "ENOSPC" error too. It means no space left. Because of this error, the directory deploy/bundle/programs/server does not get created, causing the subsequent error "No such file or directory".

Is there a space quota on IBM Bluemix?

The error may also mean that the maximum limit of files watchable by the system has been reached. This limit can be changed, but the commands require sudo. e.g. see http://stackoverflow.com/questions/22475849/node-js-error-enospc

I've also found that npm install 2>&1 | indent needs to also run before cd deploy/bundle/programs/server so that your app's npm dependencies are also installed. the original npm install just installs the npm dependencies of Meteor (e.g. fibers). So npm install needs to be called twice.

When I test deploy with a small app, there are no errors. But for an app with many packages the "ENOSPC" error is thrown.

Has anyone found a proper solution to the problem?

I've found that you can change the install script URL to https://install.meteor.com?release=1.2.1 to force installation of Meteor 1.2.1, but it is not a proper solution.

@snajjar
Copy link

snajjar commented Apr 3, 2016

@jsloyer: is this project still maintained?

@tab00
Copy link

tab00 commented Apr 5, 2016

Is there a way to increase max_user_watches? I think it's hitting the limit, causing the ENOSPC error.

@snajjar
Copy link

snajjar commented Apr 7, 2016

I have tested to increase the app disk space & memory when pushing with
cf push $application_name -m 2G -k 2G -b $buildpack_url

Then i scale it down afterwhile with:
cf scale $application_name -m 1G -k 1G

The build seems to behave better, i'm not seeing the "script exited with error 255" anymore, but i'm still seeing the ENOSPC error from time to time.

I'll try with more disk and report results here.

@snajjar
Copy link

snajjar commented Apr 7, 2016

Edit: no need for more disk, after updating meteor to 1.3.1, it worked for me.

@tab00
Copy link

tab00 commented Apr 8, 2016

Try to deploy Meteor's official production-ready example app: https://github.com/meteor/todos
Before deploying, upgrade it to version 1.3.1.
Let us know if it works.

@gilad-xtify
Copy link

Actually, upgrading to version 1.3.1 fixed the problem for me.
I had to remove reference to faker in todos.js then I was able to successfully start the app

@arypbatista
Copy link

Same here, 1.3.1 fixed the issue.

@tab00
Copy link

tab00 commented Apr 11, 2016

You shouldn't remove the reference to faker. You should do npm install to install faker.

@ManuelEPayano
Copy link

I am working on 1.3.1 and still encounter the issue. Even after trying https://github.com/martintreurnicht/cf-meteor-buildpack.git.

@arsen3d
Copy link

arsen3d commented May 16, 2016

Attempt to increment maximum for files watched,

'
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
'
use a different location for temp directory,
mkdir ~/deploy meteor build --server http://localhost:3000 --server-only --allow-incompatible-update --directory ~/deploy
mv ~/deploy deploy
cd deploy/bundle/programs/server

use npm dedupe to reduce number of files,
'
npm dedupe

'
trying to use sudo during build to see if having root access would avoid the file count limit.
'
sudo meteor build --server http://localhost:3000 --server-only --allow-incompatible-update --directory ~/deploy
'
Nothing worked still get the
'throw error;
^
Error: ENOSPC, open
'

Is it up to CloudFoundry/BlueMix/IBM to fix it on their end?

@tab00
Copy link

tab00 commented May 16, 2016

Is it up to CloudFoundry/BlueMix/IBM to fix it on their end?

I think IBM should be the leader and actively maintain this (or a new) repository as it would be in their own financial interest if more customers use their hosting service. They should make it easy to deploy a Meteor app to their cloud.

@tab00
Copy link

tab00 commented May 19, 2016

This buildpack as it stands is now obsolete and should not be used. The main reason is that it does not install a Meteor app's npm dependencies. It needs to do npm install for the app. It should also do npm config set production beforehand so that an app's devDependencies (which are not required for production use) if there are any, do not get installed. devDependencies are specified in package.json and are automatically added into package.json when you run npm install --save-dev package.

Meteor's official Todos app has eslint in the devDependencies and doing an ordinary npm install creates over 17,000 files, which is why it fails to deploy in the IBM Bluemix environment. You need to do npm config set production as I've mentioned above to avoid the installation of eslint. The app will then deploy successfully. I have had success doing so with a fork and modification of this buildpack: https://github.com/AdmitHub/meteor-buildpack-horse

@arsen3d
Copy link

arsen3d commented Jun 5, 2016

https://github.com/AdmitHub/meteor-buildpack-horse did not work for me. Same error. If anyone gets current version of todos to work on bluemix, let me know.

@tab00
Copy link

tab00 commented Jun 9, 2016

https://github.com/AdmitHub/meteor-buildpack-horse works fine with Bluemix now even without a fork and modification after AdmitHub/meteor-buildpack-horse#103.

Make sure to use the latest version of Cloud Foundry too.

@mckaymic mckaymic mentioned this issue Jun 15, 2016
@rcruicks
Copy link

using meteor-buildpack-horse, had success with meteor 1.3.5 deployment using mlabs sandbox mongodb account (takes a loong time in the "Bundling bundle" section)
1.3.5.1 fails with eventual timeout
tried cf-meteor-buildpack -- not luck with 1.3.5, or 1.4

@tab00
Copy link

tab00 commented Jul 29, 2016

The ENOSPC error on Bluemix eventually came back to haunt me as my app grew. So I've been doing the build locally instead before deployment.

There is a new majorly refactored version of meteor-buildpack-horse coming out: AdmitHub/meteor-buildpack-horse#130

Maybe it could fix the problems.

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