zkfan / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 0 forks source link

tools/tungsten-installer does not issue warnings when the master-host is incorrect #130

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Typo in the master-host to a server during the tools/tungsten-installer
Servers intended: myhost1(master), myhost2(slave). 
 --master-host=r1 rather than myhost1 and --cluster-hosts=myhost1,myhost2
r1 is a valid server. In my test I used myhost3 as r1 was not available. 
myhost3 was not running tungsten replicator.

2. Typo mis-match where --master-host=s1 (non-existent host) and  
--cluster-hosts=myhost1,myhost2

What is the expected output?
a clear warning/error message with reason why.

What do you see instead?
NAME              VALUE
----              -----
appliedLastSeqno: -1
appliedLatency  : -1.0
role            : slave
serviceName     : mysrvc
serviceType     : unknown
started         : true
state           : OFFLINE:ERROR
Finished services command...

As a new user I wasn't sure why it was OFFLINE nor where to find the error.

For type 1 (server exists) trepsvc.log had this:
INFO   | jvm 1    | 2011/06/23 21:34:37 | 2011-06-23 21:34:36,963 INFO  
replicator.thl.RemoteTHLExtractor Waiting for master to become available: 
uri=thl://myhost3:2112/ retries=750

for type 2 (non-existent server master-host=s1 which is unknown to myhost1 
where installer is run)
INFO   | jvm 1    | 2011/06/23 21:49:01 | 2011-06-23 21:49:01,348 ERROR 
replicator.management.OpenReplicatorManager Received error notification, 
shutting down services: Event extraction failed: THL connection failure; cannot 
resolve address: host=s1 port=2112
INFO   | jvm 1    | 2011/06/23 21:49:01 | 2011-06-23 21:49:01,576 INFO  
replicator.management.OpenReplicatorManager Sent State Change Notification 
GOING-ONLINE:SYNCHRONIZING -> OFFLINE:ERROR
INFO   | jvm 1    | 2011/06/23 21:49:01 | 2011-06-23 21:49:01,576 WARN  
replicator.management.OpenReplicatorManager Received irrelevant event for 
current state: state=OFFLINE:ERROR event=OfflineNotification

What is the possible cause?
user error

What is the proposed solution?
installer parses the arguments and makes sure that the first server in 
cluster-hosts = master-host

Additional information
Exact install commands
 tools/tungsten-installer \
   --verbose \
    --master-slave \
    --master-host=myhost3 \
    --datasource-user=myuser \
    --datasource-password=mypwd \
    --service-name=mysrvc \
    --home-directory=$TUNGSTEN_BASE \
    --cluster-hosts=myhost1,myhost2 \
    --start-and-report

 tools/tungsten-installer \
   --verbose \
    --master-slave \
    --master-host=s1 \
    --datasource-user=myuser \
    --datasource-password=mypwd \
    --service-name=mysrvc \
    --home-directory=$TUNGSTEN_BASE \
    --cluster-hosts=myhost1,myhost2 \
    --start-and-report

Original issue reported on code.google.com by eona...@gmail.com on 23 Jun 2011 at 10:22

GoogleCodeExporter commented 9 years ago

Original comment by jeffm...@gmail.com on 24 Jun 2011 at 8:42