unable to install Chaos Monkey

420 views
Skip to first unread message

ruturaj kalyani

unread,
Jan 10, 2017, 4:19:12 AM1/10/17
to Simian Army Users
Hi,

I am trying to install chaos monkey referring https://github.com/Netflix/chaosmonkey/wiki/How-to-deploy 

I have setup Spinnaker and MySQL on AWS_EC2 instance.

when I run "go install github.com/netflix/chaosmonkey/bin/chaosmonkey" I am getting below error.

 $go install github.com/netflix/chaosmonkey/bin/chaosmonkey
can't load package: package github.com/netflix/chaosmonkey/bin/chaosmonkey: cannot find package "github.com/netflix/chaosmonkey/bin/chaosmonkey" in any of:
        /usr/local/go/src/pkg/github.com/netflix/chaosmonkey/bin/chaosmonkey (from $GOROOT)
        /usr/local/sbin/src/github.com/netflix/chaosmonkey/bin/chaosmonkey (from $GOPATH)
        /usr/local/bin/src/github.com/netflix/chaosmonkey/bin/chaosmonkey
        /usr/sbin/src/github.com/netflix/chaosmonkey/bin/chaosmonkey
        /usr/bin/src/github.com/netflix/chaosmonkey/bin/chaosmonkey
        /sbin/src/github.com/netflix/chaosmonkey/bin/chaosmonkey
        /bin/src/github.com/netflix/chaosmonkey/bin/chaosmonkey
        /usr/games/src/github.com/netflix/chaosmonkey/bin/chaosmonkey
        /usr/local/games/src/github.com/netflix/chaosmonkey/bin/chaosmonkey
        /usr/local/go/bin/src/github.com/netflix/chaosmonkey/bin/chaosmonkey
        /usr/local/go/bin/src/github.com/netflix/chaosmonkey/bin/chaosmonkey


can anyone tell what the issue is?

Mathias Lafeldt

unread,
Jan 10, 2017, 4:24:22 AM1/10/17
to simianar...@googlegroups.com
Hi,

"go install" won't download dependencies, AFAIK. Try "go get" instead.

-Mathias

--
You received this message because you are subscribed to the Google Groups "Simian Army Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simianarmy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

ruturaj kalyani

unread,
Jan 10, 2017, 5:26:32 AM1/10/17
to Simian Army Users
hi Mathias,

I executed "sudo go get github.com/netflix/chaosmonkey/bin/chaosmonkey" and got below error:

error: "package github.com/netflix/chaosmonkey/bin/chaosmonkey: cannot download, $GOPATH not set. For more details see: go help gopath"

go path is also set. any idea??

go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/go/bin:/usr/local/go/bin:/usr/local/go/bin"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/lib/gccgo/tool"
TERM="dumb"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CXX="g++"
CGO_ENABLED="1"

Mathias Lafeldt

unread,
Jan 10, 2017, 5:33:03 AM1/10/17
to simianar...@googlegroups.com
As the error says, you need to set the $GOPATH environment variable.

Also check that $GOPATH is part of $PATH, so that the chaosmonkey executable can be found after installing it.

This is my personal setup from my .bashrc:

export GOPATH="$HOME/devel/go"
export GOROOT="$(go env GOROOT)"
export PATH="$GOPATH/bin:$GOROOT/bin:$PATH"

Afterward, this should work:

$ go get github.com/netflix/chaosmonkey/bin/chaosmonkey
$ chaosmonkey --version
2.0.2

-Mathias


Lorin Hochstein

unread,
Jan 10, 2017, 3:56:14 PM1/10/17
to Simian Army Users
Chaos Monkey versions all its dependencies, so there *shouldn't* be a need to download other dependencies.
To unsubscribe from this group and stop receiving emails from it, send an email to simianarmy-use...@googlegroups.com.

ruturaj kalyani

unread,
Jan 11, 2017, 12:04:25 AM1/11/17
to Simian Army Users
executed  :
      and then :
$ chaosmonkey --vesion
however, no version returned. got error "chaosmonkey bad command".

which is the best/easiest way to install chaos monkey? 

Mathias Lafeldt

unread,
Jan 11, 2017, 4:09:26 AM1/11/17
to simianar...@googlegroups.com
Lorin,

"go install" won't download anything, be it internal (vendored) or external dependencies. That's the reason why it's not the right command to install chaosmonkey from scratch (without the source code already checked out).

Try it yourself. This won't work:

$ GOPATH=/tmp/go

"go get" will also download the source code, allowing people to install chaosmonkey with a single command.

While at it, there's also a standard name for the folder where commands live in. It's called "cmd". So the path should be github.com/netflix/chaosmonkey/cmd/chaosmonkey. Given that the project is primarily a command-line tool, you could even move the main function to the root so that installing becomes as easy as "go get github.com/netflix/chaosmonkey".

-Mathias

--
You received this message because you are subscribed to the Google Groups "Simian Army Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simianarmy-users+unsubscribe@googlegroups.com.

Lorin Hochstein

unread,
Jan 11, 2017, 4:27:16 PM1/11/17
to simianar...@googlegroups.com
Thanks, Mathias. I'll update the readme and wiki accordingly. (I have on my todo list to switch to something like mkdocs for docs so others can submit PRs.

As far using the cmd directory convention, would you be willing to submit a PR for this?

In this case, I did not put the main function in the root because we consume this code internally at Netflix as a library in order to create a binary with some Netflix-specific code.

Lorin



To unsubscribe from this group and stop receiving emails from it, send an email to simianarmy-use...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Simian Army Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/simianarmy-users/-aldHUKDhAk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to simianarmy-use...@googlegroups.com.

ruturaj kalyani

unread,
Jan 18, 2017, 1:57:37 AM1/18/17
to Simian Army Users
hi Mathias,

I executed  :
      and then :
$ chaosmonkey --vesion
however, no version returned. got error "chaosmonkey bad command".

any idea why im getting this error?


Lorin Hochstein

unread,
Jan 18, 2017, 1:48:25 PM1/18/17
to Simian Army Users
Hi Ruturaj:

I think you had a typo in the flag: "--ve[r]sion" (the r was missing).

Take care,
Lorin

ruturaj kalyani

unread,
Jan 23, 2017, 4:42:47 AM1/23/17
to Simian Army Users
Hello Lorin,

executed the command again, still getting "chaosmonkey: command not found". see below:

ubuntu@ip-x-x-x-xx:/usr/local/go/bin/bin$ ll -a
total 11316
drwxrwxr-x 2 ubuntu ubuntu     4096 Jan 18 07:10 ./
drwxr-xrwx 5 root   root       4096 Jan 10 12:08 ../
-rwxrwxr-x 1 ubuntu ubuntu 11578292 Jan 18 07:10 chaosmonkey*
ubuntu@ip-x-x-x-xx:/usr/local/go/bin/bin$ chaosmonkey version
chaosmonkey: command not found
ubuntu@ip-x-x-x-xx:/usr/local/go/bin/bin$ chaosmonkey --version
chaosmonkey: command not found
ubuntu@ip-x-x-x-xx:/usr/local/go/bin/bin$

 

Lorin Hochstein

unread,
Jan 23, 2017, 12:59:03 PM1/23/17
to Simian Army Users
Hi Ruturaj:

My guess is the "command not found" message you are getting is coming from your shell not being able to find the "chaosmonkey" binary in your PATH environment variable. Can you try doing:

"which chaosmonkey"

Also, try this from the directory that contains the binary:

./chaosmonkey --version


Lorin


--
Reply all
Reply to author
Forward
0 new messages