aspose file tools*
The moose likes JForum and the fly likes Jboss Cache - How To? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Jboss Cache - How To?" Watch "Jboss Cache - How To?" New topic
Author

Jboss Cache - How To?

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
Same nic.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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

Joined: Apr 22, 2012
Posts: 17424
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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jboss Cache - How To?