Highlighted

CF2018 internal server: how do I stop it on a Mac?

Explorer ,
Jul 30, 2019

Copy link to clipboard

Copied

I installed CF2018 and got it working. Now I'm wanting to switch over to an external web server and CF server for my dev work. However, I can not get the internal server to STOP! I open a Terminal window, go to the /Applications/ColdFusion 2018/cfusion/bin folder and run the command "./coldfusion stop" in the terminal. It says it is stopping, asks for a password (which is not clear WHAT pw it wants but I give it my Mac pw). It then says it's stopped or stopping.

Moments later its running again.

I can find NO help in the Adobe CF docs online that describe how to configure auto start and how to stop it on a Mac. I have a MacBook Pro and super frustrated that after stopping the internal server over and over and over, it spins right back up! Nothing explains how to stop it or manage it.

How does Adobe expect CF usage to grow when the docs are so deficient?

I am on MacBook Pro running OSX 10.14.5 Mohave

CF 2018 with internal web server

Adobe Community Professional
Correct answer by Charlie Arehart | Adobe Community Professional

While I don't use a Mac, I can offer a couple of thoughts that are generic and could help you.

I suspect the issue is really that during the CF installation you took the option offered to have CF auto-start. As such, it's running as a background service (in the generic sense), and when you stop it from the command line instead, the background service mechanism (which CF has enabled per the installation) is detecting that CF has "gone down" and is bringing it "back up".

This happens in Windows as well, and its as surprising to many there (that if the CF process is killed, dies, or is stopped at the command line, it comes right back up, at least until that Windows Service is stopped).

So you need to find the same in Mac OS, about how IT implements such an auto-starting process. As I look into things, I see that for many years it was managed by a Mac folder called /Library/StartupItems, and then it was changed to use  launchd (launch daemon) by way of /Library/LaunchDaemons. I see an older blog post discussing how to manage CF startup via StartupItems, and an SO question on how to manage CF startup via launchd​.

One last thing: in Windows at least, there is a coldfusionsvc in that same cf bin folder (where you did the coldfusion stop), and it can help manage the CF service that gets implemented--including both stopping AND removing it. If the same may exist on Mac OS, then that may be the best solution for you. If it does not, I hope the above may help you instead.

Let us know what works out for you, and I agree that all this could be better documented. Once you confirm what works, if no one from Adobe steps in here, this would be a good thing for you to open a ticket at tracker.adobe.com. They really do pay attention to those.

Views

321

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

CF2018 internal server: how do I stop it on a Mac?

Explorer ,
Jul 30, 2019

Copy link to clipboard

Copied

I installed CF2018 and got it working. Now I'm wanting to switch over to an external web server and CF server for my dev work. However, I can not get the internal server to STOP! I open a Terminal window, go to the /Applications/ColdFusion 2018/cfusion/bin folder and run the command "./coldfusion stop" in the terminal. It says it is stopping, asks for a password (which is not clear WHAT pw it wants but I give it my Mac pw). It then says it's stopped or stopping.

Moments later its running again.

I can find NO help in the Adobe CF docs online that describe how to configure auto start and how to stop it on a Mac. I have a MacBook Pro and super frustrated that after stopping the internal server over and over and over, it spins right back up! Nothing explains how to stop it or manage it.

How does Adobe expect CF usage to grow when the docs are so deficient?

I am on MacBook Pro running OSX 10.14.5 Mohave

CF 2018 with internal web server

Adobe Community Professional
Correct answer by Charlie Arehart | Adobe Community Professional

While I don't use a Mac, I can offer a couple of thoughts that are generic and could help you.

I suspect the issue is really that during the CF installation you took the option offered to have CF auto-start. As such, it's running as a background service (in the generic sense), and when you stop it from the command line instead, the background service mechanism (which CF has enabled per the installation) is detecting that CF has "gone down" and is bringing it "back up".

This happens in Windows as well, and its as surprising to many there (that if the CF process is killed, dies, or is stopped at the command line, it comes right back up, at least until that Windows Service is stopped).

