quickfix doesn't correct restore session after waking up - quickfix

I've got an issue, please, look at the logs:
AAA is an LP
BBB is me
...
20141222-14:57:12.863 : 8=FIX.4.4 9=71 35=0 49=AAA 56=BBB 34=1326 52=20141222-14:57:12.905 10=033
here I closed the notebook
and here opened
20141223-06:54:15.190 : 8=FIX.4.4 9=151 35=A 34=1 49=BBB 52=20141223-06:54:15 56=AAA 98=0 108=20 141=N 554=... 10=245
20141223-06:54:15.307 : 8=FIX.4.4 9=89 35=A 49=AAA 56=BBB 34=1330 52=20141223-06:54:14.374 98=0 108=20 141=N 10=113
20141223-06:54:15.308 : 8=FIX.4.4 9=73 35=2 34=2 49=BBB 52=20141223-06:54:15 56=AAA 7=1 16=0 10=060
20141223-06:54:15.308 : 8=FIX.4.4 9=151 35=3 49=AAA 56=BBB 34=1331 52=20141223-06:54:14.374 45=1 371=34 372=A 373=99 58=Wrong sequence number. Expected 1319 but received 1 10=059
20141223-06:54:15.308 : 8=FIX.4.4 9=126 35=5 49=AAA 56=BBB 34=1332 52=20141223-06:54:14.374 58=Wrong sequence number. Expected 1319 but received 1 10=192
20141223-06:54:15.309 : 8=FIX.4.4 9=64 35=5 34=3 49=BBB 52=20141223-06:54:15 56=AAA 10=197
20141223-06:54:35.200 : 8=FIX.4.4 9=151 35=A 34=5 49=BBB 52=20141223-06:54:35 56=AAA 98=0 108=20 141=N 554=... 10=251
20141223-06:54:35.314 : 8=FIX.4.4 9=89 35=A 49=AAA 56=BBB 34=1337 52=20141223-06:54:34.385 98=0 108=20 141=N 10=124
20141223-06:54:35.315 : 8=FIX.4.4 9=73 35=2 34=6 49=BBB 52=20141223-06:54:35 56=AAA 7=3 16=0 10=068
20141223-06:54:35.316 : 8=FIX.4.4 9=151 35=3 49=AAA 56=BBB 34=1338 52=20141223-06:54:34.385 45=5 371=34 372=A 373=99 58=Wrong sequence number. Expected 1319 but received 5 10=078
20141223-06:54:35.316 : 8=FIX.4.4 9=126 35=5 49=AAA 56=BBB 34=1339 52=20141223-06:54:34.385 58=Wrong sequence number. Expected 1319 but received 5 10=207
...
As we can see after the waking up quickfix sends a logon request, and LP accepts it, then quickfix sends a resend request, but LP rejects it because request has the wrong sequence number. LP expects 1319, but quickfix sends 1. Why does it happen? May be I do something wrong?

The problem is closed. It was in the incorrect StartTime and EndTime settings.

Related

Get latest record (detail) from file data while parsing in Perl

