Author Topic: How to Setup Clustered Cache  (Read 13887 times)

0 Members and 1 Guest are viewing this topic.

Offline bandasdk

  • Jr. Member
  • **
  • Posts: 82
How to Setup Clustered Cache
« on: March 08, 2011, 10:48:02 PM »
How to Setup Clustered Cache


there really is not an idiots guide how to do this so I am going to try and simplify this so a newbie can understand ;)

Step 1, firstly you need to choose yourself a port different from what you csp is using,for the cache which must be forwarded in your router and instead of tcp define it as a udp port lets say for example "15000 "

Step 2, make sure you forward this port in UDP to your CSP Server's ip address,

Step 3, in your proxy xml file locate this :



14
11




it is normally near the bottom of the xml file, don’t worry if its not exactly the same, now you are going to delete all of that and replace it, I will show with what shortly.

Step 4, you need to locate where your csp is kept, for example mine is /usr/local/csp
there also should be a cache directory, you need to open that and make a file just called " cluster "

Step 5, open / edit the new file ( cluster ) you made, in there will go your dns and port that you forwarded earlier ... ie myserver.homelinux.net :15000
also if someone has already given you details to exchange cache that would go on the next line

so you would have a file that looks like:

myserver.homelinux.net :15000
frie$$$.dyndns.addy :30001

save that file and if any other cache exchange lines are given to you they will go in there as well.

Step 6, you will need to chmod the new file ie chmod 755 /usr/local/csp/cache/cluster or whatever path your csp is in.

step 7, this will be the replacement part of the xml file that you have deleted as of step 3
now remember the udp port you have forwarded also your dns you put in the cluster file and also the path where the cluster file is.



11
150ms
myserver.homelinux.net
15000
file:///usr/local/csp/cache/cluster
1
5
true
true




save the xml " save changes "

Step 8, Restart your CSP Proxy

that's all

to check if it works , go to Status page and you should see Cache-Handler: com.bowman.cardserv.ClusteredCache
click on it and it opens up. you should see something like the example below


avg-received-bytes/s: 113
avg-sent-bytes/s: 292
cache-peers: 3
cached-ecms: 73
instant-hits: 893
pending-ecms: 6
received-cached: 37926
received-discarded: 15322
received-pending: 30190
remote-hits: 533
sent-cached: 15895
sent-pending: 17336
timeouts: 443
tracker-failures: 0
wait-hits: 1225

Offline tester10

  • Jr. Member
  • **
  • Posts: 3
How to Setup Clustered Cache
« Reply #1 on: October 16, 2011, 05:49:57 AM »
Quote from: bandasdk;85095
How to Setup Clustered Cache


there really is not an idiots guide how to do this so I am going to try and simplify this so a newbie can understand ;)

Step 1, firstly you need to choose yourself a port different from what you csp is using,for the cache which must be forwarded in your router and instead of tcp define it as a udp port lets say for example "15000 "

Step 2, make sure you forward this port in UDP to your CSP Server's ip address,

Step 3, in your proxy xml file locate this :



14
11




it is normally near the bottom of the xml file, don’t worry if its not exactly the same, now you are going to delete all of that and replace it, I will show with what shortly.

Step 4, you need to locate where your csp is kept, for example mine is /usr/local/csp
there also should be a cache directory, you need to open that and make a file just called " cluster "

Step 5, open / edit the new file ( cluster ) you made, in there will go your dns and port that you forwarded earlier ... ie myserver.homelinux.net :15000
also if someone has already given you details to exchange cache that would go on the next line

so you would have a file that looks like:

myserver.homelinux.net :15000
frie$$$.dyndns.addy :30001

save that file and if any other cache exchange lines are given to you they will go in there as well.

Step 6, you will need to chmod the new file ie chmod 755 /usr/local/csp/cache/cluster or whatever path your csp is in.

step 7, this will be the replacement part of the xml file that you have deleted as of step 3
now remember the udp port you have forwarded also your dns you put in the cluster file and also the path where the cluster file is.



11
150ms
myserver.homelinux.net
15000
file:///usr/local/csp/cache/cluster
1
5
true
true




save the xml " save changes "

Step 8, Restart your CSP Proxy

that's all

to check if it works , go to Status page and you should see Cache-Handler: com.bowman.cardserv.ClusteredCache
click on it and it opens up. you should see something like the example below


avg-received-bytes/s: 113
avg-sent-bytes/s: 292
cache-peers: 3
cached-ecms: 73
instant-hits: 893
pending-ecms: 6
received-cached: 37926
received-discarded: 15322
received-pending: 30190
remote-hits: 533
sent-cached: 15895
sent-pending: 17336
timeouts: 443
tracker-failures: 0
wait-hits: 1225

Hi thanks for your input

but i am still getting a annoying error, perhaps you could help me with this situation

i will post here my clustered cache config so u maybe point me out on what i am doing wrong because i am getting this error allways.

Quote
Configuration error: - Element:
but first i will explain my setup here.

i have 1 pc machine with 3 separate CSP proxys running all in same local machine


