cancel
Showing results for 
Search instead for 
Did you mean: 

Replication works only on small file

alextave
Champ in-the-making
Champ in-the-making
Hi everybody, I am studying Alfresco 5 Community Edition and I have problems on replication job.
This is the situation, I have two machines and I want to replicate a folder from source machine to the target one:
-Machine source
    IP: 192.168.5.149
    Alfresco works on port 8080

-Machine target
    IP: 192.168.5.63
    Alfresco works on port 8180

The replication works fine only with a folder containing a small file of 250KB, if I try to replicate a bigger folder (more than 42MB) the replication fails with this error printed in source machines's log:

<strong>org.alfresco.service.cmr.replication.ReplicationServiceException: 06170030 Errore durante l'esecuzione del trasferimento - 06170028 Impossibile eseguire la richiesta HTTP sendContent per la destinazione:

TransferTarget: Repliche,host:192.168.5.63,port:8180 stato: java.net.SocketException: Connection reset by peer: socket write error </strong>

Following there are the configurations I used:

alfresco-global.properties on source machine:
replication.enabled=true 



alfresco-global.properties on target machine:
transferservice.receiver.enabled=true
replication.enabled=true


On source machine I created a folder Repliche in Repository>Data Dictionary>Transfers>Transfer Target Groups>Default Group using this properties:
Host endpoint: 192.168.5.63
Port endpoint: 8180
Path endpoint: /alfresco/service/api/transfer
Protocol endpoint: http
Username: admin
Password: XXXXXX

On target machine I edited share-config-custom.xml file in this way:

<config evaluator="string-compare" condition="Replication">
  <share-urls>
    <share-url repositoryId="SOURCE_REPO_ID">http://localhost:8180/share/</share-url>
  </share-urls>
</config>


I think I have told you all the things, so how can i solve this problem?
Any advice is appreciated

Thanks
Andrea
1 REPLY 1

alextave
Champ in-the-making
Champ in-the-making
I've found the solution, in file ALRESCO_HOME/tomcat/conf/server.xml add this attribute in <strong>every</strong>
Connector
element:
maxSwallowSize="-1"


I don't know very well the reason but it seems Tomcat limits file transport up to 2MB. I don't why but if know the couse feel free to comment/reply.
I added this attribute in both source and target Alfresco installation.

Furthermore, share-config-custom.xml file should look in this way:


<config evaluator="string-compare" condition="Replication">
    <share-urls>
         <share-url repositoryId="SOURCE_REPO_ID">http://SOURCE_REPO_IP:8080/share/</share-url> <!– Maybe localhost isn't right, there must be source marchine IP –>
    </share-urls>
</config>