Confused and Frustrated

I installed lucee locally on my laptop and had no issues. I now have enough done on this project and am ready setup a live server on our internal network (not accessible from the outside). It’s an older server, 2008 R2 with IIS installed.

Now, as I understand it, Lucee needs IIS and that it can’t/shouldn’t be run using just tomcat (first confusion, why?). If you tackle this answer, please keep it high level.

Locally, I wasn’t using IIS, just the default lucee installation with the document root under C:\lucee\tomcat\webapps\ROOT. I was able to development, restart apache tomcat as needed, no issues. I could access my project as well as the Lucee Admin. Life was good.

Now on with the frustration part, the server…

I have lucee and iis installed and working or so it seems on the Windows Server 208 R2 dev server. When I RDP to the server, I can browse localhost OR the url project.server.com:8888 and the page will come up. However, I cannot access the URL from my laptop, the connection never completes. PING returns just fine. I’ve tried setting up a host entry locally just in case and the DNS server has an entry as well - neither appeared to help. I have added a context entry in server.xml (code snippet further down). If I stop either IIS or Tomcat service, the “hello world” index.cfm will not display (as expected). When both services are running, the page will display again (as expected) - again, the page is only viewable when viewed on the sever using RDP. Now the part I also find odd (though I understand because which ever starts up first will grab port 8888) is I can view my demo page OR the admin area depending on which service I start first. To see the admin, I have to start tomcat first. To see my demo page, I have to start IIS first. There does not appear to be any ports blocked. NOTE: I am not using port 80 but rather 8888. There are other sites being served that are using port 80 and I don’t want to interfere with them. The other sites are using apache 2.xx and running off of cf2012. Those sites are working just fine.

What am I missing that is preventing the lucee project from being displayed?
My connector (I don’t understand why the redirectPort is 8443 here):

<Connector port="8888" protocol="HTTP/1.1" 
       connectionTimeout="20000" 
       redirectPort="8443" 
       URIEncoding="UTF-8" />

My Host entry

	<Host name="project.devserver.com" 
		appBase="webapps"  
		unpackWARs="true" 
		autoDeploy="true"  
		xmlValidation="false" 
		xmlNamespaceAware="false">  
		<Context path="" docBase="C:\websites\project" />  
		<Alias>project.devserver.com</Alias> 
	</Host>

This should be a pretty straight forward setup but I’m missing something. Any tips?

Follow up question:
If I am using IIS, do I even need a server.xml entry in tomcat?

Not my image below but this is how I understand the workflow…
IIS_Tomcat

the reason why we don’t recommend directly exposing tomcat is more about flexibility and being able to use the full range of config a real webserver offers. you can do it, but we just don’t recommend it.

if you use mod_cfml, you can add the proxypass inside the virtual host entry in apache, then ACF and Lucee can both co-exist under the same apache instance. You don’t need to touch server.xml after you install mod_cfml.

if Tomcat and IIS are both listening to the same port, which ever starts first will prevent the other process from starting coz it can’t bind to that port .

Windows 2008 R2 is End of Life on January 14 of next year.

I recommend installing Lucee on a CENTOS (LINUX) box or a newer version of Windows.

Zac,

The flexibility makes perfect sense to me. Thanks for keeping it simple. :slightly_smiling_face:

I selected mod_cfml during the install but I thought that was more for IIS purposes so I’ll need to read up on mod_cfml as well as proxypass.

I understand about the port and which one starts up first grabbing the port (thank you skype for teaching me that valuable lesson) but how do I set this up so that I can access either the demo site or the admin site? I shouldn’t have to juggle the services in order to make an admin change unless there is a bigger picture here that I’m overlooking (e.g. security).

Terry_Whitney,

This is a skunkworks project so my options are limited and I have to use what’s available. I would love to try out CENTOS. I’m sure we can look into that if this project pans out (fingers crossed!)

Well I am sorry to hear that.

As with Zac’s suggestion, I would recommend configuring this with Apache for windows and mod_jk or mod_cfml. It will afford you, or the client at least more time to modernize as well have a lessor impact on system resources.

dlackey:

your principal issue seems to be that you have already ACF 2012 running on the same machine:
The other sites are using apache 2.xx and running off of cf2012
The ACF install is intrusive and blocking. It will intercept all calls and you cannot just install lucee defaults. They will not work side-by-side in this fashion.
Nonetheless, all can be configured to work together nicely, but that will require quite a bit of doing and nothing out of the box stuff.
You will have to:
a) remove ACF connector
b) add BonCode for ACF sites and configure it manually
c) install lucee (without IIS support)
d) add connector support for lucee site manually

