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

Failed to scan on RHEL5 #94

Closed
kotakanbe opened this issue Jun 6, 2016 · 8 comments
Closed

Failed to scan on RHEL5 #94

kotakanbe opened this issue Jun 6, 2016 · 8 comments
Labels

Comments

@kotakanbe
Copy link
Member

...snip
[Jun  6 09:55:58] ERROR [rhel5] Failed to scan vulnerable packages
[Jun  6 09:55:58] ERROR [localhost] Failed to scan. err: root@52.68.194.81:22: Failed to yum --color=never updateinfo list available --security. status: 1, stdout: Loaded plugins: amazon-id, fastestmirror, rhui-lb, security
usage: yum [options] COMMAND
...snip

yum command option on RHEL5 is not the same as RHEL6, 7
https://access.redhat.com/solutions/10021

@kotakanbe kotakanbe added the bug label Jun 6, 2016
@kotakanbe
Copy link
Member Author

kotakanbe commented Jun 6, 2016

Please thumbs up if you are in trouble in this issue.

@budric
Copy link

budric commented Jun 14, 2016

I run into this intermittently on Centos7 when running scan as systemd timer/service. No idea why and when I try to debug it by running the service manually it all works.

Log message:

time="Jun 14 08:03:39" level=error msg="Failed to scan. err: vuls@<redacted>:22: Failed to parse LANG=en_US.UTF-8 yum --color=never check-update. err: Unknown format: https://access.redhat.com/articles/1320623\r"

@kotakanbe
Copy link
Member Author

kotakanbe commented Jun 15, 2016

Hi, @budric
Thanks for trying Vuls.
Let me ask a question.

  1. Are you using the latest version of Vuls ?
    It might be fixed in Fix unknown format err while check-update on RHEL6.5 #93
    To update Vuls, Please execute following commands.
$ go get -u github.com/kotakanbe/go-cve-dictionary
$ go get -u github.com/future-architect/vuls

If the problem will be reproduced after updating, It is a Bug of Vuls.
Would you paste the output of following command on the server?
I will fix it.

LANG=en_US.UTF-8 yum --color=never check-update

Thanks for your cooperation :)

@budric
Copy link

budric commented Jun 15, 2016

I'm running version "Merge pull request #72" using git log in $GOPATH/src/github.com/future-architect/vuls

I'll try updating and see if the problem re-occurs. The error doesn't occur every time on that version.

The output of yum check-update:

$> LANG=en_US.UTF-8 yum --color=never check-update
Loaded plugins: changelog, fastestmirror, versionlock
Determining fastest mirrors
 * base: mirror.its.dal.ca
 * epel: mirror.metrocast.net
 * extras: centos.mirror.rafal.ca
 * updates: centos.mirror.rafal.ca
zabbix                                                                                                                         53/53
zabbix-non-supported                                                                                                             4/4

@kotakanbe
Copy link
Member Author

Was the problem solved?

@budric
Copy link

budric commented Jun 15, 2016

Got some errors upgrading, so I wiped out the whole $GOPATH directory and started from scratch with go get. Error during update:

# cd /home/vuls/go/src/github.com/labstack/gommon; git pull --ff-only
fatal: Not possible to fast-forward, aborting.

Scanning seems to work, but vuls tui throws an exception. I erased the vuls.sqlite3 database in case of schema changes, but same exception:

panic: (*logrus.Entry) (0xb989c0,0xc20806a400)

goroutine 1 [running]:
github.com/Sirupsen/logrus.Entry.log(0xc20806b6c0, 0xc208259140, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4a8400, 0xc2082591a0, ...)
        /home/vuls/go/src/github.com/Sirupsen/logrus/entry.go:113 +0x62d
github.com/Sirupsen/logrus.(*Entry).Panic(0xc20806a3c0, 0xc208279960, 0x1, 0x1)
        /home/vuls/go/src/github.com/Sirupsen/logrus/entry.go:158 +0xa0
github.com/Sirupsen/logrus.(*Entry).Panicln(0xc20806a3c0, 0xc208279ae0, 0x1, 0x1)
        /home/vuls/go/src/github.com/Sirupsen/logrus/entry.go:253 +0x12b
