danielcheng007 / tungsten-replicator

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

startup scripts start services, but tungsten state: OFFLINE:ERROR #460

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Clean instalation of Fedora 18 x64 
2. Installed MultiMaster Replication using cookbook. Everythin is tested and 
replication through 2 Master servers is OK
3. I've created init scripts using the command ln -s 
$HOME/tungsten/tungsten-replicator/bin/replicator /etc/init.d/replicator
4. chkconfig --add replicator
5. reboot the system
6. After reboot, I checked that replicator service is running, using the 
command ps -ef
7. Running the command $HOME/tungsten/tungsten-replicator/bin/trepctl services 
the result is:
Processing services command...
NAME              VALUE
----              -----
appliedLastSeqno: -1
appliedLatency  : -1.0
role            : master
serviceName     : alpha
serviceType     : unknown
started         : true
state           : OFFLINE:ERROR
NAME              VALUE
----              -----
appliedLastSeqno: 92
appliedLatency  : 0.0
role            : slave
serviceName     : bravo
serviceType     : remote
started         : true
state           : GOING-ONLINE:SYNCHRONIZING
Finished services command...

8. If I restart the services,using the init script: /etc/init.d/replicator 
restart and run again the command 
$HOME/tungsten/tungsten-replicator/bin/trepctl services the result is:
NAME              VALUE
----              -----
appliedLastSeqno: 78
appliedLatency  : 0.894
role            : master
serviceName     : alpha
serviceType     : local
started         : true
state           : ONLINE
NAME              VALUE
----              -----
appliedLastSeqno: 102
appliedLatency  : 0.37
role            : slave
serviceName     : bravo
serviceType     : remote
started         : true
state           : ONLINE
Finished services command...

This happens on both servers...

What version of the product are you using?
I've used 3 versions: 2.0.8-280 to 282

On what operating system?
Fedora 18 x64

Nuno Carrilho

Original issue reported on code.google.com by nunix...@gmail.com on 19 Feb 2013 at 3:15

GoogleCodeExporter commented 9 years ago
Hi!  Please check the trepsvc.log file on the master.  It appears the master 
for some reason could not start up.  There should be an error message in the 
stack traces that will let you know what's up. 

Original comment by robert.h...@continuent.com on 20 Feb 2013 at 1:18

GoogleCodeExporter commented 9 years ago
Hello. I have the same problem as he has and I fixed it already. The problem is 
the default boot direction of tungsten-replicator in the init script.

this line in the init script is the problem:

# chkconfig: 2345 20 80

I did change that to

by creating this line in /etc/chkconfig.d/replicator

# chkconfig: 2345 99 10

and after that: chkconfig --del replicator && chkconfig --add replicator

The problem is that mysql starts after replicator with default priority. By 
changing the priority to lowest (99) and killing replicator with priority 10 
then replicator gets stopped/started before mysql.

I can not tell if this works for fedora but for centos-6 its working like a 
charm.

U can check the priority by ls -l /etc/rc.5.d/*replicator*
The symlink shows u the priority actually set. After removing and readding you 
should see S99replicator instead of S20replicator or something like this.

To fix the problem permantent someone should fix the priority directly in the 
init script.

Cheers
Konstantin

Original comment by Konne...@googlemail.com on 7 Oct 2014 at 2:21