Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

mirror service problem

Dear Shay, I deploy a mirror and processor instance in Gigaspaces. I found that no data was written in to database which I expect the mirror will do. (I also try to re-deploy the processor (initial load configured), no data found in space.)

    I got a mirror service with mysql database behind.
    1. there is no error both in processor and mirror when I write a object into the space
    2. the object could be found in space but no information found in mirror instance.
    3. I assume the processor is connected to the mirror. (message could be found from the mirror instance: 
       2011-03-02 12:05:19,254 nuxxase-mirror [1] INFO [com.gigaspaces.core.cluster.replication] - Joined new    [space_container1_1:space] member to the mirror-service_container:mirror-service Mirror Service. )
    4. mysql server connection is working.(I got access denied error before, and I add the permissions to this mysql account,re-deploy every thing, and no error appears.)
    5. I check the object class name defined in both mirror and processors' pu.xml, they are correct and matched.
        it also matched to what I see in the space with the gs-ui.
           <property name="annotatedClasses">
            <list>
                   <value>POJOs.Member</value>
            </list>
            </property>

      Any other thing I should test? Thanks.

Regards, Bill Wu h4. Attachments

[sla.jpg|/upfiles/13759704552932349.jpeg]

[mirror.jpg|/upfiles/13759704559429149.jpeg]

[sla.xml|/upfiles/1375970455684495.xml]

[pu.xml|/upfiles/1375970455368595.xml]

[pu.xml|/upfiles/1375970455470455.xml]

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=3607]{quote}

asked 2011-03-01 22:24:47 -0500

wbc gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

1. Does the processor that embed the space have the mirror tag enabled? :

<os-core:space id="space" url="/./space" schema="persistent"  mirror="true" external-data-source="hibernateDataSource">
    <os-core:properties>
        <props>
            <!-- Use ALL IN CACHE - Read Only from the database-->
            <prop key="space-config.engine.cache_policy">1</prop>
            <prop key="space-config.external-data-source.usage">read-only</prop>
            <prop key="cluster-config.cache-loader.external-data-source">true</prop>
            <prop key="cluster-config.cache-loader.central-data-source">true</prop>
            <prop key="cluster-config.mirror-service.url">jini://*/mirror-service_container/mirror-service</prop>
            <prop key="cluster-config.mirror-service.bulk-size">100</prop>
            <prop key="cluster-config.mirror-service.interval-millis">2000</prop>
            <prop key="cluster-config.mirror-service.interval-opers">100</prop>
            <prop key="cluster-config.groups.group.repl-policy.repl-original-state">true</prop>
        </props>
    </os-core:properties>
</os-core:space>

2. Does the processor deployed with a backup? Without a backup , data will not be sent to the mirror.

See more:
http://www.gigaspaces.com/wiki/display/XAP8/AsynchronousPersistencywiththeMirror

Shay

Attachments

  1. sla.jpg
  2. mirror.jpg
  3. sla.xml
  4. pu.xml
  5. pu.xml

answered 2011-03-01 22:34:39 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Yes, this template is generated by maven.

attachment 1 is the mirror 's pu.xml second one is processor's pu.xml h4. Attachments

[sla.jpg|/upfiles/1375970455918194.jpeg]

[mirror.jpg|/upfiles/13759704554741094.jpeg]

[sla.xml|/upfiles/13759704558664894.xml]

[pu.xml|/upfiles/13759704559392894.xml]

[pu.xml|/upfiles/13759704559900494.xml]

wbc gravatar imagewbc ( 2011-03-01 23:43:33 -0500 )edit

how do you deploy the processor PU? Do you have sla.xml used? What is POJOs.Members? Is this a regular POJO class?

Shay h4. Attachments

[sla.jpg|/upfiles/1375970456815014.jpeg]

[mirror.jpg|/upfiles/13759704561177014.jpeg]

[sla.xml|/upfiles/13759704569021714.xml]

shay hassidim gravatar imageshay hassidim ( 2011-03-02 08:08:44 -0500 )edit

Yes. POJOs.Members is a regular POJO class
I deploy the processor PU from gs-ui. sla.xml was placed with pu.xml in the same directory.

sla.xml was attached.

Is it possible to show the transaction log of the mirror service?
Thanks.

test A:
 I set a wrong password in pu.xml. When the processor add a POJOs.Members into the space, the mirror service got error messages(access denied).
it seems that the whole backup flow is working ,but the mirror service tried to connect to Mysql server, but not writing the POJO objects into db. (the db is empty at beginning,I assume it will create the Tables.)

Bill

Attachments

  1. sla.jpg
  2. mirror.jpg
  3. sla.xml
wbc gravatar imagewbc ( 2011-03-04 23:25:27 -0500 )edit

I can't open your sla.xml
Can you copy its content into the message and repost?
Do you specify backups ? If you don't, please make sure you have a single backup specified.
You can view the mirror activity by using the mirror monitor. See the best practices.
Shay

Attachments

  1. sla.jpg
  2. mirror.jpg
shay hassidim gravatar imageshay hassidim ( 2011-03-05 00:27:48 -0500 )edit

sla content is shown in attachment 1. It's weird, all the mirror operation is success, but still can't find data in MySql DB. (see attachment 2)

Are there any thing wrong with my POJO objects?

the content of one of them :

package POJOs; // Generated by Hibernate Tools 3.2.1.GA

/** * Members generated by hbm2java */ public class Members implements java.io.Serializable {

 private Integer id;
 private String loginname;
 private String fullname;
 private int groupid;
 private String email;
 private String password;
 private int nutcount;
 private int parentid;

public Members() {
}


public Members(String loginname, String fullname, int groupid, String password, int nutcount, int parentid) {
    this.loginname = loginname;
    this.fullname = fullname;
    this.groupid = groupid;
    this.password = password;
    this.nutcount = nutcount;
    this.parentid = parentid;
}
public Members(String loginname, String fullname, int groupid, String email, String password, int nutcount, int parentid) {
   this.loginname = loginname;
   this.fullname = fullname;
   this.groupid = groupid;
   this.email = email;
   this.password = password;
   this.nutcount = nutcount;
   this.parentid = parentid;
}

public Integer getId() {
    return this.id;
}

public void setId(Integer id) {
    this.id = id;
}
public String getLoginname() {
    return this.loginname;
}

public void setLoginname(String loginname) {
    this.loginname = loginname;
}
public String getFullname() {
    return this.fullname;
}

public void setFullname(String fullname) {
    this.fullname = fullname;
}
public int getGroupid() {
    return this.groupid;
}

public void setGroupid(int groupid) {
    this.groupid = groupid;
}
public String getEmail() {
    return this.email;
}

public void setEmail(String email) {
    this.email = email;
}
public String getPassword() {
    return this.password;
}

public void setPassword(String password) {
    this.password = password;
}
public int getNutcount() {
    return this.nutcount;
}

public void setNutcount(int nutcount) {
    this.nutcount = nutcount;
}
public int getParentid() {
    return this.parentid;
}

public void setParentid(int parentid) {
    this.parentid = parentid;
}

}

Bill

Edited by: Bc Wu on Mar 5, 2011 1:04 AM h4. Attachments

[sla.jpg|/upfiles/13759704568920876.jpeg]

[mirror.jpg|/upfiles/13759704564125276.jpeg]

wbc gravatar imagewbc ( 2011-03-05 01:02:34 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-03-01 22:24:47 -0500

Seen: 397 times

Last updated: Mar 01 '11