cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring FSR over HTTP in 3.2

mudassirshahabu
Champ in-the-making
Champ in-the-making
I have deployed FSR Over HTTP in Alfresco 3.2 by following this article.
http://wiki.alfresco.com/wiki/WCM_Deployment_Engine

When I publish website, I get following exception. It throws 500 Internal Server Error

14:35:52,468 User:alfrescoadmin@yahoo.com ERROR [avm.actions.AVMDeployWebsiteAction] Deployment Error
org.alfresco.service.cmr.avm.AVMException: 00130003 Deployment exception, unable to deploy : srcPath:mysite:/www/avm_webapps, target:mysite, version:47
0, adapterName:spring HTTP, hostName:localhost, port:8,082, errorSmiley Surprisedrg.alfresco.service.cmr.avm.AVMException: 00130002 Error during deployment srcPath: vzdn
site:/www/avm_webapps, version:470, adapterName:spring HTTP, hostName:localhost, port:8,082, errorSmiley Surprisedrg.springframework.remoting.RemoteAccessException: Cann
ot access HTTP invoker remote service at [http://localhost:8082/alfrescoFSR/deployment]; nested exception is java.io.IOException: Did not receive successfu
l HTTP response: status code = 500, status message = [Internal Server Error]
        at org.alfresco.repo.deploy.DeploymentServiceImpl.deployDifferenceFS(DeploymentServiceImpl.java:1171)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at org.alfresco.repo.transaction.CheckTransactionAdvice.invoke(CheckTransactionAdvice.java:52)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.alfresco.repo.transaction.RetryingTransactionAdvice$1.execute(RetryingTransactionAdvice.java:70)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:327)
        at org.alfresco.repo.transaction.RetryingTransactionAdvice.invoke(RetryingTransactionAdvice.java:73)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy78.deployDifferenceFS(Unknown Source)
        at org.alfresco.repo.avm.actions.AVMDeployWebsiteAction.executeImpl(AVMDeployWebsiteAction.java:405)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:127)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:711)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:648)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1$1.execute(AsynchronousActionExecutionQueueImpl.java:369)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:327)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:234)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:378)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:514)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:381)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.service.cmr.avm.AVMException: 00130002 Error during deployment srcPath: mysite:/www/avm_webapps, version:470, adapterName:spring
HTTP, hostName:localhost, port:8,082, errorSmiley Surprisedrg.springframework.remoting.RemoteAccessException: Cannot access HTTP invoker remote service at [http://localh
ost:8082/alfrescoFSR/deployment]; nested exception is java.io.IOException: Did not receive successful HTTP response: status code = 500, status message = [I
nternal Server Error]
        at org.alfresco.repo.deploy.DeploymentServiceImpl.deployDifferenceFS(DeploymentServiceImpl.java:1146)
        … 28 more
Caused by: org.springframework.remoting.RemoteAccessException: Cannot access HTTP invoker remote service at [http://localhost:8082/alfrescoFSR/deployment];
nested exception is java.io.IOException: Did not receive successful HTTP response: status code = 500, status message = [Internal Server Error]
        at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:196)
        at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:157)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy164.createDirectory(Unknown Source)
        at org.alfresco.repo.deploy.DeploymentReceiverServiceClient.createDirectory(DeploymentReceiverServiceClient.java:126)
        at org.alfresco.repo.deploy.DeploymentServiceImpl.createOnFSR(DeploymentServiceImpl.java:1435)
        at org.alfresco.repo.deploy.DeploymentServiceImpl.createOnFSR(DeploymentServiceImpl.java:1451)
        at org.alfresco.repo.deploy.DeploymentServiceImpl.deployDirectoryPushFSR(DeploymentServiceImpl.java:1298)
        at org.alfresco.repo.deploy.DeploymentServiceImpl.deployDifferenceFS(DeploymentServiceImpl.java:1087)
        … 28 more