I have alarm data for a Node, which is stored in a file.
Below is the file content:
Priority : LOW
Node : NR001
Problem : FREQUENT Problem
eventTime : 2020-09-08T14:30:45
State : ACTIVE_UNACKNOWLEDGED
Id : 1071
Number : 1071
ceaseTime : null
ackTime : null
additionalInformation : Object:XYZ=NULL#Frequent_Limit:3#Filter_Time:1
insertTime : 2020-09-08T14:30:45
eventId : 118382
lastUpdated : 2020-09-08T14:30:45
Priority : LOW
Node : NR001
Problem : FREQUENT Problem
eventTime : 2020-09-08T14:30:45
State : ACTIVE_UNACKNOWLEDGED
Id : 1071
Number : 1071
ceaseTime : null
ackTime : null
additionalInformation : Object:XYZ=NULL#Frequent_Limit:3#Filter_Time:1
insertTime : 2020-09-08T14:30:45
eventId : 118382
lastUpdated : 2020-09-08T14:32:46
Priority : CLEARED
Node : NR001
Problem : FREQUENT Problem
eventTime : 2020-09-08T14:30:45
State : CLEARED_UNACKNOWLEDGED
Id : 1071
Number : 1071
ceaseTime : 2020-09-08T14:32:46
ackTime : null
additionalInformation : Object:XYZ=NULL#Frequent_Limit:3#Filter_Time:1
insertTime : 2020-09-08T14:30:45
eventId : 118382
lastUpdated : 2020-09-08T14:32:46
This data belongs to one alarm, you can see for all the eventId the value is 118382.
If I have multiple alarms, for each of the alarm we will be having different eventId numbers. (Here in above example I have only one alarm detail.)
Above data shows what all operations has been performed to an alarm which has eventId = 118382 on 2020-09-08.
What I need to pick from this alarm data with the latest lastUpated time for each alarm.
Here is my code:
use strict;
use warnings;
use Data::Dumper;
$/ = "";
my %data;
while(<DATA>) {
my $rec = { split /\n| : /, $_ };
$data{$rec->{eventId}} = $rec;
}
print Dumper \%data;
my $limit = "NA";
print "eventId, priority, lastUpdated, limit\n";
foreach my $e_id ( keys %data){
($limit = $1 ) if( $data{$e_id}{'additionalInformation'} =~ /Frequent_Limit:(\d+)/);
print "$e_id, $data{$e_id}{'Priority'}, $data{$e_id}{'lastUpdated'}, $limit\n";
}
My script is picking the last record with respect to particular key. But how can I fetch data based on lastUpdated date for a particular eventId.
Also, if I have same value for lastUpdated date for a single eventId, it should fetch the one which has Priority CLEARED.
Here the output should be:
eventId, priority, lastUpdated, limit
118382,CLEARED,2020-09-09T14:34:13, 3
Since your records are separated by blank lines, just read chunks separated by blank lines. "Paragraph mode" ($/ = "";) makes this trivial.
my %selected;
{
local $/ = "";
while ( my $row = <> ) {
my %row =
map { split / : /, $_, 2 }
split /\n/, $row;
my $id = $row{eventId};
$selected{$id} = \%row
if !$selected{$id}
|| $row{lastUpdated} gt $selected{$id}{lastUpdated}
|| $row{lastUpdated} eq $selected{$id}{lastUpdated} && $row{Priority} eq 'CLEARED';
}
}
for my $eventId (keys(%selected)) {
my $row = $selected{$eventId};
my %addi =
map { split /:/, $_, 2 }
split /\#/, $row->{additionalInformation};
say
join ",",
$row->{eventId},
$row->{Priority},
$row->{lastUpdated},
$addi{Frequent_Limit};
}
You can speed things up by exiting the loop sooner by making assumptions about the data.
Please investigate following demo code for compliance with your problem
use strict;
use warnings;
use feature 'say';
my $eventId = shift || '118382';
my %last_event;
my #fields = qw/eventId Priority lastUpdated limit/;
my #records = do { local $/ = "", <DATA> };
for my $record ( #records ) {
my %event = ( $record =~ /^(.*?) : (.*)/mg );
next unless defined $event{eventId};
$event{limit} = $1 if $event{additionalInformation} =~ /Frequent_Limit:(\d+)/;
$last_event{$event{eventId}} = \%event;
}
say join ',', #fields;
say join ',', #{$last_event{$eventId}}{#fields};
__DATA__
Priority : LOW
Node : NR001
Problem : FREQUENT Problem
eventTime : 2020-09-08T14:30:45
State : ACTIVE_UNACKNOWLEDGED
Id : 1071
Number : 1071
ceaseTime : null
ackTime : null
additionalInformation : Object:XYZ=NULL#Frequent_Limit:3#Filter_Time:1
insertTime : 2020-09-08T14:30:45
eventId : 118382
lastUpdated : 2020-09-08T14:30:45
Priority : LOW
Node : NR001
Problem : FREQUENT Problem
eventTime : 2020-09-08T14:30:45
State : ACTIVE_UNACKNOWLEDGED
Id : 1071
Number : 1071
ceaseTime : null
ackTime : null
additionalInformation : Object:XYZ=NULL#Frequent_Limit:3#Filter_Time:1
insertTime : 2020-09-08T14:30:45
eventId : 118382
lastUpdated : 2020-09-08T14:32:46
Priority : CLEARED
Node : NR001
Problem : FREQUENT Problem
eventTime : 2020-09-08T14:30:45
State : CLEARED_UNACKNOWLEDGED
Id : 1071
Number : 1071
ceaseTime : 2020-09-08T14:32:46
ackTime : null
additionalInformation : Object:XYZ=NULL#Frequent_Limit:3#Filter_Time:1
insertTime : 2020-09-08T14:30:45
eventId : 118382
lastUpdated : 2020-09-08T14:32:46
Output
eventId,Priority,lastUpdated,limit
118382,CLEARED,2020-09-08T14:32:46,3

create tablespace problem in db2 HADR environment

