Search


Monday, November 14, 2011

Railo Adminstration


                                     Railo and Flex2gateway


Railo autoinstaller download link:-

http://railo.viviotech.net/


The package install railo/tomcat. You can connect Railo with apache during the railo installation, then mod_jk will be enabled by default. Once the setup has finished successfully, please verify the mod_jk configurations are added to apache configurations. The following configurations are necessary.

 <IfModule !mod_jk.c>
    LoadModule jk_module [modules directory]/mod_jk.so
 </IfModule>

 <IfModule mod_jk.c>
    JkMount /*.cfm ajp13
    JkMount /*.cfc ajp13
    JkMount /*.do ajp13
    JkMount /*.jsp ajp13
    JkMount /*.cfchart ajp13
    JkMount /*.cfm/* ajp13
    JkMount /*.cfml/* ajp13
    Flex Gateway Mappings
    # JkMount /flex2gateway/* ajp13
    JkMount /flashservices/gateway/* ajp13
    JkMount /messagebroker/* ajp13
    JkMountCopy all
    JkLogFile [log directory]/mod_jk.log
 </IfModule>


Starting and Stopping Railo

#/etc/init.d/railo_ctl  start
#/etc/init.d/railo_ctl  stop



Railo administrator

There are two kinds of adminitrations. The Railo Server Administrator and the Railo Web Administrator. The Web Administrator defines local Settings for a web and the Server Administrator the global default values. In addition the Server Administrator allows you to set authorizations for the Web Administrator of all single webs.
In here global services like mappings, customtags, datasources etc. can be defined globally so that all webs have access to them. Each account gets its own web  administrator interface which he can access to turn on debugging / manage datasources / mapping. The following are the URLs for accessing the railo administor page:-

Server Administrator: http://<hostname or IP>/railo-context/admin/server.cfm
Web administrator: http://<hostname or IP>/railo-context/admin/web.cfm


Enabling railo services to new sites


Railo do not allow automatic support for the domain created by control panels kile cpanel and kloxo, You need to edit Tomcat's server.xml file for this. The default location of the file is  /opt/railo/tomcat/conf/server.xml
Add following code in to server.xml file

    <Host name="[ENTER DOMAIN NAME]" appBase="webapps"
             unpackWARs="true" autoDeploy="true"
             xmlValidation="false" xmlNamespaceAware="false">
             <Context path="" docBase="[ENTER SYSTEM PATH]" />
             <Alias>[ALTERNATE DOMAIN NAME]</Alias>
        </Host>

where docBase is the full system path to the webroot of the domain. Once you've updated your server.xml file, restart Tomcat/Railo.


BlazeDS


Railo 3.x comes with BlazeDS 3.2, the Adobe opensource amf engine to communicate from a Flex application to a Java backend. However we may need to modify some tomcat configurations files to get it work.


#1. Updating the web.xml file

/opt/railo/tomcat/conf/web.xml

Uncomment the following the web.xml if present or add the details to web.xml file.

        <!-- Load the MessageBrokerServlet  -->
    <servlet>
        <servlet-name>MessageBrokerServlet</servlet-name>
        <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
        <init-param>
            <param-name>services.configuration.file</param-name>
            <param-value>/WEB-INF/flex/services-config.xml</param-value>
        </init-param>
        <init-param>
            <param-name>messageBrokerId</param-name>
            <param-value>MessageBroker</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

          <!-- The mappings for the Flex servlet -->
    <servlet-mapping>
        <servlet-name>MessageBrokerServlet</servlet-name>
        <url-pattern>/flex2gateway/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>MessageBrokerServlet</servlet-name>
        <url-pattern>/flashservices/gateway/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>MessageBrokerServlet</servlet-name>
        <url-pattern>/messagebroker/*</url-pattern>
    </servlet-mapping>


#2. Updating the uriworkermap.properties file

/opt/railo/tomcat/conf/uriworkermap.properties

Uncomment the following the web.xml if present or add the details to web.xml file.

/*.cfm=ajp13
/*.cfc=ajp13
/*.cfml=ajp13
/*.cfres=ajp13
/*.cfchart=ajp13
/*.cfm/*=ajp13
/*.cfml/*=ajp13
/*.cfc/*=ajp13
/*.jsp=ajp13
/*.do=ajp13
/=ajp13
/flex2gateway/*=ajp13
/flashservices/gateway/*=ajp13
/messagebroker/*=ajp13
/=ajp13


Once you've updated Tomcat configuration files, restart Tomcat/Railo.


Verify the flex connection is working

Browse to  http://<IP ot domain name>/flex2gateway/  you should get a white page, if you get an error message, this would mean that either you server is not running, the MessageBroker Servlet is not running or there are some configuration mistakes.


Troubleshooting 404 error

1. Apache 404 error

Please understand that if the URL you're using is this: http://mydomain/flex2gateway , then all your mappings should look like
/flex2gateway*=ajp13
There must no trailing slash on either of them.

Also verify the server.xml is updated correctly to point the webroot of the domain.

2. Tomcat 404 error

The reason mostly is Tomcat servlet "MessageBrokerServlet" is unavailbale or not loaded. In that case please verify the tomcat configuration files are updated correctly as mentioned above. Also verify tomcat log files to find out why "MessageBrokerServlet" is not loaded. Sometimes you may need to comment "MessageBrokerServlet" in other web.xml.

Tomcat log file location:- /opt/railo/tomcat/logs/

ps: You need to restart railo/tomcat if you made any changes to tomcat configuration files.

 Railo memory configuration file /opt/railo/tomcat/bin/setenv.sh. This file defines the virtual memory limit for railo service. Commenting out the lines will fix the memory issue

http://www.tomcatexpert.com/blog/2011/11/16/setting-measurement-garbage-collection-apache-tomcat

http://www.tomcatexpert.com/blog/2011/11/22/performance-tuning-jvm-running-tomcat




Configuring SES URL's for Railo For Mura / Mango Blog

Railo http://www.viviotech.net/forum/viewtopic.php?f=5&t=588 

No comments:

Post a Comment