Caused by: java.io.IOException: Did not receive successful HTTP response: status code = 500, status message = [Internal Server Error]
        at org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor.validateResponse(SimpleHttpInvokerRequestExecutor.java:139)
        at org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor.doExecuteRequest(SimpleHttpInvokerRequestExecutor.java:62)
        at org.springframework.remoting.httpinvoker.AbstractHttpInvokerRequestExecutor.executeRequest(AbstractHttpInvokerRequestExecutor.java:134)
        at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.executeRequest(HttpInvokerClientInterceptor.java:177)
        at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:154)
        … 36 more


Any clues, what necessary configuration I have missed or done wrong.

ALSO, CAN SOMEONE SEND ME A deployment-context.xml file that is current in working condition.
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
The example you pointed to on the wiki works. 

Have you packaged up the standalone deployment engine as a webapp called "alfrescoFSR.war" and deployed it on your web server for localhost, port 8082?

mudassirshahabu
Champ in-the-making
Champ in-the-making
Thanks for viewing the post

Yes, the webapp name is alfrescoFSR.war and this server is running on localhost:8082. Let me give you code snippet of every file. Any help will be highly appreciated.

———————-deployment-service-context.xml———————-
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>

    <!– Deployment Service Configuration –> 
   
    <!–  Payload transformers –>
     <bean id="deploymentTestTransformer" class="org.alfresco.deployment.test.TestDeploymentTransportTransformer">
     </bean>  
    
     <bean id="deploymentEncryptor" class="org.alfresco.deployment.transformers.SampleEncryptionTransformer">
        <property name="password">
            <value>Alfresco</value>
        </property>
        <property name="cipherName">
            <value>PBEWithMD5AndDES</value>
        </property>
     </bean> 
    
     <bean id="deploymentCompressor" class="org.alfresco.deployment.transformers.CompressionTransformer">
     </bean> 
    
     <!–  Transport adapters to communicate with remote File System Receivers –>    
     <!–  Communicate with an Deployment Server over RMI - Default method for Alfresco–>
     <bean id="rmiFSRAdapter" class="org.alfresco.repo.deploy.DeploymentReceiverTransportAdapterRMI">
     </bean>
    
     <!–  communicate with an Deployment Server over RMI with the content encrypted  –>
     <bean id="encryptedRMIFSRAdapter" class="org.alfresco.repo.deploy.DeploymentReceiverTransportAdapterRMI">
          <property name="transformers">
            <list>
               <ref bean="deploymentEncryptor"></ref>
            </list>
        </property>
     </bean>
    
     <!–  communicate with an Deployment Server over RMI with the content compressed then encrypted  –>
     <bean id="compressEncryptedRMIFSRAdapter" class="org.alfresco.repo.deploy.DeploymentReceiverTransportAdapterRMI">
          <property name="transformers">
            <list>
               <ref bean="deploymentEncryptor"></ref>
               <ref bean="deploymentCompressor"></ref>
            </list>
        </property>
     </bean>
    
     <!–  how to communicate with an Deployment Server over Spring HTTP –>

   <bean id="springHttpFSRAdapter" class="org.alfresco.repo.deploy.DeploymentReceiverTransportAdapterSpringHTTP">
        <property name="urlPattern">
            <value>http://{0}:{1}/alfrescoFSR/deployment</value>
        </property>
     </bean>
   

     <!–  Deployment Service –>
     <bean id="deploymentService" class="org.alfresco.repo.deploy.DeploymentServiceImpl" init-method="init">
        <property name="avmService">
            <ref bean="AVMService"/>
        </property>
       
        <property name="avmNodeService">
            <ref bean="avmNodeService"/>
        </property>
       
        <property name="transactionService">
            <ref bean="transactionService"/>
        </property>
       
        <property name="jobLockService">
           <ref bean="jobLockService"/>
        </property>
       
        <!– how many files to send in parallel –>
        <property name="numberOfSendingThreads">
            <value>${deployment.service.numberOfSendingThreads}</value>
        </property>
       
        <!– Which adapters are provided to communicate with remote File System Receivers –>
        <property name="deploymentReceiverTransportAdapters">
            <map>
               <entry key="default">
                     <ref bean="rmiFSRAdapter"></ref>
               </entry>
              
           <!– Uncomment to enable spring HTTP –>     
                 <entry key="spring HTTP">
                     <ref bean="springHttpFSRAdapter"></ref>
               </entry>
          
       
           <!– Uncomment to enable encrypted RMI
                 <entry key="encrypted RMI">
                     <ref bean="encryptedRMIFSRAdapter"></ref>
               </entry>
            –>

         <!– Uncomment to enable compressed and encrypted RMI
               <entry key="rmi compressed and encrypted">
                     <ref bean="compressEncryptedRMIFSRAdapter"></ref>
               </entry>
            –>
            </map>
        </property>
     </bean>

   
    <bean id="deploymentServiceReadTxnAdvisor" class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
        <property name="advice">
            <ref bean="retryingReadTxnAdvice"/>
        </property>
        <property name="mappedNames">
            <list>
                <value>getRemoteActionService</value>
            </list>
        </property>
    </bean>

    <bean id="deploymentServiceWriteTxnAdvisor" class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
        <property name="advice">
            <ref bean="retryingWriteTxnAdvice"/>
        </property>
        <property name="mappedNames">
            <list>
                <value>deployDifferenceFS</value>
                <value>deployDifference</value>
            </list>
        </property>
    </bean>

    <bean id="DeploymentService" class="org.springframework.aop.framework.ProxyFactoryBean">
        <property name="proxyInterfaces">
            <list>
                <value>org.alfresco.service.cmr.avm.deploy.DeploymentService</value>
            </list>
        </property>
        <property name="targetName">
            <value>deploymentService</value>
        </property>
        <property name="interceptorNames">
            <list>
                <value>deploymentServiceWriteTxnAdvisor</value>
                <value>deploymentServiceReadTxnAdvisor</value>
                <value>checkTxnAdvisor</value>
            </list>
        </property>
    </bean>