github.com/Sirupsen/logrus.(*Logger).Panicln(0xc20806b6c0, 0xc208279ae0, 0x1, 0x1)
        /home/vuls/go/src/github.com/Sirupsen/logrus/logger.go:210 +0xec
github.com/Sirupsen/logrus.Panicln(0xc208279ae0, 0x1, 0x1)
        /home/vuls/go/src/github.com/Sirupsen/logrus/exported.go:187 +0x48
github.com/future-architect/vuls/report.RunTui(0x0, 0x0, 0x0)
        /home/vuls/go/src/github.com/future-architect/vuls/report/tui.go:66 +0x583
github.com/future-architect/vuls/commands.(*TuiCmd).Execute(0xc20816b020, 0x7f3fe7e74d08, 0xc20802a270, 0xc208048300, 0x0, 0x0, 0x0, 0x4)
        /home/vuls/go/src/github.com/future-architect/vuls/commands/tui.go:96 +0x2e1
github.com/google/subcommands.(*Commander).Execute(0xc208010070, 0x7f3fe7e74d08, 0xc20802a270, 0x0, 0x0, 0x0, 0x7f3fe7e74d08)
        /home/vuls/go/src/github.com/google/subcommands/subcommands.go:142 +0x55b
github.com/google/subcommands.Execute(0x7f3fe7e74d08, 0xc20802a270, 0x0, 0x0, 0x0, 0xc208197ac8)
        /home/vuls/go/src/github.com/google/subcommands/subcommands.go:372 +0x5c
main.main()
        /home/vuls/go/src/github.com/future-architect/vuls/main.go:54 +0x57a

goroutine 5 [syscall]:
os/signal.loop()
        /usr/lib/golang/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
        /usr/lib/golang/src/os/signal/signal_unix.go:27 +0x35

goroutine 6 [chan receive]:
database/sql.(*DB).connectionOpener(0xc20815b0e0)
        /usr/lib/golang/src/database/sql/sql.go:589 +0x4c
created by database/sql.Open
        /usr/lib/golang/src/database/sql/sql.go:452 +0x31c

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
        /usr/lib/golang/src/runtime/asm_amd64.s:2232 +0x1

goroutine 7 [runnable]:
github.com/nsf/termbox-go.func·001()
        /home/vuls/go/src/github.com/nsf/termbox-go/api.go:86 +0x43b
created by github.com/nsf/termbox-go.Init
        /home/vuls/go/src/github.com/nsf/termbox-go/api.go:105 +0x95c

goroutine 9 [select]:
github.com/nsf/termbox-go.PollEvent(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/vuls/go/src/github.com/nsf/termbox-go/api.go:320 +0x63f
github.com/jroimartin/gocui.func·003()
        /home/vuls/go/src/github.com/jroimartin/gocui/gui.go:255 +0x30
created by github.com/jroimartin/gocui.(*Gui).MainLoop
        /home/vuls/go/src/github.com/jroimartin/gocui/gui.go:257 +0xc5

goroutine 10 [runnable]:
text/template/parse.lexNumber(0xc20825e100, 0xd380f8)
        /usr/lib/golang/src/text/template/parse/lex.go:472 +0x251
text/template/parse.(*lexer).run(0xc20825e100)
        /usr/lib/golang/src/text/template/parse/lex.go:198 +0x5d
created by text/template/parse.lex
        /usr/lib/golang/src/text/template/parse/lex.go:191 +0x1ac

@kotakanbe
Copy link
Member Author

kotakanbe commented Jun 15, 2016

Probably the dependencies is still old.
Would you try updating dependencies with glide?

For details, see https://github.com/future-architect/vuls/blob/master/README.md#deploy-with-glide

Deploy With Glide 
If an error occurred while go get, try deploying with glide.

1. Install Glide https://github.com/bumptech/glide

2. Update go-cve-dictionary
$ cd $GOPATH/src/github.com/kotakanbe/go-cve-dictionary
$ git pull
$ glide install
$ go install

3. Update Vuls
$ cd $GOPATH/src/github.com/future-architect/vuls
$ git pull
$ glide install
$ go install
The binaries are created under $GOPARH/bin

@kotakanbe
Copy link
Member Author

#286

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

No branches or pull requests

2 participants