Ask help on usring openvas-nasl to run/debug a single nasl file

Dear friends,

I’m trying to use openvas-nasl to run/debug a single nasl file. However it always report redis connection error as below even if to run the very simple hello.nasl, which has only one display line.
(openvas-nasl: 5915): lib kb_redis-CRITICAL **: get_redis_ctx: redis connection error: No such file or directory.

To be commented, the same system runs well for the normal scan with openvassd/openvasmd.

So my question is: to run openvas-nasl, is there any special configuration or settings required?

Thanks and BRs,

Jasmine

@juan are you using gvm user to run nasl?

try adding strace before command …

Eero

Hi Eero,

Thank you very much for your reply!
I’m using an old version of openvas-nasl (9.0.3). After further investigation and trying, it is found that the possible reason is redis.sock was not properly configured. When I configured it to the same redis.sock as the one openvassd uses by softlink, it runs.

BTW, what do you mean “adding strace”?

Thanks again!
BRs,

Jasmine

strace is debugging tool. it produces ”strace of systemcalls”

Eero

Hi Eero,

I got it. Really appreciate your kind help.

Have a nice day!

Jasmine

@juan please read https://linuxhint.com/use-linux-strace-command/

you might find it useful now and later.

Eero

Hi Eero,

It’s really helpful. You are so considerate and warm-hearted. Thank you very much for your great help!

BRs,

Jasmine

1 Like