GithubHelp home page GithubHelp logo

Typical cve-search issues about emba HOT 14 CLOSED

e-m-b-a avatar e-m-b-a commented on August 28, 2024
Typical cve-search issues

from emba.

Comments (14)

aserper avatar aserper commented on August 28, 2024 2

In my experience, trying to install EMBA on a server with a lot of cores (I have it running on a 36 core aws machine right now) causes the same issues with updating and populating the CVE database. A workaround that I found to that issue is to run the emba installer solely by utilizing two cores. While I didn't really look into why it helps, I assume that the large number of cores opens more threads which causes some DDOS protection mechanism on the remote server to kick in (again, just a guess). This can be done by running the installer program like so:
sudo taskset -c 0,1 ./installer.sh -d which will run the installation script using only two cores. I know that you can go into the files and change the code but I'm lazy ;)

from emba.

brainsht avatar brainsht commented on August 28, 2024 1

Found another source of cve-serach issues. Kept getting this error message while running ./external/cve-search/sbin/db_updater.py -f

CVEDownloads - ERROR - Did not receive last-modified header in the response; setting to default (01-01-1970) and force update! Headers received: {'content-length': '93', 'cache-control': 'no-cache', 'content-type': 'text/html', 'connection': 'close'}

Error is gone by adjusting max_workers to 1 in https://github.com/cve-search/cve-search/blob/1f0b50aa46814e2a683a9b7b01da8bcc0403154e/lib/DownloadHandler.py#L121 like this

thread_map(self.download_site, sites, desc="Downloading files", max_workers=1)

Afterwards ./external/cve-search/sbin/db_updater.py -f works fine (takes longer though) and no cve-serach issue anymore for me.

Really seems like there is a rate limit with https://nvd.nist.gov/
Source: cve-search/cve-search#890 (comment)

from emba.

m-1-k-3 avatar m-1-k-3 commented on August 28, 2024 1

@brainsht thank you for documenting this issue. I will include it into the main post.

from emba.

brainstorm avatar brainstorm commented on August 28, 2024 1

thread_map(self.download_site, sites, desc="Downloading files", max_workers=1)

Really seems like there is a rate limit with https://nvd.nist.gov/ Source: cve-search/cve-search#890 (comment)

That max_workers argument is now exposed as $HOME/.cvexplore/.env as MAX_DOWNLOAD_WORKERS and you can define it along with the NVD_NIST_API_KEY variable.

sudo taskset -c 0,1 ./installer.sh -d is not yet documented in the wiki and I suspect that there are still threading issues within EMBA, probably (see: #908 (comment)).

from emba.

m-1-k-3 avatar m-1-k-3 commented on August 28, 2024 1

If you are running into cve-search issues please test #913

from emba.

github-actions avatar github-actions commented on August 28, 2024

This issue is stale because it has been open for 14 days with no activity.

from emba.

github-actions avatar github-actions commented on August 28, 2024

This issue was closed because it has been inactive for 7 days since being marked as stale.

from emba.

Hellworold avatar Hellworold commented on August 28, 2024

Hi,
When iam trying to run the utility it gives an error CVE- search not working , check issue number 187 thus iam here .
Now i have checked all the steps above.
for some reason this is the output
i have checked with some older versions

Screenshot_2022-09-29_16-37-35

from emba.

m-1-k-3 avatar m-1-k-3 commented on August 28, 2024

Please check the following:

  • is your network ok? -> ifconfig should show the emba_runs network device with ip address 172.36.0.1
  • is mongod running? netstat -anpt | grep 27017
  • is redis running? netstat -anpt | grep 6379

from emba.

m-1-k-3 avatar m-1-k-3 commented on August 28, 2024

Then check mongod, restart it, check logs and as it is running you can do an update of the database.

from emba.

Darren-zl avatar Darren-zl commented on August 28, 2024

I follow the above operations to do, are normal. But I still show cve-search -no ok. I don't know why.
image
image
image
image

from emba.

m-1-k-3 avatar m-1-k-3 commented on August 28, 2024

@aserper thank you for documenting this issue and the workaround. I will add a link to the wiki

from emba.

m-1-k-3 avatar m-1-k-3 commented on August 28, 2024

With version 1.3.0 we switched to python environment. This results in the need of activating the python environment before doing cve-search tasks.

On the host system it is possible to activate it the following way:

└─$ source ./external/emba_venv/bin/activate

In the docker container it is possible to activate it the following way:

└─$ source /external/emba_venv/bin/activate

from emba.

m-1-k-3 avatar m-1-k-3 commented on August 28, 2024

It is now recommend to setup a NIST API key
See also https://github.com/e-m-b-a/emba/wiki/Installation#prerequisites

from emba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.