Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource temporarily unavailable #408

Closed
shibumi opened this issue Feb 27, 2019 · 3 comments
Closed

Resource temporarily unavailable #408

shibumi opened this issue Feb 27, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@shibumi
Copy link

shibumi commented Feb 27, 2019

Expected behavior

I should be able to rebuild and update the cache (openvasmd --update --progress && openvasmd --rebuild --progress) and start the openvas-scanner.

Current behavior

I am not able to update or rebuild the cache via openvasmd nor I am able to restart the openvas-scanner.

When I try to update or rebuild the cache the whole process just hangs. When I attach strace to the process I get the following messages in an infinite loop:

select(17, [16], [], NULL, {tv_sec=0, tv_usec=822418}) = 0 (Timeout)
recvfrom(16, 0x7ffcaa7d20ff, 1, MSG_PEEK, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
select(17, [16], [], NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
recvfrom(16, 0x7ffcaa7d20ff, 1, MSG_PEEK, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
select(17, [16], [], NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
recvfrom(16, 0x7ffcaa7d20ff, 1, MSG_PEEK, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
select(17, [16], [], NULL, {tv_sec=1, tv_usec=0}) = 0 (Timeout)
recvfrom(16, 0x7ffcaa7d20ff, 1, MSG_PEEK, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)

I have no idea what is happening here. In the logs I can find the following events in the openvasmd.log:

The first bad message is this one here:

md manage:WARNING:2019-02-26 18h07.15 utc:13695: sql_exec_internal: sqlite3_step failed: cannot start a transaction within a transaction
md manage:WARNING:2019-02-26 18h07.15 utc:13695: sqlv: sql_exec_internal failed
[...]
md manage:WARNING:2019-02-26 18h07.15 utc:13695: sql_exec_internal: sqlite3_step failed: cannot start a transaction within a transaction
md manage:WARNING:2019-02-26 18h07.15 utc:13695: sqlv: sql_exec_internal failed
md manage:WARNING:2019-02-26 18h07.15 utc:13695: manage_schedule: manage_update_nvti_cache error (Perhaps the db went down?)
md manage:WARNING:2019-02-26 18h07.25 utc:13695: sql_exec_internal: sqlite3_step failed: cannot start a transaction within a transaction
md manage:WARNING:2019-02-26 18h07.25 utc:13695: sqlv: sql_exec_internal failed
[...]

Today I have restarted the service and it looks like this:

d   main:MESSAGE:2019-02-27 11h06.19 utc:2660:    OpenVAS Manager version 7.0.3 (DB revision 184)
md manage:   INFO:2019-02-27 11h06.19 utc:2660:    Getting users.
md   main:MESSAGE:2019-02-27 11h06.25 utc:2661:    OpenVAS Manager version 7.0.3 (DB revision 184)
md   main:   INFO:2019-02-27 11h06.25 utc:2661: rebuild_nvt_cache_retry: Reloading NVT cache
md   main:   INFO:2019-02-27 11h06.25 utc:2662: update_or_rebuild_nvt_cache: Updating NVT cache
base gpgme:MESSAGE:2019-02-27 11h06.25 utc:2662: Setting GnuPG dir to '/var/lib/openvas/openvasmd/gnupg'
base gpgme:MESSAGE:2019-02-27 11h06.25 utc:2662: Using OpenPGP engine version '2.2.4'
md   main:   INFO:2019-02-27 11h06.25 utc:2662:    Updating NVT cache.

When I try to start the scanner it just times out without any error message in the logs.

Steps to reproduce

  1. Install OpenVAS on Ubuntu 18.04 via PPA
  2. do a few scans
  3. wait a few days.. (sorry no Idea how to reproduce this :( )

GVM versions

gsa: 7.0.3

gvm: 7.0.3

openvas-scanner: 5.1.3

gvm-libs: 9.0.3

openvas-smb: not existent?

Environment

Operating system: Ubuntu 18.04

Installation method / source: (packages, source installation) PPA

Logfiles

See logs above

@bjoernricks
Copy link
Contributor

Looks like it is related to #347

@bjoernricks bjoernricks added the bug Something isn't working label Feb 27, 2019
@cfi-gb
Copy link
Member

cfi-gb commented Feb 27, 2019

If the rebuild of the openvassd "hangs" then it is more likely an insufficient redis-configuration like outlined in https://community.greenbone.net/t/hint-redis-setup-configuration-for-gse-gvm-openvas/333

@bjoernricks
Copy link
Contributor

Should be re-tested with current version. If it is still valid please re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants