6 Replies Latest reply on Mar 20, 2010 12:38 PM by glen08

    Install and run blazeds-turnkey-3.2.0-3978 in Tomcat on Linux

    glen08 Level 1

      I Installed and ran the  blazeds-turnkey-3.2.0-3978 distrubution in Tomcat 5.0.27 with JVM  1.5.0_22 in my laptop (Window Vista Pro) successfully.

      Blazeds, ds-consolo, and  samples applications are working fine. I'm not using  Flex Builder for this. The ds-consolo and samples are

      accessed  through http://localhost:8080/ds-consolo and http://localhost:8080/samples.  I did not change any of the configuration files

      (service-config.xml,  ...) in the distribution package.

       

      Now I try to Install and run the same  blazeds-turnkey-3.2.0-3978 distrubution with the same Tomcat 5.0.27 with  JVM 1.5.0_22 in a remote Linux server.

      I changed the configuration  files as following:

       

      For blazeds application, I changed the parameters in all  the configuration files under WEB-INF/flex in following way:

      {server.name}:{server:port}  to xyz.com   (xyz.com is the domain name, and we use default port 80).

      {context-root}  to blazeds

       

      For ds-consolo application, I changed the  parameters in all the configuration files under WEB-INF/flex in  following way:

      {server.name}:{server:port} to xyz.com   (xyz.com  is the domain name,  and we use default port 80).

      {context-root} to  ds-consolo

       

      For samples application, I changed the parameters  in all the configuration files under WEB-INF/flex in following way:

      {server.name}:{server:port}  to xyz.com   (xyz.com is the domain name,  and we use default port 80).

      {context-root}  to samples

       

      It seems they were all deployed to the Tomcat OK,  but when I tried to run the ds-consolo and samples apps, I got

      errors.  Did I set the parameters in the configuration files, especially {context-root}, correctly? Am I  missing anything?

        • 1. Re: Install and run blazeds-turnkey-3.2.0-3978 in Tomcat on Linux
          levancho Level 3

          what errors did you get?

           

          you need to change tomcats server.xml file to listen on  80 instead of 8080,

          but since port 80 is provileged port then you have to start tomcat as root, but you probably doing that anyways.

          • 2. Re: Install and run blazeds-turnkey-3.2.0-3978 in Tomcat on Linux
            glen08 Level 1

            This is the error message:

             

            Please restart the application since polling has stopped due to the following error: [FaultEvent fault=[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://xyz.com/ds-console/messagebroker/amf'"] messageId="04177F6D-82C3-F72B-AC82-7BC36A91E267" type="fault" bubbles=false cancelable=true eventPhase=2]

             

            But I know the app has been restarted.

            • 3. Re: Install and run blazeds-turnkey-3.2.0-3978 in Tomcat on Linux
              levancho Level 3

              Hi,

              can you type this in browser: http://xyz.com/ds-console/messagebroker/amf

              you should get completely blank response, if you get 404, or error that means messagebroker servler has not beening deployed, and you should look into tomcats logs its under tocat/logs directory it will have some more information regarding that, I suspect tomcat is not able to bind to 80.

              • 4. Re: Install and run blazeds-turnkey-3.2.0-3978 in Tomcat on Linux
                glen08 Level 1

                http://xyz.com/ds-console/messagebroker/amf


                gives me a completely blank page. There is nothing in page source also.

                • 5. Re: Install and run blazeds-turnkey-3.2.0-3978 in Tomcat on Linux
                  levancho Level 3

                  have you updated BlazeDS applications  config xml files, they must have 8080 still hardcoded in them? or have a  :{server.port}  you can take that peice out since you are using default port.

                  they are under WEB-INF/flex directory

                  that might help

                   

                  BTW there are two apps ds-console and blaze ds both have their own config file.

                  • 6. Re: Install and run blazeds-turnkey-3.2.0-3978 in Tomcat on Linux
                    glen08 Level 1

                    If it is caused by a wrong port, I should get an error message or timeout.

                     

                    This is the services-config.xml file I'm using for Blazeds app

                     

                    <?xml version="1.0" encoding="UTF-8"?>
                    <services-config>

                        <services>
                            <service-include file-path="remoting-config.xml" />
                            <service-include file-path="proxy-config.xml" />
                            <service-include file-path="messaging-config.xml" />       
                        </services>

                        <security>
                            <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
                        </security>

                        <channels>

                            <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
                                <endpoint url="http://infody.com/blazeds/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
                            </channel-definition>

                            <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
                                <endpoint url="https://xyz.com/blazeds/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
                                <properties>
                                    <add-no-cache-headers>false</add-no-cache-headers>
                                </properties>
                            </channel-definition>

                            <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
                                <endpoint url="http://xyz.com/blazeds/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
                                <properties>
                                    <polling-enabled>true</polling-enabled>
                                    <polling-interval-seconds>4</polling-interval-seconds>
                                </properties>
                            </channel-definition>

                        </channels>

                     

                        <logging>
                            <target class="flex.messaging.log.ConsoleTarget" level="Error">
                                <properties>
                                    <prefix>[BlazeDS] </prefix>
                                    <includeDate>false</includeDate>
                                    <includeTime>false</includeTime>
                                    <includeLevel>false</includeLevel>
                                    <includeCategory>false</includeCategory>
                                </properties>
                                <filters>
                                    <pattern>Endpoint.*</pattern>
                                    <pattern>Service.*</pattern>
                                    <pattern>Configuration</pattern>
                                </filters>
                            </target>
                        </logging>

                        <system>
                            <redeploy>
                                <enabled>false</enabled>
                            </redeploy>
                        </system>

                    </services-config>

                     

                    There is no url or port settings in the other three Blazeds configuration xml file: remoting-config.xml, proxy-config.xml, messaging-config.xml

                     

                    Here is the services-config.xml file for ds-console app:

                     

                    <?xml version="1.0" encoding="UTF-8"?>
                    <services-config>

                     

                        <services>
                            <!--
                                    REMOTING SERVICE
                            -->
                            <service id="remoting-service" class="flex.messaging.services.RemotingService">

                     

                                <adapters>
                                    <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
                                </adapters>
                          
                                <!-- Runtime management console destination -->
                                <destination id="RuntimeManagement" channels="amf">
                                    <properties>
                                        <source>flex.management.jmx.MBeanServerGateway</source>
                                    </properties>
                                </destination>
                               
                            </service>

                     

                        </services>
                       
                       
                            <security>
                                <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>              
                            </security>

                     


                        <channels>

                     

                            <channel-definition id="amf" class="mx.messaging.channels.AMFChannel">
                                <endpoint url="http://xyz.com/ds-console/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
                                <properties>
                                    <polling-enabled>false</polling-enabled>
                                </properties>
                            </channel-definition>

                     

                        </channels>

                     

                        <logging>

                     

                            <!-- You may also use flex.messaging.log.ServletLogTarget -->
                            <target class="flex.messaging.log.ConsoleTarget" level="Error">
                                <properties>
                                    <prefix>[BlazeDS] </prefix>
                                    <includeDate>false</includeDate>
                                    <includeTime>false</includeTime>
                                    <includeLevel>true</includeLevel>
                                    <includeCategory>true</includeCategory>
                                </properties>
                                <filters>
                                    <pattern>Endpoint.*</pattern>
                                </filters>
                            </target>

                     

                        </logging>

                     

                        <system>
                            <redeploy>
                                <enabled>true</enabled>
                                <watch-interval>20</watch-interval>
                                <watch-file>ds-console/WEB-INF/flex/services-config.xml</watch-file>
                                <touch-file>ds-console/WEB-INF/web.xml</touch-file>
                            </redeploy>
                        </system>

                     

                    </services-config>