So you need to find the same in Mac OS, about how IT implements such an auto-starting process. As I look into things, I see that for many years it was managed by a Mac folder called /Library/StartupItems, and then it was changed to use  launchd (launch daemon) by way of /Library/LaunchDaemons. I see an older blog post discussing how to manage CF startup via StartupItems, and an SO question on how to manage CF startup via launchd​.

One last thing: in Windows at least, there is a coldfusionsvc in that same cf bin folder (where you did the coldfusion stop), and it can help manage the CF service that gets implemented--including both stopping AND removing it. If the same may exist on Mac OS, then that may be the best solution for you. If it does not, I hope the above may help you instead.

Let us know what works out for you, and I agree that all this could be better documented. Once you confirm what works, if no one from Adobe steps in here, this would be a good thing for you to open a ticket at tracker.adobe.com. They really do pay attention to those.

Views

322

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 30, 2019 0
Adobe Community Professional ,
Jul 31, 2019

Copy link to clipboard

Copied

I'm not sure what you mean by "switch to an external web server and CF server". CF and your web server are separate services, and you're going to start and stop them separately. In addition, CF will attempt to restart itself automatically if it goes down, for your own benefit. This is intentional (and usually good) behavior. You can control it by looking at your cron jobs, I think, and modifying them accordingly.

If you mean, you want to stop the built-in web server that comes along with CF, you can do that by editing a text file (server.xml) which on your machine is probably in /opt/coldfusion2018/cfusion/runtime/conf. In there, there's some configuration options for enabling, managing and disabling the built-in web server. But ColdFusion itself is something you'd want to keep running with your external web server, unless there's something I'm missing here - which is entirely possible!

https://www.carehart.org/blog/client/index.cfm/2012/7/23/The-builtin-web-server-in-ColdFusion-10-ena...

In my own personal experience, the docs aren't really deficient, but they're "sparse". They expect that you know a certain amount about server management and so on, which you just might not know. It might be useful to describe in a little more detail what you're trying to do, so we can be sure we're understanding you correctly.

Dave Watts, Eidolon LLC

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 31, 2019 0
Adobe Community Professional ,
Jul 31, 2019

Copy link to clipboard

Copied

Funny: Dave and I were replying within minutes of each other.  I posted mine before seeing his.

Dave, I had the same concern from the OP's question, originally (thinking that he meant he wanted to "switch from the internal web server to the external web server"). But as I re-read it, I sensed it was instead about stopping CF on the local machine where he'd been testing and instead proceeding to use CF on an "external" machine. Subtle difference.

But that's indeed why I answered his question the way I did. We will see which he really meant, when he replies. 🙂

Finally, thanks for the reference to my post about the internal web server, Dave.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 31, 2019 0
Adobe Community Professional ,
Jul 31, 2019

Copy link to clipboard

Copied

I used your post because it was one of the first things that came up when I searched for "built-in web server ColdFusion". My memories of how to do this were a bit out of date as of ColdFusion 10. So, thanks!

Dave Watts, Eidolon LLC

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 31, 2019 0
Adobe Community Professional ,
Jul 31, 2019

Copy link to clipboard

Copied

While I don't use a Mac, I can offer a couple of thoughts that are generic and could help you.

I suspect the issue is really that during the CF installation you took the option offered to have CF auto-start. As such, it's running as a background service (in the generic sense), and when you stop it from the command line instead, the background service mechanism (which CF has enabled per the installation) is detecting that CF has "gone down" and is bringing it "back up".

This happens in Windows as well, and its as surprising to many there (that if the CF process is killed, dies, or is stopped at the command line, it comes right back up, at least until that Windows Service is stopped).

So you need to find the same in Mac OS, about how IT implements such an auto-starting process. As I look into things, I see that for many years it was managed by a Mac folder called /Library/StartupItems, and then it was changed to use  launchd (launch daemon) by way of /Library/LaunchDaemons. I see an older blog post discussing how to manage CF startup via StartupItems, and an SO question on how to manage CF startup via launchd​.

