[Catalyst] Tutorial (in VMware) keeps losing ability to authenticate

Dan Lowe dan at tangledhelix.com
Wed Jan 30 21:10:12 GMT 2013

I have been doing the Catalyst tutorial, at


I am using the VMware virtual machine, as recommended. This is running in VMware Fusion 5 Pro on a Mac. Overall it works perfectly fine, except that periodically, I lose the ability to authenticate to the demo CRUD app (MyApp). Based on observation, it seems that the only common factor is that it works fine before my laptop is put to sleep for the night, and it is broken in the morning. It doesn't seem to matter where in the tutorial I am. VMware, and often the Catalyst app server, are running when the laptop goes to sleep.

(Arguably I should not do that, though the VM itself comes back just fine, and the app server still responds, it's just that I am no longer able to authenticate.)

Things I have tried already:

1. Move the ~/MyApp/ directory aside, remove /tmp/myapp (session data cache), and run the server from e.g. ~/Final/Chapter05/MyApp. This results in the same behavior (app server runs, and response to http requests, but when authenticating, all I ever get is the "Empty username or password" error).

2. Reboot the VM

3. Reboot the Mac

4. Get to a working point, stop the app server, tar up ~/MyApp, and then next time it breaks,

	(stop app server)
	cd ~
	rm -rf ~/MyApp /tmp/myapp
	(untar the copy of ~/MyApp)
	cd ~/MyApp ; script/myapp_server -r

But that doesn't work, it exhibits the same behavior.

5. Delete ~/MyApp and /tmp/myapp and do the tutorial over again, pasting in all of the code from the web page. (This is the only approach that has worked so far, unfortunately.)

I am just learning Catalyst (obviously), so I don't have any good theories here except that sleeping the VMware VM is corrupting something in its memory or filesystem, causing the trouble. Memory would not seem to be a legitimate suspect though, because rebooting the VM does not fix the problem. Whatever is wrong is persisting across reboots, i.e. it's probably on the filesystem.

Does the tutorial cache data other than in /tmp/myapp? I have tried to find other caches, but since I am running unprivileged, it seems as if it would not be able to write outside of my home directory or /tmp, and I've already looked in both of those. I don't see anything under ~/MyApp that appears to be dynamic data, only in /tmp/myapp.

Thanks for any advice,

More information about the Catalyst mailing list