PDA

View Full Version : Can't use INWEB prototype appliance in more than one app simultaneously


PeterNic
03-13-2007, 08:02 PM
The INWEB appliance included in the AppLogic 1.2.14 prototype catalog allows web applications using the http protocol to capture the real IP address of the client requesting web pages (via the X-Forwarded-For http header field).

The appliance works quite well (even though it is a prototype). However, on attempt to start a second application that uses an instance of this appliance, the second app fails to start (insufficient resources; log shows unable to create a mount for INWEB's instance volume).

The reason for this is that the INWEBs common class volume is not correctly marked as shared and read-only (we were fixing the appliance and forgot to restore the read-only/shared flags). Here is how you can fix this on your grid:


Stop the application that is successfully using the INWEB appliance (let's call this MyApp).
Edit MyApp with the editor (or create a blank application and put an instance of INWEB in it).
Branch the INWEB appliance (right-click on the icon on the canvas, Branch Class). This will make a private copy of the INWEB appliance that you can modify.
Edit the class volumes (right click on the icon on the canvas, Edit Class, select Volumes tab)
Select the "usr" volume of type Common and make it read-only and shared (see AppLogic's Class Editor documentation -- press Help from the class editor property sheet). Close the class editor with OK.
Save the application. Select the "prototype" catalog.
Drag the INWEB appliance from the application canvas into the catalog. This will replace the INWEB catalog appliance with your updated and improved class. Save the app and close the editor.
Restart your application (MyApp) (make sure you don't specify the --skipbuild option; you want the application to be rebuilt!)


Now you can create as many apps using the INWEB appliance as your heart desires (and your grid has resources for :))

Regards,

-- Peter