# Aerospike getmany failed, error 22

**URL:** https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489
**Category:** asbackup & asrestore
**Tags:** error
**Created:** [February 12, 2016, 2:35am UTC](https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489 "2016-02-12T02:35:07Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![jinxiao](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/jinxiao/32/416_2.png) [@jinxiao](https://discuss.aerospike.com/u/jinxiao)
#### Post date: [February 12, 2016, 2:35am UTC](https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489/1 "2016-02-12T02:35:07Z")

</div>

when i backup my aerospike database i found this error i use this command `asbackup -n push -d $LOCALPATH/asbackup_$datestamp` is there something wrong or how i can find other clues to find the reason

---

<div class="post-metadata">

### Author: ![jyoti](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/jyoti/32/240_2.png) [@jyoti](https://discuss.aerospike.com/u/jyoti)
#### Post date: [February 12, 2016, 6:03am UTC](https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489/2 "2016-02-12T06:03:39Z")

</div>

Is migration is going on in cluster?

Recommending you to use latest aerospike tools. [Aerospike Downloads | Aerospike](http://www.aerospike.com/download/tools/3.7.3/)

---

<div class="post-metadata">

### Author: ![jinxiao](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/jinxiao/32/416_2.png) [@jinxiao](https://discuss.aerospike.com/u/jinxiao)
#### Post date: [February 12, 2016, 9:08am UTC](https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489/3 "2016-02-12T09:08:31Z")

</div>

nope, i tried asmonitor and info ,it showed migration(0,0)

---

<div class="post-metadata">

### Author: ![jinxiao](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/jinxiao/32/416_2.png) [@jinxiao](https://discuss.aerospike.com/u/jinxiao)
#### Post date: [February 12, 2016, 9:11am UTC](https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489/4 "2016-02-12T09:11:53Z")

</div>

i tried newest version of aerospike tools but it showed this: `2016-02-12 09:10:41 GMT [ERR] [11269] Error while running node scan for BB93A938D01B95C - code 22: AEROSPIKE_ERR_FAIL_FORBIDDEN at src/main/aerospike/aerospike_scan.c:192 2016-02-12 09:10:41 GMT [ERR] [11270] Error while running node scan for BB99E7F8D01B95C - code 22: AEROSPIKE_ERR_FAIL_FORBIDDEN at src/main/aerospike/aerospike_scan.c:192 2016-02-12 09:10:41 GMT [ERR] [11271] Error while running node scan for BB932938D01B95C - code 22: AEROSPIKE_ERR_FAIL_FORBIDDEN at src/main/aerospike/aerospike_scan.c:192 `

---

<div class="post-metadata">

### Author: ![jyoti](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/jyoti/32/240_2.png) [@jyoti](https://discuss.aerospike.com/u/jyoti)
#### Post date: [February 12, 2016, 9:26am UTC](https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489/5 "2016-02-12T09:26:16Z")

</div>

Looks like you have lots of scan job running in background. Asbackup issues a new scan for which its seeing max running job reached. Can you provide information about how many scan jobs running?

Run following command using aql: aql\> show scans

---

<div class="post-metadata">

### Author: ![jinxiao](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/jinxiao/32/416_2.png) [@jinxiao](https://discuss.aerospike.com/u/jinxiao)
#### Post date: [February 12, 2016, 9:49am UTC](https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489/6 "2016-02-12T09:49:23Z")

</div>

you are right , i found many scan jobs on node2

---

<div class="post-metadata">

### Author: ![jyoti](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/jyoti/32/240_2.png) [@jyoti](https://discuss.aerospike.com/u/jyoti)
#### Post date: [February 12, 2016, 10:55am UTC](https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489/7 "2016-02-12T10:55:13Z")

</div>

Thats why you are seeing scan jobs for asbackup is rejected. Wait for those scan jobs to complete, or if you dont need them anymore kill them .

Issue following command for the same:

Kill one scan job :- asinfo -v ‘scan-abort:id=jobid’

Kill all scan job :- asinfo -v ‘scan-abort-all:’

---

<div class="post-metadata">

### Author: ![jinxiao](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/jinxiao/32/416_2.png) [@jinxiao](https://discuss.aerospike.com/u/jinxiao)
#### Post date: [February 13, 2016, 2:46am UTC](https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489/8 "2016-02-13T02:46:26Z")

</div>

is it because that i have killed a asbackup progress that caused this problem?

---

<div class="post-metadata">

### Author: ![jyoti](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/jyoti/32/240_2.png) [@jyoti](https://discuss.aerospike.com/u/jyoti)
#### Post date: [February 13, 2016, 3:23pm UTC](https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489/9 "2016-02-13T15:23:38Z")

</div>

Maximum scan job active in a system is configured to 100. So Apart from killing one asbackup there is something else which stopped many scans, or may be during long period of time it happens.

---

<div class="post-metadata">

### Author: ![rbotzer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/rbotzer/32/2114_2.png) [@rbotzer](https://discuss.aerospike.com/u/rbotzer)
#### Post date: [February 13, 2016, 4:19pm UTC](https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489/10 "2016-02-13T16:19:29Z")

</div>

This _is_ configurable. See the configuration parameters [`scan-max-active`](http://www.aerospike.com/docs/reference/configuration/#scan-max-active). You should also check that your [`scan-thread`](http://www.aerospike.com/docs/reference/configuration/#scan-thread) value is set correctly. It should be equal to the number of cores on your machine.

---

<div class="post-metadata">

### Author: ![jinxiao](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/jinxiao/32/416_2.png) [@jinxiao](https://discuss.aerospike.com/u/jinxiao)
#### Post date: [February 14, 2016, 3:49am UTC](https://discuss.aerospike.com/t/aerospike-getmany-failed-error-22/2489/11 "2016-02-14T03:49:27Z")

</div>

i think i knew where the problem is , i wrote a shell script to backup everyday ,but with large amount of data , it cannot be finished in one day then another process of that shell runs , so it may cause too many scan operations