If you do not need to use IIS, which you seem to indicate, I would recommend you just stick with Tomcat as your webserver. Just install lucee without IIS support and things should work on port 8888 just like on your laptop.

Remember to open port 8888 on server firewall to inbound traffic so you can access it from other machines on the network.

HTH,
Bilal

@dlackey The main reason I run a web server such as IIS, Apache, or Nginx in front of CF is to offload the traffic of static assets like images, JS, and CSS. I’ll often times do rewrites there as well. Nginx also has some very nice load balancing stuff, but I don’t use that any longer now that we’ve moved to Docker Swarm.

A traditional Lucee installation is a great solution, but also consider looking at using CommandBox for either your local setup and/or production servers. CommandBox is a CLI that can start up any CF engine (Adobe, Lucee, etc) without any installation per se and makes upgrading easier as well as consolidating all your server settings in a single JSON file. Couple it with CFConfig and you can script an entire server setup in a couple steps. Disclaimer, I’m the lead developer on CommandBox so I’m quite experienced but also a little biased. I have a screencast on setting up Boncode with CommandBox here:

I’ve set up production VMs for clients and scripted the entire thing using Boncode’s silent installer, appcmd.exe for all the IIS config and CommandBox and it’s related JSON files.

@Bilal

You make an excellent point about not really needing iis for this project. And it’s on a local intranet and we are a small staff.

@bdw429s
I was truly hoping you’d chime in here (with Commandbox). I toyed around with commandBox and probably just need to gain some more experience/exposure. I’m typically comfortable with command line (remember autoexec.bat and config.sys trying to get games to work anyone?) but for some reason, I’m just having a mental block on what is happening when I fire up CommandBox.

The first time I experimented played with CommandBox a few months ago I had so many questions - I watched several CommandBox youtube videos but they typically only cover how to get it running but I needed more “X” I just haven’t figured out what “X” is just yet so it’s difficult to ask a question you can’t quite put your finger on. Therefore I decided to table it and come back to it and try again later. Often times when I come back to a problem, I have a since of clarity that I did not have the first time around.

I’ll definitely watch the screencast.

@dlackey have you read the CommandBox docs? They cover nearly ever feature of the CLI and are a pretty quick read with tons of examples.

For any questions left after you finish the “Embedded Server” question, you can post in the #box-products channel of the CFML Slack team and get near real-time answers from the community.

https://cfml-slack.herokuapp.com/

CommandBox uses JBoss Undertow for the servlet container as well as the web server and it’s very lightweight and fast. I’ve done a few load tests comparing Apache, IIS, and CommandBox servers serving up static files like JS and the throughput is identical. With CommandBox you get URL rewrites, basic auth, SSL/HTTP/AJP, full control of your JVM, JDK, and drop in modules for fusionreactor or hosts file updates all in a single JSON file.

I did read the docs but so much didn’t “stick” I’ll need to read again.

Wow, you make it look so easy! :slight_smile: I’ll need to go back and rewatch it but very informative, thank you. I’m going to watch the one for setting it up as a windows service as well.

I’ve joined slack and the #box-products channel. Now you wont be able to escape my questions :stuck_out_tongue_closed_eyes:

1 Like

Oh hell yeaaah!!! You just made me remember opening boxes in order to set up interrupts on sound- & network-cards by changing that tiny little jumpers manually to remove conflicts! Hahahhaah That was way back before USB!!! Haahahah

1 Like

OMG I forgot about those little jumpers! Kids these days don’t know how easy they have it!

After reviewing countless settings, “stuff” kept pointing to a firewall issue. I submitted a new ticket to open port 8888. The server ops confirmed port 8888 was being blocked and have now unblocked it. I guess the previous request to open the port didn’t save the firewall rule? Who knows but I can now access the Lucee instance (using Tomcat for now). Yay!

I’m actually happy the original request wasn’t completed correctly because their mistake brought me back to looking at CommandBox again and also got me to join #Slack.

Great news, my skunkworks project was approved by my manager and I get to present it to his boss soon! So stoked!

My boss’s exact words were, “This is pretty stinking cool!”… said it multiple times. :smiley:

3 Likes