One last thing: in Windows at least, there is a coldfusionsvc in that same cf bin folder (where you did the coldfusion stop), and it can help manage the CF service that gets implemented--including both stopping AND removing it. If the same may exist on Mac OS, then that may be the best solution for you. If it does not, I hope the above may help you instead.

Let us know what works out for you, and I agree that all this could be better documented. Once you confirm what works, if no one from Adobe steps in here, this would be a good thing for you to open a ticket at tracker.adobe.com. They really do pay attention to those.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 31, 2019 0
Explorer ,
Jul 31, 2019

Copy link to clipboard

Copied

I apologize for not being more clear in what I was trying to do. I didn't think my intentions would matter for something that seemed should be straight forward.

Initially I downloaded the Mac version of CF2018 to my MacBook Pro laptop and installed it. I chose the internal server option and likely did set the auto-start probably because that would make sense... keep it running. But I didn't want to put projects inside the wwwroot but keep them external to the server, specifically in the cloud. I have my projects in Dropbox so they are accessible anywhere, on any computer/device and they get backed up. But that is where the challenge is. How do configure the internal CF server for that job.

I was able to achieve the handling of the source code being outside the webserver but for some odd reason I had issues with references. So I opted to use a Mac product I've used in the past with success years ago, called VirtualHostX by ClickOnTyler.com. They have since revised their methodology and now use a VM (Vbox) and Ubuntu OS inside. They do it without UI so all controlled by CLI. VHX is part of that download product and lets you easily configure multiple domains for your web server. But they don't know CF so I'm going through trying to make their product work with my source files in Dropbox.

In order to use their product I needed to install CF2018 Linux version inside the Vbox that has Ubuntu running inside it. I got the Linux bin downloaded and moved into the Vbox and installed it using the CLI. That all went fine. Then trying to get CF there to work I started running into the realization that my pages were actually being served up by my previous internal web server. So then arose the need to shut it down so I could focus on the Vbox CF. I would uninstall the internal CF but didn't want to until I verified that the VHX product was going to meet my needs. So I just wanted to shut it off till then. That's when I found I couldn't.

SOLUTION:

Even though Charlie called it an older blog post it still works for Mac OSX Mohave:

https://robertmunn.com/blog/prevent-cf-10-autostart-on-os-x-mavericks

What it describes for stopping the auto-restart worked. Actually I just renamed the folder /Library/StartUpItems/ColdFusion2018 and then went back to /Application/ColdFusion2018/cfusion/bin and did the "coldfusion stop" command again and this time it has truly stopped!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 31, 2019 0
Adobe Community Professional ,
Aug 01, 2019

Copy link to clipboard

Copied

I'm glad to hear that my proposed solution worked for you, and thanks for marking at as "the answer" so that it might help others.

And though I should just leave it at that, I can't help but want to reply to the rest of what you said.

1) First, it sounds like you WERE in fact conflating matters of the startup of CF and the use of the internal web server. 🙂

Let's be clear (if it may be helpful): the two are separate. You could have CF running, and tell it NOT to enable the built-in web server, if you really wanted to (there is an xml element in the CF server.xml file, discussed in the blog post of mine that Dave linked to, and posts I point to in that with still more detail).

And when you were trying to solve your problem of a challenge serving CF pages stored in someplace other than the CF wwwroot, there are in fact alternative solutions to that.  One is that you CAN define virtual directories in that internal web server (the Tomcat web server), and again my post and others I point to discuss that. The other is that you could implement an external web server, like Apache, nginx, or IIS (on Windows only, of course). And then THAT web server points to wherever the files live, and it passes the request into CF to run the file.

But again, it seems you are happy with the ability to turn off CF, which is part of what you asked.  I just thought that extra info may help you or other readers.

2) Finally, as to how you started your last comment, I hope you might now see why the "intentions" behind your question do matter. 🙂 And the reason why things that may not seem "straightforward" could be because of the perspective from which you are approaching them.

