ColdFusion Manual Configuration & Issues with TCP ports 51011, 51010 and 51800 on IIS and Apache
ColdFusion works by configuring your web server (IIS, or Apache) to execute files with known extensions (.cfm, .cfml, .cfc et al) to run as script. And for doing that ColdFusion comes with a small and important tool called “wsconfig”.
Problem: At times, regardless of operating system and the web server you are using, the ColdFusion installation will fail to configure web-server due to your network settings or firewall/security settings. When running wsconfig tool, you may encounter errors similar to the following:
- Could not connect to any JRun/ColdFusion servers on host localhost.
- Possible causes:
- Server not running
- Start Macromedia JRun4 or ColdFusion server - Server running
- JNDI listen port in jndi.properties blocked by TCP/IP filtering or firewall on server
- host restriction in security.properties blocking communication with server
- Server not running
- Possible causes:
Snapshot above shows one of the common scenario when wsconfig will not configure IIS.
Solution: Here is one fail proof solution to complete the installation of ColdFusion and stop worrying about getting wsconfig to… “run”. Yes, you we will not run “wsconfig”. Instead, we will manually configure web-servers and manually create files that are created by wsconfig.
Let’s first take into account the files that are created or modified by wsconfig:
- Create jrunserver.store – The wsconfig tool will create a .store file that the jrun server uses to store port number for connecter to work with your server. Port number for CFMX 6.1 is 51010. Port for CF 7.0 is 51011. And port for CF 8 and CF 9 is 51800. You can check the port number for your machine in jrun.xml file stored in cf_root\runtime\servers\coldfusion\SERVER-INF\jrun.xml – search for “ProxyService” in this file and under the <service> tag you will find <attribute name="port">YOUR PORT NUMBER</attribute>.
- For IIS, creates jrun.ini or jrun_iis6.ini – Only when configuring IIS on Windows. For IIS4 and IIS5, a jrun.ini file is created. For later versions, i.e. for IIS6 and II7 jrun_iis6.ini file is created.
- For Apache, modifies httpd.conf – Only when configuring Apache server. The httpd.conf file is part of Apache. Its the web-server configuration file and this file is modified by wsconfig tool so that Apache will load mod_jrun2.so or mod_jrun22.so depending on version of ColdFusion.
Let’s Just Do It Manually
- Open jrun.xml file found at cf_root\runtime\servers\coldfusion\SERVER-INF\. Edit the file, find “ProxyService” and change value of deactivated to true. Like shown in the snapshot below.
- After you have edited the above XML file, you must restart the ColdFusion Application server.
- Create wsconfig.properties file – this file is created by wsconfig tool to store the list of servers it has configured. Take a look at the following snap-shot – the wsconfig tool will store two records in wsconfig.properties file when you have both IIS and Apache configured. So, if you have just one server configured then only one record is saved in the file and the same is shown in the tool.
- Create wsconfig.properties file at cf_root/runtime/lib/wsconfig
- Edit the file to contain following information depending on your server:
- For IIS:
- For ColdFusion 7+
1 =IIS,1,false,""
1 .srv=localhost,"coldfusion"
1.cfmx=true,C:/inetpub/wwwroot - For ColdFusion MX 6.1, instead of the above line, enter:
1 =IIS,1,false,""
1 .srv=localhost,"default"
1.cfmx=true,C:/inetpub/wwwroot
- For ColdFusion 7+
- For Apache:
- On Windows:
1=Apache,C:/Apache Group/Apache2/conf,"","",""
1 .srv=localhost,"coldfusion"
1.cfmx=true,<null> - On Unix:
1=Apache,/opt/apache/2.0.47/conf,"","",""
1 .srv=localhost,"coldfusion"
1.cfmx=true,<null>
- On Windows:
- For IIS:
- Extract connector files (DLL or SO files) from wsconfig.jar: The wsconfig tool will extract the DLL files from wsconfig.jar file. Which files are extracted depends on the server you are running. When you are running IIS4 or IIS5 or IIS6 or IIS7 the wsconfig tool will extract *.dll files specific for your version. When running Apache, specific *.so file for your version is extracted. Now, lets look into specific details for each server and see what files are extracted for a specific web server:
-
IIS 6 and IIS 7 configuraton:
- Extract jrunwin32.dll and jrun_iis6.dll from cf_root\runtime\lib\wsconfig.jar and copy them to cf_root\runtime\lib\wsconfig\.
- Extract jrun_iis6_wildcard.dll from cf_root\runtime\lib\wsconfig.jar and copy it to cf_root\runtime\lib\wsconfig\1.
- Create a jrun_iis6_wildcard.ini file in cf_root\runtime\lib\wsconfig\1. It should contain the following information:
verbose=false
serverstore=cf_root/runtime/lib/wsconfig/1/jrunserver.store (use absolute path. see note below)
bootstrap=127.0.0.1:51800 (port number differs by version of ColdFusion server. see note below)
apialloc=false
ssl=false
#errorurl=<optionally redirect to this URL on errors>Notes:
- serverstore above should point to actual JRun 4 installation
- bootstrap port number for ColdFusion 9 is 51800, for ColdFusion 7 and 8 port number is 51011. And, for ColdFusion 6 the port number is 51010.
- Create the jrunserver.store file in cf_root\runtime\lib\wsconfig\1. Edit as follows:
proxyservers=127.0.0.1:51800 (127.0.0.1:51010 for MX 6.1; 127.0.0.1:51011 for MX 7)
- Specific for IIS 6:
- Using the IIS Management Console, add a new Web Service Extension named Macromedia Server Extensions. Set the status to Allowed. Set Required Files to
cf_root\runtime/lib\wsconfig\1\jrun_iis6_wildcard.dll and cf_root\runtime\lib\wsconfig\jrun_iis6.dll. - Right-click on the website you are connecting and select the properties. Select the Home Directory tab and click on the Configuration button. Add extension mappings in the Application extensions for .cfc, .cfm, .cfml, .cfr, .cfswf,.jsp and .jws. Point all of them to cf_root\runtime\lib\wsconfig\jrun_iis6.dll.
- In the Wildcard application maps at the lower half of the same window, insert the following:
cf_root\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll.
- Using the IIS Management Console, add a new Web Service Extension named Macromedia Server Extensions. Set the status to Allowed. Set Required Files to
- Specific or IIS 7:
- Under the IIS Management Console, click on your computer name, click on “ISAPI and CGI Restrictions” and add two entries: one for cf_root\runtime/lib\wsconfig\1\jrun_iis6_wildcard.dll and the other for cf_root\runtime\lib\wsconfig\jrun_iis6.dll. Set both to allowed.
- Click on your computer name and click on “Handler Mappings” and add one “Wildcard Script Map”:
- After adding wildcard script map, add script handlers for *.cfm files:
- Add other file extensions that are supported by your version of ColdFusion. For ColdFusion 9, you will add the following script handler mappings (*.jsp, *.jws, *.cfml, *.cfc, *.cfr, *.cfswf, *.hbmxml):
- Under the IIS Management Console, click on your computer name, click on “ISAPI and CGI Restrictions” and add two entries: one for cf_root\runtime/lib\wsconfig\1\jrun_iis6_wildcard.dll and the other for cf_root\runtime\lib\wsconfig\jrun_iis6.dll. Set both to allowed.
-
IIS 4 or IIS 5 configuration:
- Extract jrunwin32.dll from cf_root\runtime\lib\wsconfig.jar and copy it to cf_root\runtime\lib\wsconfig\.
- Extract jrun.dll from cf_root\runtime\lib\wsconfig.jar and copy it to cf_root\runtime\lib\wsconfig\1.
- Create a jrun.ini file in cf_root\runtime\lib\wsconfig\1. It should contain the following information:
verbose=false
scriptpath=/JRunScripts/jrun.dll (must be a valid URL. see note below)
serverstore={cf-root}/runtime/lib/wsconfig/1/jrunserver.store (use absolute path. see note below)
bootstrap=127.0.0.1:51800 (port number varies by version of CF. see note below)
apialloc=false
ssl=false
ignoresuffixmap=false
#errorurl=<optionally redirect to this URL on errors>
Notes:
- scriptpath above points to /JRunScripts/jrun.dll and it must be a valid URL. Using the IIS Management Console, add a virtual directory named JRunScripts to the website. The Local Path property of the folder should point to cf_root\runtime\lib\wsconfig\1 and Execute Permissions must be set to "Scripts and Executables"
- serverstore above should point to actual JRun 4 installation
- bootstrap port number for ColdFusion 9 is 51800, for ColdFusion 7 and 8 port number is 51011. And, for ColdFusion MX 6.1 the port number is 51010.
- Add the JRunConnector Filter to the ISAPI Filter properties of the website:
- Right-click on the website.
- Select the ISAPI Filters tab.
- Click the Add button.
- In the Filter Name text box, enter "JRun Connector Filter".
- In the Executable text box, browse to or enter "cf_root\runtime\lib\wsconfig\1\jrun.dll".
- Select the Home Directory tab and click on the Configuration button. Add extension mappings in the Application extensions for .cfc, .cfm, .cfml, .cfr, .cfswf, jsp and .jws. Point all of them to cf_root\runtime\lib\wsconfig\1\jrun.dll.
- Restart the World Wide Web Publishing service from the Windows Control Panel and check the ISAPI Filter property for the website. The JRun Connector Filter should show a high priority with a green arrow pointing upwards.
-
For Apache web server:
- Extract the .SO file file for your Apache server version from wsconfig.jar file. In the screenshot above you will see that mod_jrun22.so has been extracted. mod_jrun20.so supports Apache 2.x web servers. To connect to Apache 1.3.x, use mod_jrun.so.
- Create jrunserver.store file under cf_root\runtime\lib\wsconfig\1 directory with the following files:
jrunserver.store - Create a file called jrunserver.store and enter the following information:- For ColdFusion MX 6.1:
proxyservers=127.0.0.1:51010 - For ColdFusion MX 7:
proxyservers=127.0.0.1:51011 - For ColdFusion 8 and ColdFusion 9
proxyservers=127.0.0.1:51800
- For ColdFusion MX 6.1:
- Edit the Apache configuration file (located in apache_install_directory/conf/httpd.conf) and add the following section at the end of the file:
# JRun Settings
LoadModule jrun_module "cf_root/runtime/lib/wsconfig/2/mod_jrun22.so"
<IfModule mod_jrun22.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore "cf_root/runtime/lib/wsconfig/2/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51800
#JRunConfig Errorurl url <optionally redirect to this URL on errors>
#JRunConfig ProxyRetryInterval 600 <number of seconds to wait before trying to reconnect to unreachable clustered server>
#JRunConfig ConnectTimeout 15 <number of seconds to wait on a socket connect to a jrun server>
#JRunConfig RecvTimeout 300 <number of seconds to wait on a socket receive to a jrun server>
#JRunConfig SendTimeout 15 <number of seconds to wait on a socket send to a jrun server>
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>
Notes:
- LoadModule jrun_module must point to actual location of .so file using absolute path.
- JRunConfig Serverstore must point to actual location of .store file created in step #2.
- JRunConfig Bootstrap must use the correct port number. For ColdFusion 9 use 51800. For MX 7 use 51011 and for MX 6.1 use 51010.
- Restart the Apache web server.
If you are on IIS, you might have to restart the IIS web server, but in most cases you won’t have to.
Now, you’re finished configuring your ColdFusion server with your web server without running wsconfig tool. This will help those who find that wsconfig is failing to configure their web servers. Phew!
Thanks for your post.
ReplyDeleteBut CF8 port number makes me confused, sometimes you mentioned it is 51011 (port number for ColdFusion 9 is 51800, for ColdFusion 7 and 8 port number is 51011)
or 51800 (For ColdFusion 8 and ColdFusion 9
proxyservers=127.0.0.1:51800 )
I think is 51800, correct?
Regards.
Sameer,
ReplyDeleteThanks so much for you post! Followed it carefully and was able to get my Coldfusion 6.1 running on our Windows 2008 Server 64bit. Awsome! Thanks again.
Nice write up... You seem to have one typo. JRunProxyService should be activated, so "deactivated" should be set to "false" not "true" as you have it. (I've tried setting it to true and I get http 503 error: Could not connect to JRun Server).
ReplyDeleteAnother thing... I have a CF7 running on IIS 7.5 (Windows Server 2008 R2, which only comes in 64bit flavor) It might be worth mentioning that in any flavor of 64bit Windows, the AppPool that CF7 runs in must be set to "Enable 32-bit Applications". Not sure about CF8, but I suspect that's also has a 32bit dll.
FYI, here is an alternative configuration for CF7 on IIS 7.5 - Windows 2008 R2 (It will most likely work on other CF and IIS combinations). It's a bit more complicated, but I recommend it for production servers as it has some security and performance advantages.
ReplyDelete1) Skip (Remove) Wildcard Script Map setup in Handler Mappings.
2) When adding Script Maps for *.cfm, *.cfc, etc use jrun_iis6_wildcard.dll (jrun_iis6.dll won't work). For each Script Map in Request Restrictions check "File" under "Invoke handler only if request is mapped to".
The advantage of such setup is that IIS handles all your 404 errors including for *.cfm and other CF mapped file extensions. You can have per site 404 custom pages instead of having to rely on server-wide CF "Missing Template" page for all .cfm 404s. Second, your /CFIDE/Administrator will not be accessible through any of your sites (unless you add a Virtual directory through IIS). Third, I was not able to find out if there is a performance penalty associated with having Wildcard Script Map for CF connector but it is a well known fact that there is a performance penalty when using ASP.NET Wildcard Script Map. At any rate, with my setup CFusion does not process/handle any static files (.htm, jpg, gif, etc).
If you are using CFCHART, Flash Remoting, and some other servlets (see servlet-mappings in cfwwwroot/WEB-INF/web.xml) you will need to optionally add these on per site basis:
3) CFCHART invokes GraphServlet servlet which is mapped to /CFIDE/GraphData.cfm. The solution is simple: In root of your site create CFIDE folder and in it create empty GraphData.cfm file. While you are at it, create a virtual directory "scripts" in your newly created CFIDE folder and point it to "real" /CFIDE/scripts folder. This will assure that various .js, .swf scripts used in CFFORM are available. (Not sure if you need any other mappings for CFGRID, CFTREE, CFSLIDER, etc)
4) Flash Remoting (FlashGateway servlet) invokes /flashservices/gateway. Solution: In your site root create empty flashservices folder. In IIS Handler Mappings for that folder edit your CFC (or any other CF) mapping and change path from "*.cfc" to "gateway", also uncheck map to File in Request Restrictions. Flash remoting now works.
Daniel, thanks for your inputs. You seem to have spent quite some time tinkering with the installation process.
ReplyDeletei've been trying to install CF9 64bit in a Windows Server 2008 64bits running plesk. I followed your instructions but still have, when trying to get to the admin page: "HTTP Error 404.17 The requested content appears to be script and will not be served by the static file handler" with call to "Requested URL http://127.0.0.1:80/CFIDE/administrator/index.cfm
ReplyDeletePhysical Path D:\inetpub\vhosts\default\htdocs\CFIDE\administrator\index.cfm
"
Any idea?
thanks a lot
@Isabelle,
ReplyDeleteCan you download CF 9.0.1 installation? It doesn't require any IIS6 metabase and management features. Follow instructions here: http://www.codecurry.com/2010/07/installing-coldfusion-901-update.html
Thank you so much! you got me up and running!
ReplyDeleteHola a todos, bueno yo tengo un problema con CF MX7 y apache 2.2, intale apache y corria perfectamente pero al instalar CF no se puede iniciar el servicio, por x razon el apache lo necesito en un puerto diferente al 80 (le puse el 5000). Los servicios de CF si me aparecen iniciados pero el de apache no. ¿Alguna idea?
ReplyDeleteI get "HTTP Error 404.17 - Not Found" with error code:0x80070032, when i open my coldfusion admin url i.e. http://127.0.0.1/CFIDE/administrator/index.cfm
ReplyDeleteMy iis version is 7, coldfusion 9 with update 9.01, windows 7 64bit.
plz help
This blog is unique from all others. Thanks for sharing this content in an excellent way. Waiting for more updates.
ReplyDeleteIELTS Coaching in Anna Nagar
IELTS Coaching in Adyar
IELTS Coaching in Porur
IELTS Coaching in Chennai
Spoken English Classes in Chennai
Best Spoken English Classes in Chennai
Spoken English Class in Chennai
Great Blog!!! Was an interesting blog with a clear concept. And will surely help many to update them.
ReplyDeleteReactJS Training in Chennai
ReactJS Training
gst classes in chennai
ux design course in chennai
ReactJS course
Web Designing Course in Chennai
Ethical Hacking Course in Chennai
Tally Course in Chennai
Anda harus bisa cari tahu dari banyak sumber yang ada tentang penawaran dari bonus dan lainnya.
ReplyDeleteasikqq
http://dewaqqq.club/
http://sumoqq.today/
interqq
pionpoker
bandar ceme
freebet tanpa deposit
paito warna terlengkap
syair sgp
whatsapp groups
ReplyDelete1movies
ReplyDeletegomovies
ReplyDeleteNice article!!!!
ReplyDeleteweb design and programming courses
php institute in chennai
magento 2 course
movies whatsapp groups
ReplyDeletefb name stylish
ReplyDeletefb stylish name
stylish names on fb
facebook stylish name
stylish names for facebook
stylish names for fb
free netflix account
netflix accounts free
netflix premium account
netflix cookies
Netflix mod
Netflix mod apk
https://dtcbus.online/
ReplyDeletehttps://dtcbus.online/pass
https://dtcbus.online/route
https://dtcbus.online/download
funny WiFi names
ReplyDeletecool WiFi names
claver WiFi names
cool and claver WiFi names
funny WiFi names list
Good wifi names
wifi names 2020
Disney wifi names
wifi name for gamers
bollywood movies funny WiFi names
This is Very very nice article. Everyone should read. Thanks for sharing. Don't miss WORLD'S BEST GAMES
ReplyDeleteReally nice post. Thank you for sharing amazing information.
ReplyDeletePython training in Chennai/Python training in OMR/Python training in Velachery/Python certification training in Chennai/Python training fees in Chennai/Python training with placement in Chennai/Python training in Chennai with Placement/Python course in Chennai/Python Certification course in Chennai/Python online training in Chennai/Python training in Chennai Quora/Best Python Training in Chennai/Best Python training in OMR/Best Python training in Velachery/Best Python course in Chennai
Minecraft x-ray resource pack
ReplyDeleteSatta king 786
dhankesari
Filmyhit
Xray texture pack
xray ultimate texture packs
optifine hd mod
Naukar Vahuti Full movie download
Mission Mangal Full movie download
Filmyhit
ReplyDeleteteri meri jodi full movie download Filmyhit
section 375 full movie download Filmyhit
fauji di family full movie download
family 420 full movie download
Vipp2541
Filmyhit Download Hollywood Bollywood movies
Sanju Full Movie Download Filmyhit
Whatsapp Group Links
Whatsapp Group Links
Dr Driving is one of the my favourite game ever and today I am going to share Dr Driving Mod Apk
ReplyDeletehttps://www.drdrivingmodapk.xyz/
Whatsapp Group Link - 5000+ Updated Whatsapp Groups
ReplyDeletewhatsapp group link Click The link And Join Whatsapp New Groups, Dating, Business promositions Groups
Nice tips. Happy I've found this page.
ReplyDelete