Error Creating User

asked 2015-05-04 11:07:08 -0600

some_guy gravatar image

Hello, I'm having a bit of trouble with one of my machines. First, let me note that I have five identical machines- They're iMacs running 10.9.5. This problem is only occurring on one of them, and I can't seem to figure out why.

I've got puppet and foreman set up and running, and one of the configs is two create two users. This works fine on all machines but one. The problem machine returns this:

puppet-agent[59648]: Could not prefetch user provider 'directoryservice': invalid byte sequence in US-ASCII
puppet-agent[59648]: (/Stage[main]/Sysadmin_user/User[sysadmin]/home) defined 'home' as '/var/myuser’
puppet-agent[59648]: (/Stage[main]/Sysadmin_user/User[sysadmin]/uid) defined 'uid' as '501'
puppet-agent[59648]: (/Stage[main]/Sysadmin_user/User[sysadmin]/gid) defined 'gid' as '20'
puppet-agent[59648]: (/Stage[main]/Sysadmin_user/User[sysadmin]/password) created password
puppet-agent[59648]: (/Stage[main]/Sysadmin_user/User[sysadmin]/salt) defined 'salt' as ‘<omitted<>
puppet-agent[59648]: (/Stage[main]/Sysadmin_user/User[sysadmin]/iterations) defined 'iterations' as '35842'
puppet-agent[59648]: (/Stage[main]/Root_user/User[root]/home) defined 'home' as '/var/root'
puppet-agent[59648]: (/Stage[main]/Root_user/User[root]/uid) defined 'uid' as '0'
puppet-agent[59648]: (/Stage[main]/Root_user/User[root]/gid) defined 'gid' as '0'
puppet-agent[59648]: (/Stage[main]/Root_user/User[root]/password) created password
puppet-agent[59648]: (/Stage[main]/Root_user/User[root]/salt) defined 'salt' as '<omitted>'
puppet-agent[59648]: (/Stage[main]/Root_user/User[root]/iterations) defined 'iterations' as '35842'
puppet-agent[59648]: Finished catalog run in 13.32 seconds

My puppet agent is 3.7.4. It's running as a cronjob to do it's check ins.

*/60 * * * * puppet agent --server myserver.mydomain

However, if I run it from the terminal with "puppet agent --test --debug", this problem seems to go away, and complete it's run without error.

Not finding much searching out information- Any ideas on what's going on here or what info might be helpful to debug it?

edit retag flag offensive close merge delete

Comments

Just out of curiosity, is the default locale set differently on this server than the others? Also, try testing using the command `LANG=C puppet agent --test --debug` to see if you see the same issues. And if you do, try running that command on the other hosts to see if it acts the same.

JohnsonEarls gravatar imageJohnsonEarls ( 2015-05-04 15:22:48 -0600 )edit

I tried adding this in the cronjob, and the issue is still there (running it manually would succeed). Also compared the env vars when running cron, and they are the same as well. Thanks for the idea though.

some_guy gravatar imagesome_guy ( 2015-05-05 10:56:40 -0600 )edit

I wasn't clear: I meant to try the `LANG=C puppet agent --test --debug` command in the terminal and see if it causes the same issue. The US-ASCII error message is pointing to an issue with receiving UTF-8 or some 8-bit character data in the C or US-ASCII (7-bit) locale.

JohnsonEarls gravatar imageJohnsonEarls ( 2015-05-05 11:19:25 -0600 )edit

If running with LANG=C in the terminal causes the same issue, then check your default $LANG parameter in your terminal and try adding that to the cron job.

JohnsonEarls gravatar imageJohnsonEarls ( 2015-05-05 11:20:18 -0600 )edit

I ran the command from the terminal, and it's still throwing the sam error. For whatever reason, running from the terminal vs cron doesn't work anymore (they both result in the same error now, where I could previously successfully run from the terminal).

some_guy gravatar imagesome_guy ( 2015-05-05 11:40:01 -0600 )edit