</beans>




—————————-deployment-context.xml—————————-

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlnsSmiley Tongue="http://www.springframework.org/schema/p"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">


    <!–  command queue for deployment service –>
    <bean id="deploymentReceiverCommandQueue" class="org.alfresco.deployment.impl.server.DeploymentCommandQueueImpl" >
    </bean>

       
    <!–  Reader management –>
    <bean id="deploymentReaderManagement" class="org.alfresco.deployment.impl.server.ReaderManagementPool" >
    </bean>
   
    <!–  This is the common configuration for all file system receivers –>
    <bean id="fileSystemReceiverService" class="org.alfresco.deployment.impl.fsr.FileSystemReceiverServiceImpl"
          init-method="init">
         
        <!– Will an error be thrown if the FSR overwrites files outside its control –>
        <property name="errorOnOverwrite"><value>${deployment.filesystem.errorOnOverwrite}</value></property>
       
        <!–  Where to store temporary data –> 
        <property name="dataDirectory">
            <value>${dep.datadir}</value>
        </property>
       
        <!–  Where to log information –>
        <property name="logDirectory">
            <value>${dep.logdir}</value>
        </property>
       
        <property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property>
       
    </bean>
   
    <!–  Housekeeper for the file system service deployment receivers –>
    <bean id="fileSystemReceiverHousekeeper" class="org.alfresco.deployment.impl.fsr.FileSystemReceiverHousekeeper"
       init-method="init">
       <property name="fileSystemReceiverService"><ref bean="fileSystemReceiverService"/></property>
    </bean>
   
    <!–  Housekeeper for the deployment queue  –>
    <bean id="commandQueueHousekeeper" class="org.alfresco.deployment.impl.server.DeploymentCommandQueueHousekeeper"
       init-method="init">
       <property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property>
    </bean>
   
    <!– This is the deployment engine  –>
    <bean id="deploymentReceiverEngine"
       class="org.alfresco.deployment.impl.server.DeploymentReceiverEngineImpl"
        init-method="init">
       
        <!– How long to wait before polling housekeeping –>
        <property name="pollDelay"><value>5000</value></property>
       
        <property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property>
       
        <property name="readerManagement">
           <ref bean="deploymentReaderManagement" />
        </property>
       
        <!–  The authenticator to access the deployment receiver engine (for shutdown) –>
        <property name="authenticator">
           <bean class="org.alfresco.deployment.impl.server.DeploymentReceiverAuthenticatorSimple">
                 
                 <property name="user"><value>admin</value></property>
                 <property name="password"><value>admin</value></property>
           </bean>
        </property>
       
        <!– Define your content transformers here
        <property name="transformers">
            <list>
            </list>
        </property>
        –>
       
        <!– Define your housekeepers here –>
        <property name="housekeepers">
           <set>
           <ref bean="commandQueueHousekeeper"/>
           </set>
        </property>
    </bean>

</beans>

—————————–deployment-target.xml ———————————-
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlnsSmiley Tongue="http://www.springframework.org/schema/p"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                           http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">


<!–
      Define and register the deployment target called "sampleTarget which
      is used for unit tests"
   –>
   <bean
      class="org.alfresco.deployment.impl.server.DeploymentTargetRegistrationBean"
      init-method="register">

      <!– What's the name of your target? –>
      <property name="name">
         <value>vzdnsite</value>
      </property>
      
      <!–  Register with the deploymentReceiverEngine –>
      <property name="registry">
         <ref bean="deploymentReceiverEngine" />
      </property>
      
      <property name="target">
      
         <!– This is the definition of the target - you could also add a reference to a bean which already exists –>
         <bean
            class="org.alfresco.deployment.impl.fsr.FileSystemDeploymentTarget"
            init-method="init">
            
            <!–  Where to store the deployed content –>
            <property name="rootDirectory">
               <value>C:/developmenttomcat/core-refactor/tomcat-vzdnsite/webapps</value>
            </property>
            
            <!–  where to store meta data for sampleTarget–>
              <property name="metaDataDirectory">
                  <value>${dep.metadatadir}/vzdnsite</value>
              </property>
            <property name="autoFix">
               <value>true</value>
            </property>
            <property name="postCommit">
               <list>
                  <bean class="org.alfresco.deployment.SampleRunnable" />
               </list>
            </property>
            <property name="fileSystemReceiverService">
               <ref bean="fileSystemReceiverService" />
            </property>
            <property name="name"><value>vzdnsite</value></property>
            <property name="authenticator">
               <bean
                  class="org.alfresco.deployment.impl.server.DeploymentReceiverAuthenticatorSimple">
                  <property name="user">
                     <value>admin</value>
                  </property>
                  <property name="password">
                     <value>admin</value>
                  </property>
               </bean>
            </property>
         </bean>
      </property>
   </bean>   
</beans>

———————–deployment-config.xml—————–

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlnsSmiley Tongue="http://www.springframework.org/schema/p"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="http://www.springframework.org/schema/beans    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                           http://www.springframework.org/schema/util    http://www.springframework.org/schema/util/spring-util-2.5.xsd">

    <!– Configuration of the deployment service –>

    <bean id="properties"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="ignoreUnresolvablePlaceholders">
            <value>true</value>
        </property>
        <property name="locations">
            <list>
                <value>classpath:deployment.properties</value>
            </list>
        </property>
    </bean> 


    <import resource="classpath*:deployment/*-context.xml" />  
   <import resource="classpath*:deployment/*-target.xml" />
</beans>

———————deployment.properties——————

dep.datadir=C:/Alfresco32/tomcat_fsr/Deployment/depdata
dep.logdir=C:/Alfresco32/tomcat_fsr/Deployment/deplog
dep.metadatadir=C:/Alfresco32/tomcat_fsr/Deployment/depmeta
deployment.filesystem.errorOnOverwrite=false
dep.rmi.port=44100
dep.rmi.service.port=44101