Coder Social home page Coder Social logo

Comments (7)

valtsi avatar valtsi commented on July 17, 2024 1

This error is coming from kube-monkey being unable to find the timezone file that LoadLocation in the Go time package needs, since the default timezone is "America/Los Angeles". An alternative to creating the timezone file, is to use either the UTC or Local timezones. Those timezones are natively known.

from kube-monkey.

YuxiJin-tobeyjin avatar YuxiJin-tobeyjin commented on July 17, 2024 1

I also get stuck on this problem. Here is one solution for me ,maybe can give some help.
1)use "docker run -itd kube-monkey:v0.1.0 /bin/bash" to run a container
2)use "docker ps" to get its containerid
3)use "docker exec -it {$containerid} bash" to enter into the container
4)run "ll /etc |grep localtime" in the container and you will find it links to someplace:
localtime -> /usr/share/zoneinfo/Etc/UTC
5)In my case ,there is no zoneinfo directory under /usr/share/ in my container.
6)use "docker cp /usr/share/zoneinfo/ {$containerid} :/usr/share/" to copy the directory from host
7)use "docker commit {$containerid} kube-monkey:v0.1.1" to form a new image
The problem is solved for me using this new image "kube-monkey:v0.1.1"

from kube-monkey.

DavidPesticcio avatar DavidPesticcio commented on July 17, 2024

Wherever you are running kube-monkey it seems to need the zoneinfo.zip file in different places -
this appears to be dependant on your GOROOT environment variable setting... this will also be true inside the container - if you're going that far. :-)

Try;
zip /usr/local/go/lib/time/zoneinfo.zip /usr/share/zoneinfo/

Substitute /usr/local/go/lib/time/zoneinfo.zip, above, according to the no such file or directory error.

If you've set the "time_zone" in the /etc/kube-mokey/config.toml file, or via the examples/configmap.yaml, then make sure you pick a TZ that exists in /usr/share/zoneinfo/

HTH

from kube-monkey.

asobti avatar asobti commented on July 17, 2024

kube-monkey could default to the local timezone in case of this error, although I feel that's more dangerous as we really don't want to be scheduling pods to be killed at unexpected times. I think panicking in this situation might be the outcome of least surprise.

from kube-monkey.

pswenson avatar pswenson commented on July 17, 2024

changing the Dockerfile to FROM golang:1.7.5-alpine seems to resolve the issue.... any reason why this isn't a good solution?

from kube-monkey.

asobti avatar asobti commented on July 17, 2024

@pswenson What timezone are you using that causes that error?

from kube-monkey.

MarkDcc avatar MarkDcc commented on July 17, 2024

You may try to set time_zone="UTC" .

from kube-monkey.

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.