usr/local/csp1
usr/local/csp2
usr/local/csp3

all under same IP machine example ip 192.168.0.10

so i have created the following:

1- created in usr/local  a folder called  clusteredcache
2- changed attributes from clusteredcache folder to 755
3- inside clusteredcache folder , i created a file called cluster.



So then in each csp FOLDER i routed this way this is cache config from


 
 CSP1
   
Quote

      17
      1500 ms
      12111
      192.168.0.10
      file:///usr/local/clusteredcache/cluster
     
      1
      0
      true
      false    
   
CSP2

Quote

      17
      1500 ms
      12121
      192.168.0.10
      file:///usr/local/clusteredcache/cluster
     
      1
      0
      true
      false    
   
CSP3

Quote

      17
      1500 ms
      12131
      192.168.0.10
      file:///usr/local/clusteredcache/cluster
     
      1
      0
      true
      false    
   


then in the /usr/local/clusteredcache/cluster file i input the following
Quote
192.168.0.10:12111
192.168.0.10:12121
192.168.0.10:12131
So with this config i am getting the error on top


i also tried changing the local-host to this

You are not allowed to view links. Register or Login


and on the cluster file  like this

Quote
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login
and i still get same error after i save and try to restart CSP and csp wont restart.

so any help or comments are appreciated guys.

as i have the 3 CSPs running in separate folders but still on the same PC machine under the same LAN ip 192.168.0.10

by the way i am running the lastest 0.9.1 svn201 build compiled direct from SVN  

i have compiled other versions also and still get same error

Quote
Configuration error: - Element:

thanks
tester10
« Last Edit: October 16, 2011, 05:53:22 AM by tester10 »

Offline morpheus28

  • Jr. Member
  • **
  • Posts: 22
Council for CSP-svn ....!!!
« Reply #2 on: October 22, 2011, 09:12:39 AM »
Hello the frie$$$ too jai them already this error message for you given advice not to take the latest version of CSP-svn Beug it has not resolved it should be before the last R200 and not R201
 here is the link directly compiled: svn co You are not allowed to view links. Register or Login @ 200 CSP-svn200
 Here did the test and inform me @ @ @ +



   hojhj                             :hi:                                 9lklk.
« Last Edit: October 22, 2011, 09:14:45 AM by morpheus28 »
Dream800HD_500-S i Ubuntu Server Verry Good Share !!!

Offline tester10

  • Jr. Member
  • **
  • Posts: 3
How to Setup Clustered Cache
« Reply #3 on: October 22, 2011, 07:28:47 PM »
Quote from: morpheus28;111750
Hello the frie$$$ too jai them already this error message for you given advice not to take the latest version of CSP-svn Beug it has not resolved it should be before the last R200 and not R201
 here is the link directly compiled: svn co You are not allowed to view links. Register or Login @ 200 CSP-svn200
 Here did the test and inform me @ @ @ +



   hojhj                             :hi:                                 9lklk.


Hi friend tester with that 200 version u send in link i compiled from that SVN link, and same thing

i get same error o cache clustered....

any more hints ???????

Offline morpheus28

  • Jr. Member
  • **
  • Posts: 22
How to Setup Clustered Cache
« Reply #4 on: October 22, 2011, 09:05:53 PM »
Quote from: tester10;111842
Hi friend tester with that 200 version u send in link i compiled from that SVN link, and same thing
 
i get same error o cache clustered....
 
any more hints ???????
Salut mon amis voila mon example de config cache Bowman elle marche nikel sur mon CSP jai remarqué que te réglage était pas parfait et juste une question l'install de sun-java cest t'elle bien réussi ???
 
< cache-gestionnaire class="com.bowman.cardserv.ClusteredCache" >
< cache-config >
< cw-max-âge >19< / cw-max-âge >
< max-cache-wait >40%< / max-cache-wait >
< local-hĂ´te >myserver.homelinux.net< / hĂ´te local >
< local-port >15000< / local-port > le port du cache en UDP biensur
< tracker-url >file:///usr/local/csp/cache/cluster< / tracker-url >
< tracker-mise Ă  jour >10< / tracker-mise Ă  jour >
< sync-période >1< / sync-période >
< masquer les noms >true< / masquer les noms >
true
< / cache-config >
< / cache-gestionnaire >
 
voila tu le méne dans /usr/local/CSP/cache/cluster=== attribut 755 dans le fihier cluster tu met ton host:port ==> du cache UDP
myserver.homelinux.net:15000
peers-Ă©change.dyndns:12000
 
Par contre pour 3 CSP sur la meme machine cest impeux trop car confli IP Oblige tu aurra que des problém l'échange ce fait mieux avec l'exterieur de ton réseaux local ,,tien nous informé de la suite ok @@@+
« Last Edit: November 23, 2011, 09:58:57 AM by morpheus28 »
Dream800HD_500-S i Ubuntu Server Verry Good Share !!!

Offline tester10

  • Jr. Member
  • **
  • Posts: 3
How to Setup Clustered Cache
« Reply #5 on: October 22, 2011, 10:07:11 PM »
My friend

