-
Notifications
You must be signed in to change notification settings - Fork 153
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: EXDEV: cross-device link not permitted, rename #19
Comments
@zachariahtimothy I've just tested a build on docker cloud, and I don't have this issue. @jshimko we can close this since I can't reproduce. |
@keyscores The old "works on my machine" excuse eh? I appreciate you looking into it, but to close this because your totally different environment works is unreasonable. I am not using Docker Cloud or Ubuntu. |
I've been using these build scripts for about 6 months with a bunch of different apps and building them on a variety of platforms (Linux, Mac, Windows, Docker Cloud, Docker Hub, etc). I've never personally had the issue above. Where are you trying to build this image? |
I am just trying to build this image locally on my Macbook Pro. I have docker installed and updated via brew cask.
|
What version of Docker? If it's not at least 1.12.x, I'd start there. Have you tried installing Docker For Mac? That's the officially supported way to install Docker now and I'm pretty sure the VM is significantly different than the old boot2docker VM you'll get with the Homebrew install. |
Also, your exact reproduction steps above don't work without modifications. The package.js in the sample package that gets generated links files that don't exist yet within that package. And that crashes Meteor when you add the package (and obviously the Docker build too). I know you've used actual functioning packages previously, but the details of exact reproductions are important when you're the only one seeing the issue. Nobody else is running your private internal packages, so it's hard to guess at the problem without as much info as possible. So try installing Docker for Mac first. If that still doesn't work, it'd be helpful if you could push up a Github repo that reproduces the problem so other people can clone/test it. Thanks! |
I was able to reproduce this. Sounds like this is likely the explaination... This appears to be because aufs (Docker's default filesystem) will often cause rename(2) to return EXDEV, regardless of apparent aufs device boundaries. From the aufs manual:
And that's unfortunately a little complicated to address because this is Meteor internals using the version of npm/node that is bundled with Meteor. Patching that would require a PR to get accepted or we'd have to use a fork of Meteor (no thanks). So it looks like I need to provide a way to build the container with a pre-built app bundle if we want this fixed right now. That would get around installing Meteor and building the app in the container. One more manual step for the end user, but probably much more stable inside the container since you're just adding prebuilt js files and running vanilla Node. No install/build steps. Let me chew on that for the weekend and get back to you. |
Thank you so much for looking further into this. I am using Docker for Mac Zach Curtis On Sat, Nov 5, 2016 at 8:23 AM, Jeremy Shimko [email protected]
|
I think in meteord this issue is handled by copying the files during the build step, but I'm not 100 percent sure... From https://github.com/abernix/meteord/blob/master/base/scripts/lib/build_app.sh
|
I had similar error. (Windows 10 Home). Try to delete "local" folder. |
Hello @jshimko thanks for this great image, I've decided to use this image on mongoclient since I'm not an expert on docker. And it unfortunately fails on docker hub (however it's working on local builds) with this error. Check here, at the very bottom of page you can see the details. p.s. this is an automated build. Apart from that, as far as I remember on windows if you try to build meteor application placed under D: while you have installed meteor to C: it throws exact same error. Can be related. Thanks in advance |
I copied script files and changed Dockerfile a bit for mongoclient, then somehow it started working |
I am now getting a similar error:
Docker info:
|
Yeah, this problem has been haunting me for months and Docker 1.13 just started causing it to happen every time I build locally on macOS (seems to work fine when on a linux box). I'm fairly certain this is the issue here: And the root cause from Docker: This is the code causing it in Meteor: https://github.com/meteor/meteor/blob/b40df12129fa6b3545f89394723fcf044b47f78d/tools/fs/files.js#L950-L978 I think there's a possibility that using the mv method from fs-extra may fix it (since there's error handling specifically for that error) The only reason I haven't confirmed this yet is because I'm going to have to fork and patch Meteor to test it. I just haven't had the time in the last couple weeks. However, it's officially blocking several projects for me at this point, so I'm bumping it up the priority list. I'll post here and on the Meteor issue with my results. Thanks for taking the time to report your details! |
Well, it took a while, but I finally fixed this. A PR has been submitted to Meteor. And now we wait. |
@jshimko: Awesome, thanks for working on this and submitting the PR to Meteor - hopefully they will merge/release it shortly. I temporarily worked around the problem by forking the repo and appending the following to install-meteor.sh:
Which simply:
This has got the build functioning on my CI server, so your fix looks good to me! |
Ha! Nice. That's probably as hacky as it gets, but whatever works! I have no idea if they're going to even consider merging my fix (still no response to the PR after 4 days). I'm extremely invested in Meteor for a bunch of projects at this point, so I'm not giving up on finding a solution for this. But I also need my builds to work. If I have to, I'll be maintaining a fork of Meteor that has my fix and stays up to date with upstream moving forward. I really only need the changes inside my Docker builds, so nobody has to deal with local installs of the fork. The process can be baked into this base image. Definitely not my ideal workflow, but I haven't come up with a better solution for dealing with the Meteor folks not being willing to merge my fix. I'm certainly open to suggestions if anyone has any better ideas. In the meantime, if my PR would solve problems for anyone reading this, it'd be great if you could take a few mins to mention that over in the PR comments. This bug doesn't appear to be an issue in their build environments, so it doesn't seem to be high priority for them at this point. The original issue that was filed for this was tagged as Thanks! |
My fix was merged over at meteor/meteor#8491 and tagged for the Once Meteor 1.4.4 lands (hopefully soon), this issue should finally be fixed! |
Confirming that after a meteor update to 1.4.4.1 this problem was resolved. Thanks. |
Excellent. Thanks for the update @kokokenada. This appears to finally be fixed by Meteor >= 1.4.4. I'm going to close this issue, but feel free to reopen it if you ever run into the problem again. Thanks for your patience everyone! |
This is not the same error and this issue is closed, so you may want to open a new one to track this problem. It's really easy to miss new comments on a closed issue. |
Thank you for creating this image, I have seen many people recommending it. When I use this image however my build fails, but only when using a local meteor package. It works fine with no local packages, so I am absolutely stumped at what the problem is. I created a dummy meteor app and build the image just fine, then added a dummy package, verified meteor build works, and then it still fails. Following is the full stack trace if it is useful. I do not believe the error is with your image, but I am at my wits end and I appreciate ANY help or suggestions you have.
Thanks in advance!
`
/root/.meteor/packages/ecmascript/.0.5.9.ui3230++os+web.browser+web.cordova/plugin.compile-ecmascript.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:190
throw error;
^
Error: EXDEV: cross-device link not permitted, rename '/opt/meteor/src/.meteor/local/isopacks/pigknows_conversion-collections' -> '/opt/meteor/src/.meteor/local/isopacks/pigknows_conversion-collections-garbage-p6wxcy'
at Error (native)
at Object.fs.renameSync (fs.js:681:18)
at Object.wrapper [as rename] (/tools/fs/files.js:1531:35)
at Object.files.renameDirAlmostAtomically (/tools/fs/files.js:963:11)
at Builder.complete (/tools/isobuild/builder.js:608:13)
at /tools/isobuild/isopack.js:1679:15
at Isopack.saveToPath (/tools/isobuild/isopack.js:1191:9)
at /tools/isobuild/isopack-cache.js:378:23
at /tools/utils/buildmessage.js:359:18
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:352:34
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:350:23
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at Object.enterJob (/tools/utils/buildmessage.js:324:26)
at IsopackCache.loadLocalPackage (/tools/isobuild/isopack-cache.js:315:18)
at /tools/isobuild/isopack-cache.js:249:16
at Function.time (/tools/tool-env/profile.js:305:10)
at /tools/isobuild/isopack-cache.js:248:17
at /tools/utils/buildmessage.js:359:18
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:352:34
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:350:23
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at Object.enterJob (/tools/utils/buildmessage.js:324:26)
at IsopackCache.ensurePackageLoaded (/tools/isobuild/isopack-cache.js:239:20)
at /tools/isobuild/isopack-cache.js:76:14
at /tools/packaging/package-map.js:57:7
at Function..each..forEach (/root/.meteor/packages/meteor-tool/.1.4.2.1r0536n++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:87:22)
at [object Object].eachPackage (/tools/packaging/package-map.js:49:7)
at IsopackCache.buildLocalPackages (/tools/isobuild/isopack-cache.js:75:24)
at /tools/project-context.js:809:25
at /tools/utils/buildmessage.js:359:18
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:352:34
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:350:23
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at Object.enterJob (/tools/utils/buildmessage.js:324:26)
at ProjectContext._buildLocalPackages (/tools/project-context.js:808:18)
at /tools/project-context.js:268:9
at /tools/utils/buildmessage.js:359:18
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:352:34
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:350:23
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at Object.enterJob (/tools/utils/buildmessage.js:324:26)
at ProjectContext._completeStagesThrough (/tools/project-context.js:258:18)
at /tools/project-context.js:250:12
at Function.run (/tools/tool-env/profile.js:490:12)
at ProjectContext.prepareProjectForBuild (/tools/project-context.js:249:13)
at /tools/cli/commands.js:854:20
at /tools/utils/buildmessage.js:271:13
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:264:29
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:262:18
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at /tools/utils/buildmessage.js:253:23
at [object Object].withValue (/tools/utils/fiber-helpers.js:89:14)
at Object.capture (/tools/utils/buildmessage.js:252:19)
at Object.main.captureAndExit (/tools/cli/main.js:273:29)
at buildCommand (/tools/cli/commands.js:853:8)
at Command.func (/tools/cli/commands.js:802:12)
at /tools/cli/main.js:1454:23
`
The text was updated successfully, but these errors were encountered: