Is there anyone who can help me ? The question puzzled me for several days,When I use the source code to install,https://greenbone.github.io/docs/latest/22.4/source-build/index.html,I installed all the components,An error occurred while starting ospd-openvas.service,Errors are as follows:
OSPD[10371] 2023-06-25 02:16:04,180: INFO: (ospd_openvas.daemon) Loading VTs. Scans will be [requested|queued] until VTs are loaded. This may take a few minutes, please wait…
OSPD[10371] 2023-06-25 02:16:04,206: ERROR: (ospd_openvas.openvas) OpenVAS Scanner failed to load VTs. Command ‘[‘openvas’, ‘–update-vt-info’]’ returned non-zero exit status 1.
OSPD[10371] 2023-06-25 02:16:04,207: ERROR: (ospd_openvas.daemon) Updating VTs failed.
When I checked /var/lib/notus/products, I found the directory was empty
Hey, again, not sure if this is going to help, but from the source code install information:
The downloaded data consist of four different kind of data:
VT data
SCAP data
CERT data
GVMD data
But it looks like you only synced 3 of the 4 and the one you didn’t sync is the VT indicated in the error. Not sure if that will cause the error you are experiencing.
Maybe try using the command from the source-code install sudo /usr/local/bin/greenbone-feed-sync. Also, looks like the instructions use sudo. Does not running sudo mess up the feed user permissions?
Finally, the doe the ospd-openvas log indicate that the feeds all completed sync successfully?
I tried to run the command, and the result is as follows, the message is only supported, CERT, SCAP,GVMD_DATA
root@mabinserver:/etc/redis# sudo /usr/local/bin/greenbone-feed-sync
sudo: /usr/local/bin/greenbone-feed-sync: command not found
root@mabinserver:/etc/redis# sudo /usr/local/sbin/greenbone-feed-sync
No feed type given to --type parameter
root@mabinserver:/etc/redis# sudo /usr/local/sbin/greenbone-feed-sync --type VT
Invalid feed type VT given to --type parameter. Currently supported: CERT, SCAP or GVMD_DATA
Particularly sudo cp -rv $INSTALL_DIR/greenbone-feed-sync/* / would have copied what is in the $INSTALL_DIR into the root directory. You should look in the $INSTALL_DIR/greenbone-feed-sync to see what is being copied into the root structure because it seems that the new feed-sync command command is not being moved to its proper location.
If the directory is empty, perhaps it didn’t install correctly. Else, I don’t know if it will break the installation, but you could try to install it for the user rather than system-wide:
When I run as a non-root user, I’m prompted No matching distribution found for greenbone-feed-sync, with the following error
mabin@mabinserver:~$ python3 -m pip install --root=$INSTALL_DIR/greenbone-feed-sync --no-warn-script-location greenbone-feed-sync
ERROR: Could not find a version that satisfies the requirement greenbone-feed-sync (from versions: none)
ERROR: No matching distribution found for greenbone-feed-sync
Is there another way to manually sync notus-scanner products data? Previously, I successfully installed openvas on ubuntu 20.04 virtual machine installed on my macbook computer. Now I want to install Openvas in the company’s virtual machine, but I have been unsuccessful. My installation steps are the same, in my own macbook virtual machine
Possibly a virtual machine network configuration issue or a firewall issue. I guess firewall if you have the VM configured with local network access and the same gateway as the host and can access the internet from the VM. Can you install other python packages via pip? That might indicate your company has a firewall in place.
PyPI does not host all packages on the same IP address. Packages are hosted on various servers and mirrors distributed worldwide. When you use pip to install packages from PyPI, it contacts the PyPI server to fetch package metadata and download the package files. Could be a geolocation firewall filter?
so happy,when I updated the python version to 3.9.x and pip version,and reinstall greenbone-feed-sync,then sync feeds is successfuled,thanks your help and precious time
to sum up this topic, there are two different greenbone-feed-sync scripts. An old one written in bash and installed in conjunction with gvmd and a new one written in Python and installed separately. See also the announcement:
The old script was installed to /usr/local/sbin/greenbone-feed-sync and the new one into /usr/local/bin/greenbone-feed-sync (sbin vs bin).
With the current build from source guide updated last week the old feed sync scripts (/usr/local/sbin/greenbone-feed-sync and also /usr/local/bin/greenbone-nvt-sync) are not installed anymore!