IIS/Tomcat/Lucee How to reassign a host to a different site

136 views
Skip to first unread message

Alan S

unread,
Jun 12, 2016, 1:40:06 AM6/12/16
to Lucee
I am new to Lucee and haven't used Tomcat before.
I have set up IIS, tomcat, mod_cfml and Lucee. Everything looks to work. Adding new websites and bindings in IIS work as expected.

I want to have the ability to remove a binding from one website in IIS and assign it to a different website. By doing this, nothing changes until tomcat is restarted and mod_cfml recreates everything again.

I thought the solution to this was to use the tomcat host-manager to remove the affected host and then let mod_cfml rerun, taking into account the new changes.

This works and hosts and host aliases are properly redistributed or recreated but after removing a couple of hosts, the lucee server administrator main page throws this error.
Also, it seems that mappings stop updating when this happens. Mappings added, removed or changed from the web admin or application.cfc are ignored.

Is there a different / better way to edit bindings in IIS and have them correctly get to Lucee?

Lucee 5.0.0.252 Error (java.lang.IllegalStateException)

Message The resources may not be accessed if they are not currently started
Cause java.lang.IllegalStateException
Stacktrace The Error Occurred in
/Users/mic/Projects/Lucee/Lucee5/core/src/main/cfml/context/admin/overview.cfm: line 169
called from /Users/mic/Projects/Lucee/Lucee5/core/src/main/cfml/context/admin/web.cfm: line 389
called from /Users/mic/Projects/Lucee/Lucee5/core/src/main/cfml/context/admin/server.cfm: line 2
Java Stacktrace lucee.runtime.exp.NativeException: The resources may not be accessed if they are not currently started
  at org.apache.catalina.webresources.StandardRoot.validate(StandardRoot.java:245)
  at org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:212)
  at org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:206)
  at org.apache.catalina.core.StandardContext.getRealPath(StandardContext.java:4499)
  at org.apache.catalina.core.ApplicationContext.getRealPath(ApplicationContext.java:435)
  at org.apache.catalina.core.ApplicationContextFacade.getRealPath(ApplicationContextFacade.java:333)
  at lucee.runtime.net.http.ReqRspUtil.getRootPath(ReqRspUtil.java:513)
  at lucee.runtime.tag.Admin.doGetContexts(Admin.java:1202)
  at lucee.runtime.tag.Admin._doStartTag(Admin.java:758)
  at lucee.runtime.tag.Admin.doStartTag(Admin.java:336)
  at overview_cfm$cf.call(/Users/mic/Projects/Lucee/Lucee5/core/src/main/cfml/context/admin/overview.cfm:169)
  at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:893)
  at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:808)
  at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:803)
  at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:794)
  at web_cfm$cf.call(/Users/mic/Projects/Lucee/Lucee5/core/src/main/cfml/context/admin/web.cfm:389)
  at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:893)
  at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:808)
  at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:803)
  at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:794)
  at server_cfm$cf.call(/Users/mic/Projects/Lucee/Lucee5/core/src/main/cfml/context/admin/server.cfm:2)
  at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:893)
  at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:808)
  at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:803)
  at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:226)
  at lucee.runtime.listener.ModernAppListener.onRequest(ModernAppListener.java:103)
  at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2250)
  at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2242)
  at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2210)
  at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:846)
  at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:103)
  at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:62)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) 
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
  at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:872)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  at java.lang.Thread.run(Thread.java:745)
 Caused by: java.lang.IllegalStateException: The resources may not be accessed if they are not currently started
  ... 53 more
 
Timestamp 6/11/16 10:03:22 PM EDT

Jordan Michaels

unread,
Jun 13, 2016, 3:13:50 PM6/13/16
to lu...@googlegroups.com
I'm not sure if what you're wanting to do is currently possible. The host-manager application and mod_cfml only deal with in-memory variables in Tomcat, but Lucee may require some additional adjustments based on where it stores it's in-app variables. For example, when a new context is created, it's launched within Lucee and Lucee creates several files for it (including the WEB-INF directory and all it's related settings).

In order to do what you're wanting to do, you may need to also purge the WEB-INF directory as well as deal with some memory variables in Lucee. I expect it will require some experimentation on your part and even after some digging, might not currently be possible.

--
Kind regards,
Jordan Michaels
Vivio Technologies
*/Users/mic/Projects/Lucee/Lucee5/core/src/main/cfml/context/admin/overview.cfm:
line 169*
*called from*
/Users/mic/Projects/Lucee/Lucee5/core/src/main/cfml/context/admin/web.cfm:
line 389
*called from*
--
Win a ticket to dev.objective from Lucee via Twitter, see http://bit.ly/1UbTMWj for details, good luck and see you there...
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/511ab9fb-c2b1-419a-acc7-c20d934f5cd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alan S

unread,
Jun 15, 2016, 10:52:57 PM6/15/16
to Lucee
Ok, I'll just keep that in mind for now. It'd be nice to be able to rebind things with no restarts but that doesn't come up all too often.
Reply all
Reply to author
Forward
0 new messages