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

Add option for it get cve detail from cve.sqlite3. #81

Merged
merged 1 commit into from
May 31, 2016
Merged

Add option for it get cve detail from cve.sqlite3. #81

merged 1 commit into from
May 31, 2016

Conversation

ymd38
Copy link
Contributor

@ymd38 ymd38 commented May 30, 2016

It is an error in go-cve-dictionary API when result of scan is many.

It is an error in go-cve-dictionary API when result of scan is many.
@kotakanbe
Copy link
Member

Thanks for sending this PR.

Please paste the error msg when the result is many.

@ymd38
Copy link
Contributor Author

ymd38 commented May 31, 2016

When vuls send many request to go-cve-dictionary, it reach max file descriptor.

WARN[0949] Failed to HTTP GET. retrying in 13.143004491s seconds. err: HTTP GET error: [Get http://127.0.0.1:1323/cves/CVE-2015-4872: dial tcp 127.0.0.1:1323: socket: too many open files], url: http://127.0.0.1:1323/cves/CVE-2015-4872, resp: <nil> 
WARN[0949] Failed to HTTP GET. retrying in 18.903049056s seconds. err: HTTP GET error: [Get http://127.0.0.1:1323/cves/CVE-2015-4882: dial tcp 127.0.0.1:1323: socket: too many open files], url: http://127.0.0.1:1323/cves/CVE-2015-4882, resp: <nil> 
WARN[0951] Failed to HTTP GET. retrying in 15.777643131s seconds. err: HTTP GET error: [Get http://127.0.0.1:1323/cves/CVE-2015-4893: dial tcp 127.0.0.1:1323: socket: too many open files], url: http://127.0.0.1:1323/cves/CVE-2015-4893, resp: <nil> 
panic: send on closed channel

goroutine 1898 [running]:
github.com/future-architect/vuls/cveapi.cvedictClient.httpGet(0x4851f20, 0x15, 0xc8205cbe83, 0xd, 0xc8206f8c60, 0x28, 0xc8210dc360, 0xc8210dc3c0)

Thanks

@kotakanbe
Copy link
Member

kotakanbe commented May 31, 2016

It's better to check open files limit of your OS to avoid too many open file error.
see #58 (comment)


I think it is worth to merge your PR.
If Vuls access to cve.db directly, we don't need to run go-cve-dictionary as server mode before scanning. Your option is useful in the case of vuls and go-cve-dictionary are running on same machine.

I need some time to think more.
Please keep this PR open.

Thanks :)

@ymd38
Copy link
Contributor Author

ymd38 commented May 31, 2016

I checked #58. But I thought this solution isn't best on same machine.
OK, I see.

Thanks

@kotakanbe
Copy link
Member

Merged.

I made some changes.
#84

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants