Skip to main content

Chef encountered an error attempting to create the client

So I'm finally starting to keep up with modern times and started to learn Chef more in depth. My goal is to completely automate and easily manage all of virtual machine instances running in my home network.

Upon attempting to bootstrap my very first node, I received the following error:

ubuntu Creating a new client identity for ubuntu01 using the validator key.
ubuntu ===================================================================
ubuntu Chef encountered an error attempting to create the client "ubuntu01"
ubuntu ===================================================================
ubuntu Resource Not Found:
ubuntu -------------------
ubuntu The server returned a HTTP 404. This usually indicates that your chef_server_url is incorrect.
ubuntu Relevant Config Settings:
ubuntu -------------------------
ubuntu chef_server_url ""
ubuntu [2013-09-15T22:25:28-07:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
ubuntu Chef Client failed. 0 resources updated
ubuntu [2013-09-15T22:25:28-07:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

This essentially means that the node is not able to communicate with the Chef server. In my case, it turned out that the ubuntu01 machine was not using my local DNS servers, thus the lookup from the machine was failing.


Awesome Applications: 

Can't locate local/ CPAN error on Ubuntu 12.04

So the default Perl installation that ships with Ubuntu 12.04 LTS, does not include local::lib which is necessary if you want to use CPAN.


Can't locate local/ in @INC (@INC contains: /home/tony/perl5/lib/perl5 /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl /home/tony) at /usr/share/perl/5.14/CPAN/ line 1300.


sudo apt-get install liblocal-lib-perl




Reverse DNS in BIND 9.8

I use BIND on my home network, and giving the bast amount of virtual machines I have online, I've always find myself wanting to easily look up which machine is using which IP address without having to ssh into the actual vm or check the zone file. Configuring reverse DNS in BIND 9.8 is actually a dead simple process.
First, a separate zone file for PTR records needs to be created, I named mine db.
Note: since my network address space is 192.168.1, the actual PTR record will be the network address backgrounds followed by

$TTL 3h
@       IN SOA (
                                        2013090701      ; serial
                                        3h              ; refresh after 3 hours
                                        1h              ; retry after 1 hour
                                        1w              ; expire after 1 week
                                        1H )            ; negative caching TTL of 1 hour

              IN      NS
              IN      NS      IN      PTR

Lastly, the zone entry needs to be added to the master named.conf file. Mine looks like this

zone "" IN {
        type master;
        file "etc/zones/db.";
        allow-query { any; };

After reloading Bind, you verify reverse DNS works by using the utility of your choice; ie dig, host, nslookup, etc..

alpha03:~ tony$ nslookup
Address:	name =


Awesome Applications: 

Exporting data in MySQL to an XML file

So I just started reading a new MySQL administration book and starting to learn cool things that I didn't even know previosly. One cool feature MySQL supports that I wasn't aware of is the ability to export and import data to and from XML files.

For example the following will export the table City from world database to an XML file.

[email protected]:~# mysql --xml -e 'SELECT * from world.City' > city.xml

To import data from the XML itself can be accomplished using the LOAD XML statement.

([email protected]) [world] LOAD XML INFILE 'city.xml' INTO TABLE City;
Query OK, 4079 rows affected, 14 warnings (0.81 sec)
Records: 4079  Deleted: 0  Skipped: 0  Warnings: 14

Additional information:


ZFS on Linux: Kernel updates

Just as I would expect, updating both the kernel's of the machine that is running VirtualBox and its virtual machines and the ZFS enabled Linux virtual machine was completed with absolutely no issues. I originally was more concern on updating the host VirtualBox machine's kernel given that I've never really done this in the past using the additional VirtualBox Extension Pack add-on before, on the other hand I wasn't to concern regarding the ZFS kernel module, given that it was installed as part of a dkms kernel module rpm. Which regardless of what people think about dkms modules, as a sysadmin that have worked with Linux systems with them (proprietary), it's certainly a relief knowing that little or no additional work is needed to rebuild the respective module after updating to a newer kernel.


Awesome Applications: 

lsof alternative in Solaris

(Warning: output is pretty ugly)

pfiles /proc/*


User creations in Solaris 11

To my surprise Solaris 11 does not create new user's home directory by default.


[email protected]:~# su - testuser
su: No directory!
[email protected]:~# pwck
Login directory not found


[email protected]:~# useradd -m testuser
80 blocks

In the process, I learned something new about the su command. In Linux, when switching from root to a limited user, I used to do the following:

[[email protected] ~]# su tony -

What I did not know was that the above command will indeed load up the PATH of tony, but it will also append root's PATH at end of it which is kind of scary. In theory the command that I wanted to use was `su - username`, luckily this feature is not supported in Solaris 11.

[email protected]:/# su testuser -
bash: /root/.bashrc: Permission denied


OSSEC agent install issue on Debian Squeeze

So the OSSEC installer has a conditional expression that doesn't seem to be supported with the version of Bash in Debian Squeeze.


3- Configuring the OSSEC HIDS.

./ 158: [[: not found

Fix, update line 372 on to the following:

if [ "X${USER_AGENT_SERVER_IP}" = "X" -a "X${USER_AGENT_SERVER_NAME}" = "X" ]; then

This was so frustrating, and it appears to be known issue. Unless I'm mistaken double brackets are only used in Bash to do a regular expression conditions, at least that's the only time I've used them...

UPDATE: I also ran into this same issue on FreeBSD 9 and Ubuntu Server 12.04 LTS.



Awesome Applications: 


ZFS on Linux: Stability Issues

So far I've had one stability issue on my backup virtual machine. Though, I can't really blame ZFS for crashing my VM, instead I believe this was a consequence the VM running out of memory due to large amount of rsync, and the heavy I/O caused on the ZFS drive.

After updating the dedicated memory on my backup VM from 512 MB to 3.5 GB and updating my rsync's to run with low process and I/O priority, I have yet experience any more problems.

nice -n 19 ionice -c 3

Awesome Applications: 

PHP: XCache performance testing

Aside APC, as far as I know XCache is the second most popular PHP caching optimizer. So I manually compiled and installed XCache on my VM and configured the WordPress W3 Total Cache plugin to use the XCache optimizer and ran the same benchmarks test that I did when APC was enabled.

After a few tests, the total requests per second was around 24-25 seconds. Slightly slower than APC. However, unlike APC, I noticed that with XCache the overall server load was less (peak at about 3.3), in addition the I/O system activity also appeared to be less than with APC.

Concurrency Level: 5
Time taken for tests: 40.740110 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Non-2xx responses: 1000
Total transferred: 351000 bytes
HTML transferred: 0 bytes
Requests per second: 24.55 [#/sec] (mean)
Time per request: 203.701 [ms] (mean)
Time per request: 40.740 [ms] (mean, across all concurrent requests)
Transfer rate: 8.39 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 6 134.1 0 3000
Processing: 99 196 25.6 200 297
Waiting: 98 196 25.6 199 297
Total: 99 202 136.9 200 3209

Percentage of the requests served within a certain time (ms)
50% 200
66% 209
75% 214
80% 216
90% 222
95% 227
98% 234
99% 241
100% 3209 (longest request)


Awesome Applications: 


Premium Drupal Themes by Adaptivethemes