Has anyone experienced oddities with remote proxies while using Railo gateways? I can’t tell if I’m crazy and I’m configuring the application wrong or there is a bug. I’ll try not to make this post too long.
In my very basic test, using Railo’s WebSocket:
- I create a Railo site/context
- Create a very simple CB application with a remote proxy, inside the proxy I use announceInterception inside every method (onClientOpen,onClientClose,onMessage)
- I do not init the application by pointing my browser to it
- Inside the Railo admin, I create mappings to the application, create the WebSocket gateway, point the listener to the CB remote proxy in Step 2
- Try to start the gateway.
Right off the bat this happens (line #55 of Application.cfc is onApplicationStart()):
invalid component definition, can’t find component [railo.extension.gateway.config.Coldbox];
at system.web.config.applicationloader_cfc$cf.udfCall1(/coldbox/system/web/config/ApplicationLoader.cfc:76):76
at system.web.config.applicationloader_cfc$cf.udfCall(/coldbox/system/web/config/ApplicationLoader.cfc):-1
at system.web.services.loaderservice_cfc$cf.udfCall(/coldbox/system/web/services/LoaderService.cfc:28):28
at system.bootstrap_cfc$cf.udfCall1(/coldbox/system/Bootstrap.cfc:71):71
at system.bootstrap_cfc$cf.udfCall(/coldbox/system/Bootstrap.cfc):-1
at application_cfc$cf.udfCall(/Application.cfc:55):55
at admin.services_gateway_cfm414$cf.call(/railo-context-compiled/admin/services.gateway.cfm:13):13
The gateway tries to init the application, the application tries to bootstrap coldbox, then the application fails to find my apps Coldbox.cfc config. If I understand the underlying cause correctly this means the context it’s running in is Not in my applications root directly, but instead /railo/extensioin/gateway/. I tried to fix this by using COLDBOX_CONFIG_FILE which ‘seemed’ to have some effect, but not enough.
After changing COLDBOX_CONFIG_FILE to “mymapping.config.Coldbox”, the same thing pretty much happened but instead for the Cachebox config:
invalid component definition, can’t find component [railo.extension.gateway.config.CacheBox];
at system.cache.config.cacheboxconfig_cfc$cf.udfCall1(/var/www/ColdBoxBE/system/cache/config/CacheBoxConfig.cfc:47):47
at system.cache.config.cacheboxconfig_cfc$cf.udfCall(/var/www/ColdBoxBE/system/cache/config/CacheBoxConfig.cfc):-1
at system.web.services.loaderservice_cfc$cf.udfCall(/var/www/ColdBoxBE/system/web/services/LoaderService.cfc:144):144
at system.web.services.loaderservice_cfc$cf.udfCall(/var/www/ColdBoxBE/system/web/services/LoaderService.cfc:48):48
at system.bootstrap_cfc$cf.udfCall1(/var/www/ColdBoxBE/system/Bootstrap.cfc:71):71
at system.bootstrap_cfc$cf.udfCall(/var/www/ColdBoxBE/system/Bootstrap.cfc):-1
at application_cfc$cf.udfCall(/var/www/network.sigmaprojects.org/Application.cfc:56):56
This was harder to ‘fix’ since there is no config option in plain sight. Since my Coldbox.cfc config was working, I created a key called Cachebox and duplicated what it expected (since the LoaderService calls controller.getSetting(“cacheBox”), I can explicitly set it)
Then that got ‘fixed’, but the same thing happened again for Wirebox.
Now before anyone says the obvious “If you start the application via a http get and it works, make sure to do that”… There are a slew of different problems that come up when the Application times out.
Long story short:
Am I missing a config option somewhere to let the application know what context/directory it’s supposed to run in when starting the application from a CB remote proxy request?