Invalid group error #235

Closed
KendallPark opened this Issue Apr 10, 2013 · 22 comments

Projects

None yet
@KendallPark
Error: Invalid group: 10000
Error: /Stage[main]/Nvm/File[/opt/boxen/bin/node-waf]/ensure: change from absent to link failed: Invalid group: 10000
Error: Invalid group: 10000
Error: /Stage[main]/Nvm/File[/opt/boxen/bin/npm]/ensure: change from absent to link failed: Invalid group: 10000

Homebrew just updated ~2 hours ago and I've started getting this error while running boxen. Is this related to #172 ?

More errors:

Error: Invalid group: 10000
Error: /Stage[main]/Nvm/File[/opt/boxen/bin/node]/ensure: change from absent to link failed: Invalid group: 10000

Error: Invalid group: 10000
Error: /Stage[main]/Git/File[/opt/boxen/bin/boxen-git-credential]/ensure: change from absent to link failed: Invalid group: 10000
@bluesalt

I met a similar problem. But it turned out that it is caused by domain. My laptop joins the domain of my office. When it doesn't connect to the domain, a invalid group error will occurs.

@bitbier
bitbier commented Apr 15, 2013

I am also getting this error at the same place and other places. Here are the log files, I've tried searching everywhere for a solution for this, does anyone have any more insight?

Mon Apr 15 15:23:37 -0700 2013 Puppet (err): Unable to set ownership of log file
Mon Apr 15 15:23:41 -0700 2013 Puppet (err): Invalid group: 1831452121
Mon Apr 15 15:23:41 -0700 2013 /Stage[main]/Nvm/File[/opt/boxen/bin/node-waf]/ensure (err): change from absent to link failed: Invalid group: 1831452121
Mon Apr 15 15:23:41 -0700 2013 Puppet (err): Invalid group: 1831452121
Mon Apr 15 15:23:41 -0700 2013 /Stage[main]/Nvm/File[/opt/boxen/bin/npm]/ensure (err): change from absent to link failed: Invalid group: 1831452121
Mon Apr 15 15:23:41 -0700 2013 Puppet (err): Invalid group: 1831452121
Mon Apr 15 15:23:41 -0700 2013 /Stage[main]/Nvm/File[/opt/boxen/bin/node]/ensure (err): change from absent to link failed: Invalid group: 1831452121
Mon Apr 15 15:23:42 -0700 2013 Puppet (err): Invalid group: 1831452121
Mon Apr 15 15:23:42 -0700 2013 /Stage[main]/Git/File[/opt/boxen/bin/boxen-git-credential]/ensure (err): change from absent to link failed: Invalid group: 1831452121
Mon Apr 15 15:23:42 -0700 2013 Puppet (err): Invalid group: 1831452121
Mon Apr 15 15:23:42 -0700 2013 /Stage[main]//Node[default]/File[/Users/jstarker/src/our-boxen]/ensure (err): change from absent to link failed: Invalid group: 1831452121
Mon Apr 15 15:23:42 -0700 2013 /Stage[main]/Git/Packageboxen/brews/git: Dependency File[/opt/boxen/bin/boxen-git-credential] has failures: true
Mon Apr 15 15:23:42 -0700 2013 /Stage[main]/Git/Packageboxen/brews/git: Skipping because of failed dependencies

@seanorama

It's definitely do with being joined to a Network Account Server (a Windows Domain in my case). @bluesalt and @bitbier have the same cause.

Check your primary group:
$ id
uid=1611111111(myusername) gid=1999999999(DOMAIN\My Group) [... rest of line snipped ...]

Notice that when you are not connected to the domain, the group name will not resolve in most places. Try an 'ls -l in your ~. You'll see the number not the name, unless connected to the domain.

Any ideas of how to get boxen (or it's dependencies) to play nice when the group information is not available?

@aripalo
aripalo commented May 28, 2013

I have quite similar issue... my Mac is joined in Windows Domain as well.

I try to run script/boxen and I get a lot of errors, but most of them having to do with:
"Error: invalid user: my-username"

Any ideas?

@aripalo
aripalo commented May 28, 2013

Figured it out "sorta"... :)

It works if I hardcode my user uid (found from id command) to manifests/site.pp

Though I haven't yet figured out how I can read the user uid automatically to site.pp without hardcoding it.

@aripalo
aripalo commented May 29, 2013

This is probably related to the problems above:

