Entries Tagged as 'OS X'

What I Learned Today - Have your ColdFusion on OS X and your Verity too.

Verity , What I Learned Today , ColdFusion , OS X No Comments »

This is a followup to my previous post on this topic, and a solution found.

Thanks to comments here and from House of Fusion, I learned that Verity does not work on Macintosh OS X. An alternate solution must be found. Thanks in part to Dave Watts of Figleaf, I found it.

Setting Up Verity

From Dave's suggestion, I installed CF9 on an OS that has Verity - Windows in my case.I have an instance of WinXP SP3 running via VMware Fusion. I have the network adapter set up for NAT, so it gets it's own internal IP address.

I installed it as a standalone edition with the local web server on port 8500. After installation I ran the web-based config to get it all up and running. At that point, I disabled all the CF services except for the ColdFusion Search Services, which is set to Automatic. I went into Windows Firewall and opened up the three ports Verity uses.

I went back into my OS X CF admin, and changed the Verity K2 host to the IP address of my Windows instance. Tried to connect to the service and.... nothing. At this point it was 1700 on Friday so I shut down and took the weekend off from this.

I returned to this task this morning with a fresh head, and found some documentation on CF's instance of Verity. It only allows connections from one machine, and by default it is set up to be 127.0.0.1. A search found this address in two XML files in my C:\ColdFusion9\verity\Data\host directory, as well as the C:\ColdFusion9\verity\verity-install.cfg file. I went into all three files, and changed the IP address and mask from 127.0.0.1 and 255.255.255.255 to my OS X internal IP address and a mask of 255.255.255.0. I restarted the ColdFusion Search service on Windows. I cannot tell you for certain which change was the difference maker, but when I refreshed the ColdFusion Collections link on my OS X CF9 admin server, it was connected to the Windows verity!

Fun with soft links

The next task was to set up the collection that I was going to use. The function to do the indexing is set up to create the collection first if it does not exist.

As a reminder, my QA and production environment are Unix boxes, which does have Verity support from CF. On it, CF is set up in the /opt/coldfusion directory. Therefore the verity collections are in /opt/coldfusion/verity/collections/. I have been very strict in making sure that my local development environment on OS X mimics the directory structures used on QA and production, using soft links where needed. So on OS X, I created /opt, and inside /opt created a soft link for "coldfusion" to link to my /Applications/ColdFusion9/ directory.

The path to the verity folder is /opt/coldfusion/verity/collections/. My first instict was that CF would create the directories as needed. I ran my indexing template, and got back the following:

The collection was reindexed. 0 records have been inserted. 0 records have been updated.


Not what I was expecting. I looked in my /Applications/ColdFusion9 directory, and saw no new "verity" directory created. So where was it? I looked on my WinXP instance in C:\ColdFusion9\verity\collections, and saw no new collections created there. I was stumped until I looked at the C:\ drive, and found an "opt" directory there. Expanding it, I found C:\opt\coldfusion\verity\collections\ and my collection inside there!

Now knowing what had happened, I needed to link OS X to that verity folder. I shared the C:\opt\coldfusion\verity folder on Windows, and mounted it in OS X. I then went into /Applications/ColdFusion9, and made a soft link to the mount point for the verity shared folder at /Volumes/verity. So now /opt/coldfusion/verity links properly to the C:\opt\coldfusion\verity on Windows. I think I've got it all, so I run the index again.

The collection was reindexed. 0 records have been inserted. 0 records have been updated.


Huh?

The Final Hurdle - proper location of the documents

Looking in the CF9 admin, I read this:

Because you have a remote K2 server configured, you must ensure that the documents to be indexed are accessible from the ColdFusion server machine as well as the computer on which the K2 search services run.

And that's when I realized that the documents to be indexed couldn't be on OS X, they had to be on windows. I created an uploads directory on Windows, and shared it. I mounted the share on OS X. Then, again mimicing our QA and production structure, I soft linked the root uploads directory to the mount point (/Volumes/uploads).

A final running of the indexing returned this:

The collection was reindexed. 106 records have been inserted. 0 records have been updated.


Wahoo! And a test of the search returned results as expected!

Comments are moderated solely for spam-prevention purposes only.

Snow Leopard and ColdFusion

ColdFusion , OS X No Comments »

When Snow Leopard came out, I was quick to upgrade. Something I normally never do, but I trusted that Apple wouldn't be as bad as... oh say Microsoft at operating system upgrades. Well, turns out I was wrong in a few instances. The two most notorious were that my HP Laserjet printer would no longer print (fixed), and that it nuked my ColdFusion 8 server. This was a real pisser because while I am still stuck with CF7 at work, I use CF8 for all my personal projects.

Thinking that I should just do an uninstall and reinstall to get things back up, I did the uninstall part. Then I found out that the 64-bit version of CF8 would not install. Now I was really pissed. I started scanning the blog sites (something that in hindsight I should have done sooner) and found people that had the same problems, but were able to fix them manually by fixing Apache and the configuration files. I opened up my Time Machine, only to find that I could not access those protected directories to get at my Apache config files (does Time Machine even make a backup of those?). So now I was really stuck.

After trying to get this install to work and having no luck, I went to Plan B. I created a new instance of Ubuntu through VMware and set up CF8 there. It worked well enough, but it puts a serious drain on my computer's memory having more than one virtual machine running (I need Windows up for SQL Server) so I really was not liking that.

Yesterday I ran into this blog post from Johnathan Lane that gave me the tools I needed to get things working again. In brief, CF8 32-bit does install whereas 64-bit still does not. Then you go manually edit the webserver connector config files, grab a recompiled connector, fix some Apache and permissions settings, and you're good to go.

One thing I would add to that is that I had to move my CFIDE folder from the default web server location to my Sites folder, where my localhost web root is. I suppose I could have made a soft link to it, but moving it outright has caused me no problems.

So now, on this front at least, life is back to normal.

Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds