This may not be relevant for many but it was for me and I thought I'd share. 

In ColdFusion Builder (CFB), you can use the Servers view to control your various CF server instances. My install of CFB has 3 local servers setup: ColdFusion 8, ColdFusion 9, and Railo 3.1.2. CF8, the one I had some trouble with, was installed on top of JRun4 using the multi-server configuration option.

Before CFB, I started CF8 with an AppleScript: 'do shell script "sudo /Applications/JRun4/bin/jrun -start cfusion &" user name "myusername" password "mypassword" with administrator privileges'. With the release of CFB, I wanted to start controlling (starting, stopping, restarting) all my servers from the IDE because you get some added benefits that you do not get if you start/stop your servers outside the IDE: including but not limited to TailView on the logs and a really nice set of debugging options. 

However, whenever I started my CF8 instance from CFB, the IDE could not access the log files. I could see output in the Console view indicating that there was an error with the RDSServlet (Permission denied for the requested operation). Specifically, CFB was not able to access the log files (permission denied) and the error message looked like:

[ColdFusion 8 (cfusion8)]:Error(date/time) Unable to fetch server mappings.
[ColdFusion 8 (cfusion8)]:Error(date/time) Unable to get the log directory. 

In order to fix these issues, I made a few changes to both my CF8 server and CFB:

  1. Added a dedicated user for ColdFusion 8 via the CF Administration and gave this user both RDS permissions as well as Administrative Access for the Console & API.
  2. Set CFB to access ColdFusion RDS features as this newly created administrator (accessed either via the standard Window->Preferences->Adobe->RDS Configuration or by right-clicking on a server in the Servers view and selecting Edit Server from the context menu).
  3. Set the permissions on my ColdFusion logs folder and its files (/Applications/JRun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/logs) to a more open setting. I believe I used chmod 666 but I forgot :). 

With those three changes in place, I was then able to start, stop and restart my CF8 instance from CFB with no problems in terms of accessing log files and, most importantly, being able to take advantage of the TailView to see my logs actively update as I ran tests and such. 

Like I said at the top, this 'issue' may not be widely experienced or might be something in how I installed CF8 and/or started it with administrator privileges from my AppleScript but, just in case others have run into this problem, I thought I'd post what I did in the hopes that it might save someone a few hours of time!

Posted via web from Craig Kaminsky's posterous

Comments