To be clear, folks like Dave and I (and several others here) are just trying to help, in watching these forums and answering questions all day each day. We do have to sometimes try to decipher folks real intentions, and their perspectives, to give them the answer they may need. Which may mean we either guess one way (like Dave did) or another (like I did).

And it may seem to some that we are being pedantic or nit-picking, in pressing for or offering clarifying details. I wonder if they may not be keeping in mind that again we're simply trying to help. We're not paid by Adobe. We're here to support the community--and not just the person asking the question but others who may read these threads. We often see comments popup years later on some post, so people do find them long after they are written.

And some don't like how I in particular can be excessively verbose. But it comes from having helped so many people, for so many years, and watched so many forum threads, that I've taken the approach that it's better to be clear and try even to anticipate sometimes the question "not being asked", rather than to offer a twitter-style answer which may leave some readers possibly misled or misinterpreting. That said, I'm not knocking at all others who CAN answer more succinctly (like Dave). Just explaining why I tend not to.

And yep, this is now off-topic from the post, but again I am addressing that start of your comment, and also putting this out there for others who may see it, whether regarding this thread or others. Certainly no offense intended toward you, teaman.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 01, 2019 0
Explorer ,
Aug 02, 2019

Copy link to clipboard

Copied

Charlie, I very much appreciate your clarity and verboseness. Succinct and clear is an art that rarely go together. So if given the choice I'd prefer the verbose and clear over succinct and still left with questions in mind.

I do know web servers and CF servers are not the same thing. But configuring web servers is not my forte. Configuring how to make one work with the other is not obvious to me. Instructions usually give you... here's your web server, here's the CF server, here's your webroot, go forth and develop. But I wanted to say, not I don't want my source files there, so now what? Where's the docs for that? No I don't want my domain to always be localhost as I may have several projects. Where's the instructions for that?  That sort of thing.

BTW my friend was showing me commandbox (by same people making coldbox) and it looks like it's pretty slick for setup of dev environment perhaps. Will try to check that out someday if this VHX thing doesn't work for me.

Yes I agree my intentions did matter in this example post.

Thanks again for ALL your help!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 02, 2019 0
Adobe Community Professional ,
Aug 02, 2019

Copy link to clipboard

Copied

I think there are multiple challenges reflected in your concern. First, there are literally thousands of pages of CF docs, spread across several manuals. (Many think there is only the CFML Reference, but that's definitely not so.)

Another challenge is that the Adobe web site UI for displaying docs was designed for products whose docs go no more than about 2 levels deep in sections/subsections. But many of the CF docs (having been created initially 20 years ago) often go 4 or more levels deep. So even if you may google and find a page that seems JUST what you need, it may be just the first page of what has subsections to follow--but you will not see ANY means to move to that next "page", so you are left thinking "CF doesn't document how to do x", even when they may--voluminously.

Sadly there's not much we can do about that problem. There was a time when the complete PDF of each doc was made available, but that stopped at CF11--related to the Adobe doc UI change, that was mandated for all Adobe products--and again there is nothing we can do about it.

And so that's why we have this proliferation of other content, blog posts, forum threads. And as for configuring the CF web server, Dave had pointed to the post I had done--and in that post you will see MANY comments where people ask the sort of questions you're asking.

Further, some aspects are covered by the Adobe blog post (which preceded mine) that I posted to. Finally, both their and my post point to the Tomcat docs for still more.

This is another challenge for Adobe: how much do they repeat in their docs what is covered in Tomcat's docs, especially when in this case the built-in web server is in fact the Tomcat one.

Finally, still another is that they may presume that most people WOULD front CF with an external web server (IIS, Apache, nginx), in which case the steps change quite a lot--and vary by each, and perhaps even over time with their different versions.

Could the document still more? Sure. Could the address more specifically and better the kind of getting started topics you propose? Sure. And they even have getting started resources (google: coldfusion getting started).

As you can imagine, they have to decide what does and does not make sense what to include. Sadly, they will never please everyone.

And so we're back to what I've said: for some topics, it simply is best to rely on secondary resources: blog posts, these forums, etc.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 02, 2019 0