this is the same as manuals i have internal on same machine 2 CSP running separate on same PC machin same LOCAL LAN IP address


      17
      1500 ms
      12111
      192.168.0.10
      file:///usr/local/csp/cache/cluster
     
      1
      0
      true
      false    
   
                

and still give me that same error abova

javaioexcception....  no peers found wrong password like i posted before.. i have put all files and folder 755..



Quote from: morpheus28;111851
Salut mon amis voila mon example de config cache Bowman elle marche nikel sur mon CSP jai remarqué que te réglage était pas parfait et juste une question l'install de sun-java cest t'elle bien réussi ???
 
< cache-gestionnaire class="com.bowman.cardserv.ClusteredCache" >
< cache-config >
< cw-max-âge >19< / cw-max-âge >
< max-cache-wait >40%< / max-cache-wait >
< local-hĂ´te >myserver.homelinux.net< / hĂ´te local >
< local-port >15000< / local-port > le port du cache en UDP biensur
< tracker-url >file:///usr/local/csp/cache/cluster< / tracker-url >
< tracker-mise Ă  jour >10< / tracker-mise Ă  jour >
< sync-période >1< / sync-période >
< masquer les noms >true< / masquer les noms >
true
< / cache-config >
< / cache-gestionnaire >
 
voila tu le méne dans /usr/local/CSP/cache/cluster=== attribu 755 dans le fihier cluster tu met ton host:port ==> du cache UDP
myserver.homelinux.net:15000
peers-Ă©change.dyndns:12000
 
Par contre pour 3 CSP sur la meme machine cest impeux trop car confli IP Oblige tu aurra que des problém l'échange ce fait mieux avec l'exterieur de ton réseaux local ,,tien nous informé de la suite ok @@@+

Offline Shaterlo

  • Jr. Member
  • **
  • Posts: 7
not work
« Reply #6 on: November 04, 2011, 05:58:09 PM »
hello iam trying to make it work but never worked....
i did exact how this was explain....but always getting this error
Can some one help me please!!
« Last Edit: November 04, 2011, 06:00:35 PM by Shaterlo »

Offline amanteka

  • Jr. Member
  • **
  • Posts: 3
How to Setup Clustered Cache
« Reply #7 on: December 05, 2011, 05:58:51 AM »
Quote from: Shaterlo;113323
hello iam trying to make it work but never worked....
i did exact how this was explain....but always getting this error
Can some one help me please!!


--- have you tried a fake dns name in the first line of the tracker list file? - something like:

test.dyndns.org
192.168.0.10:12111
192.168.0.10:12121
192.168.0.10:12131

i don't know if it works because i'm just testing the clustered cache method, but i removed the error using the dns name, give it a try and tell me if it worked for you ---

Offline bittug

  • Jr. Member
  • **
  • Posts: 3
How to Setup Clustered Cache
« Reply #8 on: December 12, 2011, 01:03:12 AM »
i used above setting but on auto reboot i get error pasword is wrong i have to run csp manuly

Offline SnaBel@

  • Jr. Member
  • **
  • Posts: 2
How to Setup Clustered Cache
« Reply #9 on: December 29, 2011, 03:43:31 PM »
Geting warnings

    what is this mean ?

    2011-12-29 13:29:52 - WARNING: CspCws[server1:*] - Unexpected Csp reply: java.net.SocketTimeoutException: Read timed out

    WARNING: ClusteredCache - No record for this proxy found in list from tracker (file:/C:/cardservproxy/cache/cluster.dat), expected: 192.168.1.2:40710

Offline riverrat

  • Jr. Member
  • **
  • Posts: 97
How to Setup Clustered Cache
« Reply #10 on: September 07, 2012, 01:43:03 PM »
i tried the aboce and tells me about some password wrong in the file:///

Configuration error: - Element:
« Last Edit: September 07, 2012, 08:47:33 PM by riverrat »

Offline riverrat

  • Jr. Member
  • **
  • Posts: 97
How to Setup Clustered Cache
« Reply #11 on: September 07, 2012, 09:55:27 PM »
anyone?

Offline riverrat

  • Jr. Member
  • **
  • Posts: 97
How to Setup Clustered Cache
« Reply #12 on: October 21, 2012, 12:47:15 PM »
bump:thank_you:

Offline riverrat

  • Jr. Member
  • **
  • Posts: 97
How to Setup Clustered Cache
« Reply #13 on: October 22, 2012, 10:42:57 PM »
get errrors about wrong password?

Offline amanteka

  • Jr. Member
  • **
  • Posts: 3
How to Setup Clustered Cache
« Reply #14 on: May 04, 2013, 05:57:09 AM »
just resolve the ip to an address, edit your hosts file like this:

192.168.0.10 CSP1.web
192.168.0.10 CSP2.web
192.168.0.10 CSP3.web

then change to:

CSP1.web:12111
CSP2.web:12121
CSP3.web:12131

instead of:
192.168.0.10:12111
192.168.0.10:12121
192.168.0.10:12131

and you will get rid of the error