We have Db2 10.5.0.7 on centos 6.9 and TSAMP 3.2 as our high availability solution, when we create a tablespace in primary database we encounter the following errors in the standby:
2019-08-31-08.47.32.164952+270 I87056E2779 LEVEL: Error (OS)
PID : 4046 TID : 47669095425792 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : SAMDB
APPHDL : 0-8 APPID: *LOCAL.DB2.190725231126
HOSTNAME: samdb-b EDUID : 155 EDUNAME: db2redom
(SAMDB) 0 FUNCTION: DB2 Common, OSSe, ossGetDiskInfo, probe:130
MESSAGE : ECF=0x90000001=-1879048191=ECF_ACCESS_DENIED
Access denied CALLED : OS, -, fopen OSERR: EACCES (13) DATA #1 : String, 12 bytes /proc/mounts DATA #2 :
String, 25 bytes /dbdata1/samdbTsContainer DATA #3 : unsigned integer,
8 bytes
2019-08-31-08.47.32.185625+270 E89836E494 LEVEL: Error PID
: 4046 TID : 47669095425792 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : SAMDB
APPHDL : 0-8 APPID: *LOCAL.DB2.190725231126
HOSTNAME: samdb-b EDUID : 155 EDUNAME: db2redom
(SAMDB) 0 FUNCTION: DB2 UDB, high avail services,
sqlhaGetLocalDiskInfo, probe:9433 MESSAGE :
ECF=0x90000001=-1879048191=ECF_ACCESS_DENIED
Access denied
2019-08-31-08.47.32.186258+270 E90331E484 LEVEL: Error PID
: 4046 TID : 47669095425792 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : SAMDB
APPHDL : 0-8 APPID: *LOCAL.DB2.190725231126
HOSTNAME: samdb-b EDUID : 155 EDUNAME: db2redom
(SAMDB) 0 FUNCTION: DB2 UDB, high avail services, sqlhaCreateMount,
probe:9746 RETCODE : ZRC=0x827300AA=-2106392406=HA_ZRC_FAILED "SQLHA
API call error"
2019-08-31-08.47.32.186910+270 I90816E658 LEVEL: Error PID
: 4046 TID : 47669095425792 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : SAMDB
APPHDL : 0-8 APPID: *LOCAL.DB2.190725231126
HOSTNAME: samdb-b EDUID : 155 EDUNAME: db2redom
(SAMDB) 0 FUNCTION: DB2 UDB, buffer pool services,
sqlbDMSAddContainerRequest, probe:812 MESSAGE :
ZRC=0x827300AA=-2106392406=HA_ZRC_FAILED "SQLHA API call error" DATA
: String, 36 bytes Cluster add mount operation failed: DATA #2 : String, 37 bytes /dbdata1/samdbTsContainer/TSPKGCACH.1 DATA #3 :
String, 8 bytes SAMDB
2019-08-31-08.47.32.190537+270 E113909E951 LEVEL: Error PID
: 4046 TID : 47669095425792 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : SAMDB
APPHDL : 0-8 APPID: *LOCAL.DB2.190725231126
HOSTNAME: samdb-b EDUID : 155 EDUNAME: db2redom
(SAMDB) 0 FUNCTION: DB2 UDB, buffer pool services,
sqlblog_reCreatePool, probe:3134 MESSAGE : ADM6106E Table space
"TSPKGCACH" (ID = "49") could not be created
during the rollforward operation. The most likely cause is that there
is not enough space to create the containers associated with the
table space. Connect to the database after the rollforward operation
completes and use the SET TABLESPACE CONTAINERS command to assign
containers to the table space. Then, issue another ROLLFORWARD
DATABASE command to complete recovery of this table space.
2019-08-31-08.47.32.200949+270 E114861E592 LEVEL: Error PID
: 4046 TID : 47669095425792 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : SAMDB
APPHDL : 0-8 APPID: *LOCAL.DB2.190725231126
HOSTNAME: samdb-b EDUID : 155 EDUNAME: db2redom
(SAMDB) 0 FUNCTION: DB2 UDB, buffer pool services, sqlbIncPoolState,
probe:4628 MESSAGE : ADM12512W Log replay on the HADR standby has
stopped on table space
"TSPKGCACH" (ID "49") because it has been put into "ROLLFORWARD
PENDING" state.
There is free space available for the database and the specified path (/dbdata1/samdbTsContainer) exists on the server and we can create file manually on it .
all settings are equivalent on the primary and standby. db2inst1 is the owner of /dbdata1/samdbTsContainer and permission is drwxr-xr-x, the result of su - db2inst1 “ulimit -Hf” is unlimited and ext3 is file system type and create tablespace statement is as follows:
CREATE LARGE TABLESPACE TSPKGCACH IN DATABASE PARTITION GROUP IBMDEFAULTGROUP PAGESIZE 8 K MANAGED BY DATABASE USING (FILE '/dbdata1/samdbTsContainer/TSPKGCACH.1' 5120) ON DBPARTITIONNUM (0) EXTENTSIZE 64 PREFETCHSIZE 64 BUFFERPOOL BP8KPKGCACH OVERHEAD 10.5 TRANSFERRATE 0.14 DATA TAG NONE NO FILE SYSTEM CACHING;
SELinux is disabled and the sector size is 512 bytes. The mount options are as follws:
/dev/sdf1 /dbdata1 ext3 rw,relatime,errors=continue,barrier=1,data=ordered 0 0
We can not recreate the problem sometimes this problem occur and we don't know the reason of it, but the problem remains until server reboot.
When we restart the standby server problem solves but we need to drop the tablespace and recreate it, is there any idea for this problem?
From the error it looks to me that problem is not with the file access itself but rather /proc/mounts, which Db2 uses to do the mapping between containers and filesystems (to know e.g. the FS type). Hence I suggest to test whether all:
cat /proc/mounts
cat /proc/self/mounts
mount
work OK run as Db2 instance owner ID (db2inst1). If not, this implies some odd OS issue that Db2 is a victim of and we would need more OS diagnostics (e.g strace from the cat /proc/mounts command) to understand it.
Edit:
To confirm this theory I've run a quick test with Db2 11.1. Note this must be TSA-controlled environment for Db2 to follow sqlhaCreateMount code path (because if this will be a separate mount, Db2 will add it to the TSA resource model)
On both primary and standby:
mkdir /db2data
chown db2v111:db2iadm /db2data
then on standby:
chmod o-rx /proc
(couldn't find a "smarter" way to hit EACCES on mount info).
When I will run on primary:
db2 "create tablespace test managed by database using (file '/db2data/testts' 100 M)"
it completes fine on primary but standby hits exactly the error you are seeing:
2019-06-21-03.00.37.087693+120 I1774E2661 LEVEL: Error (OS)
PID : 10379 TID : 46912992438016 PROC : db2sysc 0
INSTANCE: db2v111 NODE : 000 DB : SAMPLE
APPHDL : 0-4492 APPID: *LOCAL.DB2.190621005919
HOSTNAME: rhel-hadrs.kkuduk.com
EDUID : 61 EDUNAME: db2redom (SAMPLE) 0
FUNCTION: DB2 Common, OSSe, ossGetDiskInfo, probe:130
MESSAGE : ECF=0x90000001=-1879048191=ECF_ACCESS_DENIED
Access denied
CALLED : OS, -, fopen OSERR: EACCES (13)
DATA #1 : String, 12 bytes
/proc/mounts
DATA #2 : String, 8 bytes
/db2data
DATA #3 : unsigned integer, 8 bytes
1
CALLSTCK: (Static functions may not be resolved correctly, as they are resolved to the nearest symbol)
[0] 0x00002AAAB9CFD84B /home/db2v111/sqllib/lib64/libdb2osse.so.1 + 0x23F84B
[1] 0x00002AAAB9CFED51 ossLogSysRC + 0x101
[2] 0x00002AAAB9D19647 ossGetDiskInfo + 0xF07
[3] 0x00002AAAAC52402C _Z21sqlhaGetLocalDiskInfoPKcjPcjS1_jS1_ + 0x26C
[4] 0x00002AAAAC523C5F _Z16sqlhaGetDiskInfoPKcS0_jPcjS1_jS1_ + 0x29F
[5] 0x00002AAAAC521CA0 _Z16sqlhaCreateMountPKcS0_m + 0x350
[6] 0x00002AAAACDE8D5D _Z26sqlbDMSAddContainerRequestP12SQLB_POOL_CBP16SQLB_POOLCONT_CBP12SQLB_GLOBALSP14SQLB_pfParIoCbbm + 0x90D
[7] 0x00002AAAACE14FF9 _Z29sqlbDoDMSAddContainerRequestsP12SQLB_POOL_CBP16SQLB_POOLCONT_CBjP26SQLB_AS_CONT_AND_PATH_INFOP12SQLB_GLOBALS + 0x2D9
[8] 0x00002AAAACE0C20F _Z17sqlbDMSCreatePoolP12SQLB_POOL_CBiP16SQLB_POOLCONT_CBbP12SQLB_GLOBALS + 0x103F
[9] 0x00002AAAACDB1EAC _Z13sqlbSetupPoolP12SQLB_GLOBALSP12SQLB_POOL_CBPKciiiihiP19SQLB_CONTAINER_SPECllblsib + 0xE4C
-> it is an issue with /proc/mounts access, not the target path itself, where i can write with no issues:
[db2v111#rhel-hadrs ~]$ echo "test" > /db2data/testfile
If that would be path access issue:
chmod o+rx /proc
chmod a-rw /db2data
then an error during the "CREATE TABLESPACE" redo on standby will be different:
2019-06-21-03.07.29.175486+120 I35023E592 LEVEL: Error
PID : 10379 TID : 46912992438016 PROC : db2sysc 0
INSTANCE: db2v111 NODE : 000 DB : SAMPLE
APPHDL : 0-4492 APPID: *LOCAL.DB2.190621005919
HOSTNAME: rhel-hadrs.kkuduk.com
EDUID : 61 EDUNAME: db2redom (SAMPLE) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbCreateAndLockParent, probe:918
MESSAGE : ZRC=0x8402001E=-2080243682=SQLB_CONTAINER_NOT_ACCESSIBLE
"Container not accessible"
DATA #1 : <preformatted>
Failed at directory /db2data.
2019-06-21-03.07.29.175799+120 I35616E619 LEVEL: Severe
PID : 10379 TID : 46912992438016 PROC : db2sysc 0
INSTANCE: db2v111 NODE : 000 DB : SAMPLE
APPHDL : 0-4492 APPID: *LOCAL.DB2.190621005919
HOSTNAME: rhel-hadrs.kkuduk.com
EDUID : 61 EDUNAME: db2redom (SAMPLE) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbCreateAndLockParent, probe:722
MESSAGE : ZRC=0x8402001E=-2080243682=SQLB_CONTAINER_NOT_ACCESSIBLE
"Container not accessible"
DATA #1 : <preformatted>
Failed to create a portion of the path /db2data/testts2
(few more errors follow pointing directly to the permissions on /db2data)
This proves it is the /proc access issue and you need to debug it with your OS team. Perhaps /proc gets completely unmounted?
In any case, the actual issue is db2sysc process hitting EACCES running fopen on /proc/mounts and you need debug it further with OS team.
Edit:
When it comes to the debugging and proving the error is returned by the OS, we would have to trace open() syscalls done by Db2. Strace can do that, but overhead is too high for a production system. If you can get SystemTap installed on the system, I suggest a script like this (this is a basic version):
probe nd_syscall.open.return
{
if ( user_string( #entry( pointer_arg(1) ) ) =~ ".*mounts")
{
printf("exec: %s pid: %d uid: %d (euid: %d) gid: %d (egid: %d) run open(%s) rc: %d\n", execname(), pid(), uid(), euid(), gid(), egid(), user_string(#entry(pointer_arg(1)), "-"), returnval() )
}
}
it uses nd_syscall probe, so it will work even without kernel debuginfo package. You can run it like this:
$ stap open.stap
exec: cat pid: 24159 uid: 0 (euid: 0) gid: 0 (egid: 0) run open(/proc/mounts) rc: 3
exec: cat pid: 24210 uid: 0 (euid: 0) gid: 0 (egid: 0) run open(/proc/mounts) rc: 3
exec: cat pid: 24669 uid: 1111 (euid: 1111) gid: 1001 (egid: 1001) run open(/proc/mounts) rc: 3
exec: cat pid: 24734 uid: 1111 (euid: 1111) gid: 1001 (egid: 1001) run open(/proc/mounts) rc: -13
exec: cat pid: 24891 uid: 1111 (euid: 1111) gid: 1001 (egid: 1001) run open(/proc/self/mounts) rc: -13
exec: ls pid: 24971 uid: 1111 (euid: 1111) gid: 1001 (egid: 1001) run open(/proc/mounts) rc: -13
-> at some point I've revoked access from /proc and open attempt failed with -13 (EACCES). You just need to enable it on the system when you see the error and see if something is logged when Db2 fails.

KSQL: stream select query is not populating the data

Select query against created stream on topic in KSQL , is not giving the result where as respective topics are holing the message .
Step1: producer command :
root#masbidw1.usa.corp.ad:/usr/hdp/3.0.1.0-187/confluentclient/confluent-5.2.2> bin/kafka-console-producer --broker-list masbidw1.usa.corp.ad:9092 --topic emptable3
>TEST1,TEST2,TEST3
Step-2:Print command in KSQL terminal :
ksql> print 'emptable3' from beginning;
Format:STRING
8/16/19 10:57:45 AM EDT , NULL , TEST1,TEST2,TEST3
8/16/19 11:00:09 AM EDT , NULL , TEST1,TEST2,TEST3
8/16/19 11:00:16 AM EDT , NULL , TEST1,TEST2,TEST3
8/16/19 2:17:36 PM EDT , NULL , TEST1,TEST2,TEST3
Consumer is not giving the result without partition number :
root#masbidw1.usa.corp.ad:/usr/hdp/3.0.1.0-187/confluentclient/confluent-5.2.2> bin/kafka-console-consumer --bootstrap-server masbidw1.usa.corp.ad:9092 --topic emptable3 --from-beginning
So added partition number in consumer command and it is giving the message out .
root#masbidw1.usa.corp.ad:/usr/hdp/3.0.1.0-187/confluentclient/confluent-5.2.2> bin/kafka-console-consumer --bootstrap-server masbidw1.usa.corp.ad:9092 --topic emptable3 --from-beginning --partition 0
TEST1,TEST2,TEST3
TEST1,TEST2,TEST3
TEST1,TEST2,TEST3
TEST1,TEST2,TEST3
Setting up the earliest property in KSQL terminal
'auto.offset.reset'='earliest'
creating the KSQL stream:
CREATE STREAM emptable2_stream (column1 STRING, column2 STRING, column3 STRING) WITH (KAFKA_TOPIC='emptable3', VALUE_FORMAT='DELIMITED');
selecting the value from KSQL stream:
ksql> select * from EMPTABLE3_STREAM;
Press CTRL-C to interrupt
But No response . Even new data itself is not getting queried from the stream
Describe extended
ksql> describe extended EMPTABLE3_STREAM;
Name : EMPTABLE3_STREAM
Type : STREAM
Key field :
Key format : STRING
Timestamp field : Not set - using <ROWTIME>
Value format : DELIMITED
Kafka topic : emptable3 (partitions: 1, replication: 1)
Field | Type
-------------------------------------
ROWTIME | BIGINT (system)
ROWKEY | VARCHAR(STRING) (system)
COLUMN1 | VARCHAR(STRING)
COLUMN2 | VARCHAR(STRING)
COLUMN3 | VARCHAR(STRING)
-------------------------------------
Local runtime statistics
------------------------
(Statistics of the local KSQL server interaction with the Kafka topic emptable3)

Unable to restore the Db2 backup

I am unable to restore the Db2 backup. Getting error while executing the following line
DB2 Version : 9.7, AIX Version 5.3
rollforward db VATAMC2 stop
SQL0752N Connecting to a database is not permitted within a logical unit of
work when the CONNECT type 1 setting is in use. SQLSTATE=0A001
Attached are the set of commands that I executed to restore the db.
I am getting Error due to the last statement only and the rest all the statements are executed successfully.
Logs attached.
Can someone help me out with the same?
Code which I executed:
restore db PRODVAT user mstadmin using password from /data/db2_backupfs taken at 20160304 into VATAMC2 redirect without prompting;
set tablespace containers for 29 using (path '/data/VAT_AMC2/tbs29/cont1');
set tablespace containers for 46 using (path '/data/VAT_AMC2/tbs46/cont1');
set tablespace containers for 47 using (path '/data/VAT_AMC2/tbs47/cont1');
set tablespace containers for 43 using (path '/data/VAT_AMC2/tbs43/cont1');
set tablespace containers for 48 using (path '/data/VAT_AMC2/tbs48/cont1');
set tablespace containers for 44 using (path '/data/VAT_AMC2/tbs44/cont1');
set tablespace containers for 34 using (file '/data/VAT_AMC2/tbs34/cont1' 589824);
set tablespace containers for 35 using (file '/data/VAT_AMC2/tbs35/cont1' 4680192, file '/data/VAT_AMC2/tbs35/cont1a' 4680192);
set tablespace containers for 36 using (file '/data/VAT_AMC2/tbs36/cont2' 3669984, file '/data/VAT_AMC2/tbs36/cont2a' 3669984);
set tablespace containers for 37 using (file '/data/VAT_AMC2/tbs37/cont1' 3898624, file '/data/VAT_AMC2/tbs37/cont1a' 3898624);
set tablespace containers for 38 using (file '/data/VAT_AMC2/tbs38/cont1' 3295788 , file '/data/VAT_AMC2/tbs38/cont1a' 1647892);
set tablespace containers for 39 using (file '/data/VAT_AMC2/tbs39/cont1' 3669976 , file '/data/VAT_AMC2/tbs39/cont12a' 3669976, file '/data/VAT_AMC2/tbs39/cont12b' 3669976, file '/data/VAT_AMC2/tbs39/cont13a' 3669976);
set tablespace containers for 40 using (file '/data/VAT_AMC2/tbs40/cont1' 5509291, file '/data/VAT_AMC2/tbs40/cont1a' 5509290, file '/data/VAT_AMC2/tbs40/cont1b' 5509290);
set tablespace containers for 41 using (file '/data/VAT_AMC2/tbs41/cont1' 2294656);
set tablespace containers for 42 using (file '/data/VAT_AMC2/tbs42/cont1' 4718592);
set tablespace containers for 45 using (file '/data/VAT_AMC2/tbs45/cont1' 1987872, file '/data/VAT_AMC2/tbs45/cont2' 1987872);
set tablespace containers for 49 using (file '/data/VAT_AMC2/tbs49/cont1' 4476974, file '/data/VAT_AMC2/tbs49/cont2' 4476973, file '/data/VAT_AMC2/tbs49/cont3' 4476973);
set tablespace containers for 50 using (file '/data/VAT_AMC2/tbs50/cont1' 3744512);
set tablespace containers for 51 using (file '/data/VAT_AMC2/tbs51/cont1' 5639424);
set tablespace containers for 52 using (file '/data/VAT_AMC2/tbs52/cont1' 4132096);
set tablespace containers for 53 using (file '/data/VAT_AMC2/tbs53/cont1' 3932160);
set tablespace containers for 54 using (file '/data/VAT_AMC2/tbs54/cont1' 4469376, file '/data/VAT_AMC2/tbs54/cont2' 4469376, file '/data/VAT_AMC2/tbs54/cont3' 4469376);
set tablespace containers for 55 using (file '/data/VAT_AMC2/tbs55/cont1' 4194304, file '/data/VAT_AMC2/tbs55/cont2a' 4194304, file '/data/VAT_AMC2/tbs55/cont2b' 4194304, file '/data/VAT_AMC2/tbs55/cont3a' 4194304);
restore db PRODVAT continue;
rollforward db VATAMC2 stop;
Db2 Log:
2016-03-10-09.06.41.911428-360 E6918736A469 LEVEL: Event
PID : 389280 TID : 2572 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPHDL : 0-7 APPID: *LOCAL.db2inst1.160310150641
AUTHID : MSTADMIN
EDUID : 2572 EDUNAME: db2agent (VATAMC2) 0
FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::FirstConnect, probe:1000
START : DATABASE: VATAMC2 : ACTIVATED: NO
2016-03-10-09.06.41.913584-360 E6919206A481 LEVEL: Info
PID : 389280 TID : 2572 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPHDL : 0-7 APPID: *LOCAL.db2inst1.160310150641
AUTHID : MSTADMIN
EDUID : 2572 EDUNAME: db2agent (VATAMC2) 0
FUNCTION: DB2 UDB, database utilities, sqluxGetDegreeParallelism, probe:774
DATA #1 :
Autonomic BAR - using parallelism = 2.
2016-03-10-09.06.41.915158-360 E6919688A492 LEVEL: Info
PID : 389280 TID : 2572 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPHDL : 0-7 APPID: *LOCAL.db2inst1.160310150641
AUTHID : MSTADMIN
EDUID : 2572 EDUNAME: db2agent (VATAMC2) 0
FUNCTION: DB2 UDB, database utilities, sqludPrintStartingMsg, probe:1338
DATA #1 :
Starting a full database restore.
Agent EDU ID: 2572
2016-03-10-09.06.41.915354-360 E6920181A554 LEVEL: Warning
PID : 389280 TID : 2572 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPHDL : 0-7 APPID: *LOCAL.db2inst1.160310150641
AUTHID : MSTADMIN
EDUID : 2572 EDUNAME: db2agent (VATAMC2) 0
FUNCTION: DB2 UDB, database utilities, sqluCompareDB, probe:1445
DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes
2528
DATA #2 : Hexdump, 4 bytes
0x07000000491947D8 : 0000 09E0 ....
2016-03-10-09.06.41.915502-360 E6920736A985 LEVEL: Warning
PID : 389280 TID : 2572 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPHDL : 0-7 APPID: *LOCAL.db2inst1.160310150641
AUTHID : MSTADMIN
EDUID : 2572 EDUNAME: db2agent (VATAMC2) 0
FUNCTION: DB2 UDB, database utilities, sqluCompareDB, probe:1445
MESSAGE : SQL2540W Restore is successful, however a warning "" was encountered
during Database Restore while processing in No Interrupt mode.
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: 2540 sqlerrml: 4
sqlerrmc: 2528
sqlerrp : sqluComp
sqlerrd : (1) 0x00000000 (2) 0x00000000 (3) 0x00000000
(4) 0x00000000 (5) 0x00000000 (6) 0x00000000
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate:
2016-03-10-09.06.41.919710-360 E6921722A520 LEVEL: Info
PID : 389280 TID : 2572 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPHDL : 0-7 APPID: *LOCAL.db2inst1.160310150641
AUTHID : MSTADMIN
EDUID : 2572 EDUNAME: db2agent (VATAMC2) 0
FUNCTION: DB2 UDB, database utilities, sqluxGetAvailableHeapPages, probe:888
DATA #1 :
Autonomic BAR - heap consumption.
Targetting (90%) - 112118 of 124576 pages.
2016-03-10-09.06.41.919864-360 E6922243A508 LEVEL: Info
PID : 389280 TID : 2572 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPHDL : 0-7 APPID: *LOCAL.db2inst1.160310150641
AUTHID : MSTADMIN
EDUID : 2572 EDUNAME: db2agent (VATAMC2) 0
FUNCTION: DB2 UDB, database utilities, sqludTuneBuffers, probe:1139
DATA #1 :
Autonomic restore - tuning enabled.
Using buffer size = 4097, number = 4.
2016-03-10-09.06.42.976640-360 I6922752A522 LEVEL: Error
PID : 389280 TID : 13109 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000
EDUID : 13109 EDUNAME: db2bm.2572.0 (VATAMC2) 0
FUNCTION: DB2 UDB, buffer pool services, sqlbDMSDoContainerOp, probe:810
MESSAGE : ZRC=0x8402001E=-2080243682=SQLB_CONTAINER_NOT_ACCESSIBLE
"Container not accessible"
DATA #1 :
Error checking container 0 (/dsexp11/cont/tbs60/cont1) for tbsp 56. Rc = 870F0011
2016-03-10-09.06.43.094056-360 E6923275A555 LEVEL: Warning
PID : 389280 TID : 2572 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPHDL : 0-7 APPID: *LOCAL.db2inst1.160310150641
AUTHID : MSTADMIN
EDUID : 2572 EDUNAME: db2agent (VATAMC2) 0
FUNCTION: DB2 UDB, database utilities, sqludBMResponse, probe:310
DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes
1277
DATA #2 : Hexdump, 4 bytes
0x07000000491947D8 : 0000 04FD ....
2016-03-10-09.06.43.094275-360 E6923831A1057 LEVEL: Warning
PID : 389280 TID : 2572 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPHDL : 0-7 APPID: *LOCAL.db2inst1.160310150641
AUTHID : MSTADMIN
EDUID : 2572 EDUNAME: db2agent (VATAMC2) 0
FUNCTION: DB2 UDB, database utilities, sqludBMResponse, probe:310
MESSAGE : SQL1277W A redirected restore operation is being performed. Table
space configuration can now be viewed and table spaces that do not
use automatic storage can have their containers reconfigured.
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: 1277 sqlerrml: 0
sqlerrmc:
sqlerrp : sqludBMR
sqlerrd : (1) 0x00000000 (2) 0x00000000 (3) 0x00000000
(4) 0x00000000 (5) 0x00000000 (6) 0x00000000
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate:
2016-03-10-09.06.43.883679-360 E6924889A567 LEVEL: Warning
PID : 389280 TID : 2572 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPHDL : 0-7 APPID: *LOCAL.db2inst1.160310150641
AUTHID : MSTADMIN
EDUID : 2572 EDUNAME: db2agent (VATAMC2) 0
FUNCTION: DB2 UDB, database utilities, sqludCheckRedirectedStatus, probe:1065
DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes
1277
DATA #2 : Hexdump, 4 bytes
0x07000000491947D8 : 0000 04FD ....
2016-03-10-09.06.43.883857-360 E6925457A1069 LEVEL: Warning
PID : 389280 TID : 2572 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPHDL : 0-7 APPID: *LOCAL.db2inst1.160310150641
AUTHID : MSTADMIN
EDUID : 2572 EDUNAME: db2agent (VATAMC2) 0
FUNCTION: DB2 UDB, database utilities, sqludCheckRedirectedStatus, probe:1065
MESSAGE : SQL1277W A redirected restore operation is being performed. Table
space configuration can now be viewed and table spaces that do not
use automatic storage can have their containers reconfigured.
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: 1277 sqlerrml: 0
sqlerrmc:
sqlerrp : sqludChe
sqlerrd : (1) 0x00000000 (2) 0x00000000 (3) 0x00000000
(4) 0x00000000 (5) 0x00000000 (6) 0x00000000
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate:
2016-03-10-09.06.43.884062-360 I6926527A840 LEVEL: Warning
PID : 389280 TID : 2572 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPHDL : 0-7 APPID: *LOCAL.db2inst1.160310150641
AUTHID : MSTADMIN
EDUID : 2572 EDUNAME: db2agent (VATAMC2) 0
FUNCTION: DB2 UDB, database utilities, sqludCheckRedirectedStatus, probe:1068
DATA #1 :
Insufficient space in tablespace DMS_TB6_TS; you must have at least 6402208
usable pages. (The "usable pages" total does not include pages used
internally by DB2, so the value specified on the SET TABLESPACE
CONTAINERS operation should be increased by one extent per container.
Based on the latest SET TABLESPACE CONTAINERS values specifed, the
tablespace should have 6402272 pages in total.)
2016-03-10-09.06.43.884818-360 I6927368A345 LEVEL: Severe
PID : 360608 TID : 1 PROC : db2bp
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPID : *LOCAL.db2inst1.160310150641
EDUID : 1
FUNCTION: DB2 UDB, base sys utilities, sqleStartUsingDatabase, probe:2
RETCODE : ZRC=0xFFFFFD10=-752
2016-03-10-09.06.43.885281-360 I6927714A376 LEVEL: Error
PID : 360608 TID : 1 PROC : db2bp
INSTANCE: db2inst1 NODE : 000 DB : VATAMC2
APPID : *LOCAL.db2inst1.160310150641
EDUID : 1
FUNCTION: DB2 UDB, data protection services, sqlpsrllf, probe:317
MESSAGE : Rollforward failed to connect to database. sqlcode -752.

SQL0903N COMMIT statement failed, transaction rolled back in db2luw

I am working on Db2 ATS jobs.
This is what I have tried. Created one procedure p1 on database d1.This procedure will update a table t1 on database d1.From the procedure p1 on a direct call i can update table t1.
And now I have created one table t2 on database d2. From database d1 I am trying to update this table t2 . This is also working fine.
From the database d1 I can update the two tables t1 & t2.
Now I tried the same with a ATS jobs.
I can submit a job to call procedure p1 to update table t1 on database d1 .The job is working fine & able to view the updated records.
tried to submit a job from d1 which will update a table t2 on database d2.
Job is running fine without any error. But the table is not updating.
Below is my procedure & logs Can some one tell me what I am missing here:
CREATE or REPLACE PROCEDURE D_JUMP12(IN text VARCHAR(32672))
p1:BEGIN
DECLARE jobno NUMBER;
execute IMMEDIATE TEXT;
COMMIT;
END p1
This is the way I am calling the procedure:
call DBMS_JOB.SUBMIT (?, 'CALL D_JUMP12(''UPDATE sample.reg.CABS SET FIRSTNAME = reg_f_fixed_char_repos(FIRSTNAME)'')',NULL);
These are my logs:
2015-03-17-18.37.10.360000+330 E110713390F554 LEVEL: Error
PID : 2460 TID : 444 PROC : db2fmp64.exe
INSTANCE: DB2 NODE : 000 DB : test1
APPID : *LOCAL.DB2.150317130717
HOSTNAME: MANGO-04
EDUID : 444
FUNCTION: DB2 UDB, Administrative Task Scheduler, AtsConnection::commit, probe:900
MESSAGE : ECF=0x82BA00E1=-2101739295
DATA #1 : String, 124 bytes
[IBM][CLI Driver][DB2/NT64] SQL0903N COMMIT statement failed, transaction rolled back. Reason code: "2". SQLSTATE=40504
2015-03-17-18.37.10.364000+330 I110713946F425 LEVEL: Error
PID : 2460 TID : 444 PROC : db2fmp64.exe
INSTANCE: DB2 NODE : 000 DB : test1
APPID : *LOCAL.DB2.150317130717
HOSTNAME: MANGO-04
EDUID : 444
FUNCTION: DB2 UDB, Administrative Task Scheduler, AtsTask::run, probe:1300
MESSAGE : ECF=0x82BA00E1=-2101739295
DATA #1 : Codepath, 8 bytes
4
Kindly let me know what I am missing here