Error: /Stage[main]/Ruby/Repository[/opt/boxen/rbenv]: Could not evaluate: Execution of '/opt/boxen/homebrew/bin/git fetch -q origin' returned 1: Error: Could not execute posix command: Invalid user: my-username
/opt/boxen/repo/.bundle/ruby/1.8/gems/puppet-3.1.1/lib/puppet/util/log/destinations.rb:94:in `flush': Bad file descriptor - /opt/boxen/repo/log/boxen.log (Errno::EBADF)

Where my-username is actually my employee number which acts as a username in Windows Domain (but I just changed it to this comment to be just my-username). I suspect that this error wouldn't come up if boxen could use my uid number... but I don't know how to change that for boxen to use everywhere. Boxen probably gets my username via the facter?

@seanorama

@aripalo I receive group errors not user errors, but will give a it a try.

When you said that you hardcoded your UID in site.pp, what did you mean (which lines & just the UID number or entire name)?

A copy of the line(s) would be useful.

@jingweno
Member

I guess my error is related:

/opt/boxen/repo/.bundle/ruby/1.8/gems/puppet-3.1.1/lib/puppet/util/log/destinations.rb:94:in `flush': Bad file descriptor - /opt/boxen/repo/log/boxen.log (Errno::EBADF)

Please help fix it since I couldn't run boxen at home...

@jingweno jingweno referenced this issue in boxen/puppet-homebrew Jun 16, 2013
Closed

Error: Could not execute posix command: Invalid group #20

@rtgibbons

FWIW, my fix was to add my group ID to the /etc/group - then it resolves.

Just give it an arbitrary name, and follow the format that is already there, replace the number from your error message. Not sure if I want this as a permanent fix, but it's better then putting it in site.pp imo

@mchesler

@rtgibbons solution worked for me as well

@philkcw
philkcw commented Oct 21, 2013

@rtgibbons solution worked for me too! I got my group id by running the "id" command.

@nealio42

thanks worked for me too!

@dieterdemeyer
Member

If I understand correctly, an account set up without a domain uses the 'staff' group, right ?
So, couldn't you just add your domain account user to that group and let boxen install everything using the 'staff' group as it does by default ?

If you set a group in /etc/group when not joined to the domain, won't that cause problems when rejoining the domain ?

@bryankennedy

I'm seeing this same issue, but like other @rtgibbons solution fixed it for me.

I just added this line to the bottom of my /etc/group file:

anythingatall:*:#####:

Where ##### is the number in your boxen error that looks like this:

Error: Invalid group: #####

So any thoughts on what's the non-hackish way to do this?

@dgoodlad
Member

I don't have any experience whatsoever with running Macs in a network domain controlled environment. However, I'd be very interested to see if the solution @dieterdemeyer proposed works for any of you folks: add your user to the staff group.

If that works, I'll happily add a note to the README documenting this as a solution!

@dieterdemeyer
Member

@dgoodlad I can confirm that adding the user to the staff group doesn't work.
The only working solution for now is adding the domain group id to /etc/group.

@dgoodlad
Member

Supporting machines attached to a network domain is a pretty low priority for me right now, so I am not going to actively pursue it. I'll happily review and merge any PRs submitted that help out on this front (docs, code, whatever), though 😉 For now, I'm going to close this, as the original issue seems to be solved.

@dgoodlad dgoodlad closed this Mar 17, 2014
@petems petems added a commit to petems/our-boxen that referenced this issue Apr 22, 2014
@petems petems Add a script to create a fake group
This fixes boxen#235 in a more permanent way
4aaa28b
@petems
Member
petems commented Apr 22, 2014

@dgoodlad added basic fix 👍 #581

@petems
Member
petems commented Jun 23, 2014

@dgoodlad mind reviewing the PR I did for this? #581

@shanioffen

Thanks @rtgibbons, your fix worked for me too. You saved the day!

@mavant mavant added a commit to mavant/our-boxen that referenced this issue Mar 16, 2015
@mavant mavant Try hardcoding UID for boxen#235 0db3cbc
@mavant mavant added a commit to mavant/our-boxen that referenced this issue Mar 16, 2015
@mavant mavant Revert "Try hardcoding UID for boxen#235"
This reverts commit 0db3cbc.
174ce00
@lstoll
lstoll commented Aug 18, 2015

FWIW this seems to be a bug in puppet, I've reported it here: https://tickets.puppetlabs.com/browse/PUP-5047

This fix here: lstoll/puppet@53efaff seems to validate it. If I ever get anywhere, I'll open a PR to revert the hack in #581 and bump puppet.

@jonstorer

I'm a bit late to the game, but I'm hitting this now. And FWIW, this is still an issue. Half of our macs are on a windows domain and they fail. So I'm using the hack above, which is a hack, not a fix, so I'm not sure why this is closed.

Anyway, what if we just used the user's main group? id -gn will give the group name, so why not use it? This script assumes the group is staff, but we could just ask the system.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment