Allocation failed in ARI (list recordings)

I have always Allocation failed error in ARI when folder have > 0 recordings.
Folder and files have 777 access.
No logs in CLI*.
  "error": "Allocation failed"

Is this a bug?

What version of Asterisk is this, is there anything on the console? I just used to do the same on my local running 13 and it worked fine.

Nothing in console.
Trying 14.4 and 14.5. Same result - “Allocation failed”

Looking at the code allocation failed will occur for just that, if memory allocation fails OR if the directory couldn’t be open. By default this directory is “/var/spool/asterisk/recording”. Does that exist with the proper permissions like you mentioned?

Yes. I applied chmod 0777 recording/ to folder.

When directory is empty, i receive empty list without errors:

How are you placing recordings in it? Are you not using the record ARI functionality?

I am using channel record ARI.
or format = ulaw.

Any idea?
Maybe problem in file system?

Trying to debug with strace:

[pid  5035] openat(AT_FDCWD, "/var/spool/asterisk/recording", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 29
[pid  5035] getdents(29, /* 3 entries */, 32768) = 80
[pid  5035] stat("/var/spool/asterisk/recording/test.wav", {st_mode=S_IFREG|0664, st_size=62124, ...}) = 0
[pid  5035] close(29)                   = 0
[pid  5035] write(18, "HTTP/1.1 500 Internal Server Err"..., 281) = 281
[pid  5035] write(18, "{\"error\":\"Allocation failed\"}", 29) = 29
[pid  5035] read(18, 0x1ca5d63, 1)      = -1 EAGAIN (Resource temporarily unavailable)
[pid  5035] poll([{fd=18, events=POLLIN|POLLPRI}], 1, 15000 <unfinished ...>
1 Like