CF911: CF pages get "no web application configured", but CF's "running"
Note: This blog post is from 2009. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.If you find you can't run CF pages (they get "There is no web application configured to service your request") but CF seems to be "running", here's one possible explanation and how to diagnose/resolve the problem.
The problem outlined here has to do with being careful when you're modifying CF to enable/disable RDS (or doing any edits in the [cf]/wwwroot/WEB-INF/web.xml file that controls it.) This applies to CF 6, 7, or 8.
Of course, you may have a different cause for this kind of error. The focus here is this one cause and solution, but I hope that the information shared here on diagnosing the problem may help you if you've got a different problem.
The problem and solution
As many know, enabling/disabling RDS involves removing or adding comments around some XML entries, as explained in this technote.
After making the edits, though, you may find that you get this error when trying to run any CFML pages:
There is no web application configured to service your request"
What happened is you made a mistake I did. I had RDS enabled, so I wanted to disable it, which meant adding comments.
Don't do this
So I modified the XML entry from this:
<servlet-mapping id="coldfusion_mapping_9">
<servlet-name>RDSServlet</servlet-name>
<url-pattern>/CFIDE/main/ide.cfm</url-pattern>
</servlet-mapping>
<!-- end RDS -->
to look like this:
<servlet-mapping id="coldfusion_mapping_9">
<servlet-name>RDSServlet</servlet-name>
<url-pattern>/CFIDE/main/ide.cfm</url-pattern>
</servlet-mapping>
<!-- end RDS --> -->
That won't work. The problem is that my comment surrounds the section of XML which also includes an existing commented line.
Do this
So the solution is to do something like this instead:
<!--
<servlet-mapping id="coldfusion_mapping_9">
<servlet-name>RDSServlet</servlet-name>
<url-pattern>/CFIDE/main/ide.cfm</url-pattern>
</servlet-mapping>
-->
<!-- end RDS -->
I've only commented out the significant XML entries, not the comment that preceded it. There's a second entry that needs to be commented out as well, as discussed in the technote.
Also, note that you'd get the same error if you mistakenly use CFML comments (three dashes) rather than HTML comments (2 dashes). It's easy to do if you happen to edit the XML file in a CFML editor. I've confirmed it gets the same error indications above.
Diagnosing and resolving this and similar errors
That's the problem and solution. But how did I know that was the cause of the problem. It wasn't as obvious as it may seem.
It seems that CF *is* running--but no, JRun is
As the title of this entry (and the error message above) indicates, the problem was that CF was reporting that there was "no web application configured". Well, it's not really CF reporting that. It's JRun.
Indeed, in this situation one would notice that the jrun.exe process is running, but no CF pages would run.
There's no error reported in the CF/logs
So you may be tempted to look in the CF logs (such as C:\ColdFusion8\logs) but you'll find nothing. In fact, you may note that the logs are not even updated with the time that you had started CF.
The thing is, CF never really started. JRun did, yes, but the CF web application itself (within JRun) did not.
The real diagnostic info is in the Runtime logs
You can see this more clearly if you look instead in the "runtime" logs, which if you run the Server version of CF are in [cf]\runtime\logs\. (If you're running the Multiserver mode or what some call multiple instances, they're in jrun4\logs.)
In the coldfusion-out.log file (or the corresponding -out.log file for whatever instance is failing, if you're running multiple instances), you may see something like this error:
[1]org.xml.sax.SAXParseException: Next character must be ">" terminating comment .
Sure enough, line 333 was where I had made my edit to the first of the XML entries discussed above.
This was followed by other messages (along with lots of stack tracing info to wade through):
error Deployer Service failed to deploy file:/C:/ColdFusion8/
* Could not deploy web application at file:/C:/ColdFusion8/wwwroot/.
* Failed to parse XML: file:/C:/ColdFusion8/wwwroot/
* null
finally showing (after still more stack tracing info):
Again, we can be mislead by that, thinking, "ok, CF is up". But no, it's just saying that the JRun server named "coldfusion" (or whatever instance you may be running) had started, but the web app for CF itself did not deploy, as the previous error message above showed.
So the moral of the story is to be careful when editing these (and any) XML files.
Side note on RDS
I'll add a note that one other reason people don't use RDS is because it relies on a single password to be shared by all who would use it. Yes, I realize there's still more to the security concerns. Anyway, if that's the most significant issue for you, there's a new feature in CF 8 Enterprise to address that, in the new option to enable multiple different user accounts for both the Administrator and RDS.
And in fact, I just did an Adobe DevCenter article introducing this feature at length (and I point to more about the other security concerns to consider before enabling RDS.) It's supposed to be coming out later today (at 4pm eastern), and I would assume it will be at the CF dev center.
For more content like this from Charlie Arehart:Need more help with problems?
- Signup to get his blog posts by email:
- Follow his blog RSS feed
- View the rest of his blog posts
- View his blog posts on the Adobe CF portal
- If you may prefer direct help, rather than digging around here/elsewhere or via comments, he can help via his online consulting services
- See that page for more on how he can help a) over the web, safely and securely, b) usually very quickly, c) teaching you along the way, and d) with satisfaction guaranteed
best regards,
bill
I wonder if by "log entries being the same" you may have been referring to the error message shown to the user, because the message I pointed to (in the runtime/logs) clearly pointed to an XML problem.
You're not saying that you got THAT error in the runtime logs, are you? I just don't see how that would be solved by an account permission correction.
Indeed, the real point of the blog entry was to point people to the runtime logs to find the root cause. I'd be curious what yours reported, as much to help others who may then find that and search for a solution, in which case they may find this and your helpful observation. To that point, can you clarify what permission you defined for the user, in case it's significant?
I'll say also that did say at the outset that I was offering *one possible explanation* for the general problem of the "no web application configured" error. I don't mind if others may share more observations of other reasons and solutions. But along the lines of the above, I'd say it would be helpful to provide what the key runtime error log message was so people can really connect the dots.
Looking forward to your update, Bill, if you still have the info at hand.