zxs / tungsten-replicator

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

Replicator unable to go online due to error #1001

Open GoogleCodeExporter opened 9 years ago

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

1.Create SALES/SALES tablespace/user and 1 test table
1a. Create SALES_PUB tablespace
2.Exec setupCDC.sh 
setupCDC.conf
service=SALES
sys_user=sys
sys_pass=oracle
export source_user=sales
pub_user=${source_user}_pub
pub_password=password
tungsten_user=tungsten
tungsten_pwd=password
delete_publisher=1
delete_subscriber=1
cdc_type=HOTLOG_SOURCE
specific_tables=1
specific_path=
3.Exec tpm install

tools/tpm install SALES \
--datasource-oracle-service=ORCL \
--datasource-type=oracle \
--install-directory=/opt/continuent \
--master=ol6ctr17 \
--members=ol6ctr17 \
--property=replicator.extractor.dbms.transaction_frag_size=10 \
--property=replicator.global.extract.db.password=password \
--property=replicator.global.extract.db.user=tungsten \
--replication-host=ol6ctr17 \
--replication-password=password \
--replication-port=1521 \
--replication-user=SALES_PUB \
--role=master \
--start-and-report=true \
--svc-table-engine=CDCSYNC

What is the expected output?

replicator status online

What do you see instead?
replicator status offline due to error

2014-09-09 19:56:44,021 WARN  Received irrelevant event for current state: 
state=OFFLINE:ERROR event=OfflineNotification
2014-09-09 20:08:08,572 INFO  State changed START -> OFFLINE:NORMAL
2014-09-09 20:08:09,281 INFO  State changed OFFLINE:NORMAL -> OFFLINE:ERROR
2014-09-09 20:08:09,282 ERROR State transition failed causing emergency 
recovery: state=OFFLINE:NORMAL transition=OFFLINE-GO-ONLINE-1 
event=GoOnlineEvent
2014-09-09 20:08:09,283 ERROR [TransitionFailureException] message: Replicator 
unable to go online due to error
2014-09-09 20:08:09,283 ERROR [ReplicatorException] message: Unable to prepare 
plugin: class name=com.continuent.tungsten.replicator.thl.THL 
message=[java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_CDC_PUBLISH' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
]
THL message=[java.sql.SQLException: ORA-29540: class oracle/CDC/PublishApi does 
not exist

What version of the product are you using?

tungsten-replicator-2.2.1-448
tungsten-replicator-2.2.1-403

On what operating system?

cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 (Santiago)

lxc-based server
Please provide any additional information below.

Notes:lxc-server info:
Linux ol6ctr1 3.13.0-35-generic #62-Ubuntu SMP Fri Aug 15 01:58:42 UTC 2014 
x86_64 x86_64 x86_64 GNU/Linux

SQL> select comp_name, version, status from dba_registry;

COMP_NAME
--------------------------------------------------------------------------------
VERSION                STATUS
------------------------------ -----------
Oracle Database Catalog Views
11.2.0.1.0             VALID

Oracle Database Packages and Types
11.2.0.1.0             VALID

JServer JAVA Virtual Machine
11.2.0.1.0             VALID

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0  Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

Original issue reported on code.google.com by vadym.Ko...@gmail.com on 14 Sep 2014 at 9:14

GoogleCodeExporter commented 9 years ago
to fix\resolve this issue following steps should be executed:
1) Ensure that Database Catalog Views and Database Packages and Types are 
injected if Oracle is installed from scratch. 
2) Install Java virtual Machine Package
3) Inject SQL script initcdc.sql which is provided in the admin 
directory(http://docs.oracle.com/cd/B28359_01/server.111/b28313/cdc.htm)
...
Only after these steps tpm install succeeded

...
Getting replication status on ol6ctr17
Processing services command...
NAME              VALUE
----              -----
appliedLastSeqno: -1
appliedLatency  : -1.0
role            : master
serviceName     : sales
serviceType     : local
started         : true
state           : ONLINE
Finished services command...

#####################################################################
# Next Steps
#####################################################################
Once your services start successfully replication will begin.
To look at services and perform administration, run the following command
from any database server.

  /opt/continuent/tungsten/tungsten-replicator/bin/trepctl services

Configuration is now complete.  For further information, please consult
Tungsten documentation, which is available at docs.continuent.com.

NOTE  >> Command successfully completed

P.S. Oracle Tungsten_directory need to be created manually 
SQL> CREATE OR REPLACE DIRECTORY tungsten_dir AS 
'/opt/migration/tungsten-replicator/scripts';

Original comment by vadym.Ko...@gmail.com on 14 Sep 2014 at 10:10

GoogleCodeExporter commented 9 years ago
Hi Vadym, many thanks for the excellent bug report.  We are going to release a 
new version of the replicator (3.0.0) but it's so close I don't know if this 
will make the cut.  We'll try to get a fix into the release as soon as we can. 

Original comment by robert.h...@continuent.com on 14 Sep 2014 at 11:19