• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jboss Cache - How To?

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is just a question as I am trying to learn how to configure the jboss-cache-cluster.xml file for multiple servers. I left the file alone except for 1 modification setting loopback=true on a windows platform. I got strange results, whereby one of the two nodes would update and not the other (in a 3 server environment). I looked for documentation on it, but it seems hard to find the proper specs for the config file.

Any help would be great for me and anyone else wanting to configure it.

Thanks.


[originally posted on jforum.net by coolbreeze]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To be more specific, it seems as if each server cannot see the others in the cache cluster. Here is some output...

11532K(716736K), 0.0289269 secs]
19:12:54,171 INFO [TreeCache ] viewAccepted(): new members: [webserver1:
1955]
19:12:54,171 INFO [TreeCache ] state could not be retrieved (must be
first member in group)
19:12:54,171 INFO [TreeCache ] new cache is null (maybe first member

It says this even after the other two members were already started.

Thanks for any help on this.
[originally posted on jforum.net by coolbreeze]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, firewalls were preventing the servers from talking in the last thread.

Now comes the real issue and maybe just not understanding how the cache cluster is supposed to work.

3 servers in the cluster
server1=192.168.1.1
server2=192.168.1.2
server3=192.168.1.3

Updating jforum on server1 or server2 updates the remote cache ONLY on server3. Updating/posting to server3 does not get replicating going down in ips (does not show on server1 or server2). Basically, it seem that the highest ip in the cluster is the only node to get updated no matter what server is posted to.

I am still trying to figure out why this is as I found good jboss cache docs. If anyone has a clue as to why this is, please do tell.
[originally posted on jforum.net by coolbreeze]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For all my tests I left loopback=false, but i'm not sure about this.

What you can do for testing purposes is to make a little jboss cache test script, start it in each server and then see if the replication works. I usually do something like this:

1) I use beanshell. So, first, you have to set up the classpath:



I put "\" here to not break the layout.. I'm not sure if it will work on Windows (just remove it and you're fine)

Then, I start the beanshell console:



And then we start jboss-cache:



Now all you have to do is to put objects and see if it gets replicated.. something like



and



in the other servers.

If you cannot see any output, type "show();"

The idea is: if this code does not work, then it is some problem with jboss-cache configuration. Otherwise, it may be a problem with JForum.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Rafael.

Yes, it is very strange what is happening...let me tell you what I am trying to do so that you know better.

I am leaving all cache off so that everything gets pulled from the db. I have a 3 server environment, so the only real issue is going to be the forum index page which is cached no matter what. I only want to use jboss-cache to replicate that data.

I will have to try your suggestion, although I am pretty sure that what I specified in my last post holds true for what is getting replicated in cache. The only server that seems to get the latest cache info is the current server making the update and the highest server based on ip address. It does seem very unusual....also, let me point out that this is in a window enviroment.

Thanks
[originally posted on jforum.net by coolbreeze]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I remembered one thing: do you have the loopback interface set in all nodes? some time ago I had problems with cache replication, and it all was caused because my windows boxes didn't have the loopback network interface up. After I setup it, jboss-cache worked like a charm.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, I tried changing all kinds of things in the config file including the loopback without success.

I don't know, but for now, I just disabled the cache and I took out the part of the forum index that uses the cache (last posts and times).

I really have no idea why it didn't work, but it could be something with the environment.
[originally posted on jforum.net by coolbreeze]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just to make sure: I was talking about the loopback interface itself, not the jboss-cache-cluster.xml configuration "loopback" attribute.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmm, yeah, I did read over that too fast...I thought you were talking about the config file.

Not exactly sure how to configure a loopback interface or even what that means exactly. Any help would be great, but I will start checking into it. Does it have to do with setting up a virtual ip or something?

Thanks.
[originally posted on jforum.net by coolbreeze]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rafael,

Just to confirm, did you set up a virtual ip of 127.0.0.1 on your nic?

Is there something else to adding a loopback interface?


[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look here:

http://www.windowsnetworking.com/articles_tutorials/Install-Microsoft-Loopback-adapter-Windows-XP.html

Probably you're not using XP as server, so it's possible that the steps are a little different for win 2000 / 2003 server. But the whole idea is to just search google for something like "windows loopback interface configuration".

In my machine, after I Enable it, the ipconfig lists also



The tray icon status says "Limited or no connectivity", but it works very well

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok.

How did you keep your network connectivity though?

Did you set this up on a seperate nic or did you make it a virtual loopback ip on the same nic as your actual network ip?


[originally posted on jforum.net by coolbreeze]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Same nic.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we have customized JForum and running JFroum in clustered environment. The servers are running on different machines. How can we configure the cache? What are the changes needed in the config file in order to get the synchronized data on all machines?

Thanks

[originally posted on jforum.net by murthy]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we could able to solve this issue. We deployed customized JForum in cluster environment
[originally posted on jforum.net by murthy]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

murthy wrote:we could able to solve this issue. We deployed customized JForum in cluster environment



Hi Murphy, Are you saying that you get the JBoss cache working fine with JForum? I've been traing and didn't get any luck !!
[originally posted on jforum.net by pasta.bolognese]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic