Giter VIP home page Giter VIP logo

ERRO[0002] GoError: Failed to decode JKS file: /test/833/truststore.jks, OriginalError: %!w(*errors.errorString=&{got invalid magic}) running at github.com/grafana/xk6-kafka.(*Kafka).loadJKSFunction-fm (native) about xk6-kafka HOT 15 CLOSED

arpitaso avatar arpitaso commented on September 22, 2024
ERRO[0002] GoError: Failed to decode JKS file: /test/833/truststore.jks, OriginalError: %!w(*errors.errorString=&{got invalid magic}) running at github.com/grafana/xk6-kafka.(*Kafka).loadJKSFunction-fm (native)

from xk6-kafka.

Comments (15)

arpitaso avatar arpitaso commented on September 22, 2024 1

@mostafa i will use the same version for xk6 and k6 that i am using in local.
will update once i have done this, if issue persists

from xk6-kafka.

arpitaso avatar arpitaso commented on September 22, 2024 1

@mostafa i am using the same ./k6 version in dev, and have the docker image also the way it is mentioned in this doc.
still i get this error

from xk6-kafka.

mostafa avatar mostafa commented on September 22, 2024

@arpitaso

There are two reasons I can think of:

  1. You are using a PKCS#12-encoded keystore or some other supported format, which is not supported by keystore-go and hence xk6-kafka.
  2. Your file is corrupt.

from xk6-kafka.

arpitaso avatar arpitaso commented on September 22, 2024

@arpitaso

There are two reasons I can think of:

  1. You are using a PKCS#12-encoded keystore or some other supported format, which is not supported by keystore-go and hence xk6-kafka.
  2. Your file is corrupt.

@mostafa the same script and files are working as expected in my local, but giving the above error in dev env

from xk6-kafka.

mostafa avatar mostafa commented on September 22, 2024

In which dev env? Are you using the same exact version of xk6-kafka? Can you run k6 version to see the build info?

from xk6-kafka.

arpitaso avatar arpitaso commented on September 22, 2024

@mostafa
my local has
arpita.sood@MMDVD9TJQR30M ~ % k6 version
k6 v0.45.0 ((devel), go1.20.5, darwin/arm64)

dev env has / # k6 version
k6 v0.44.1 ((devel), go1.20.5, linux/amd64)

from xk6-kafka.

mostafa avatar mostafa commented on September 22, 2024

@arpitaso

You are using an older version of k6 on dev env. Also, you didn't list the plugin version info.

from xk6-kafka.

mostafa avatar mostafa commented on September 22, 2024

k6 version lists them by default:

./k6 version
k6 v0.45.0 ((devel), go1.20, linux/amd64)
Extensions:
  github.com/mostafa/xk6-kafka v0.19.0, k6/x/kafka [js]

from xk6-kafka.

arpitaso avatar arpitaso commented on September 22, 2024

@mostafa
local
arpita.sood@MMDVD9TJQR30M ~ % ./k6 version
k6 v0.44.1 ((devel), go1.20.5, darwin/arm64)
Extensions:
github.com/mostafa/xk6-kafka v0.18.1, k6/x/kafka [js]

dev
/ # k6 version
k6 v0.44.1 ((devel), go1.20.5, linux/amd64)
Extensions:
github.com/grafana/xk6-kafka (devel), k6/x/kafka [js]

from xk6-kafka.

mostafa avatar mostafa commented on September 22, 2024

@arpitaso
Use the latest version of k6 and xk6-kafka on your dev env.

from xk6-kafka.

arpitaso avatar arpitaso commented on September 22, 2024

@mostafa
the configuration for k6 and xk6 in dev and local is below

local
arpita.sood@MMDVD9TJQR30M ~ % k6 version
k6 v0.45.0 ((devel), go1.20.5, darwin/arm64)

arpita.sood@MMDVD9TJQR30M ~ % ./k6 version
k6 v0.44.1 ((devel), go1.20.5, darwin/arm64)
Extensions:
github.com/mostafa/xk6-kafka v0.18.1, k6/x/kafka [js]


dev
/ # k6 version
k6 v0.44.1 ((devel), go1.20.5, linux/amd64)
Extensions:
github.com/grafana/xk6-kafka (devel), k6/x/kafka [js]

i see in my local i have extension as github.com/mostafa/xk6-kafka v0.18.1, k6/x/kafka [js] but in dev the extension is github.com/grafana/xk6-kafka (devel), k6/x/kafka [js]

  1. could this be the reason behind the script not running in dev?
  2. do i have to use the same extension ( github.com/mostafa/xk6-kafka v0.18.1, k6/x/kafka [js]
    ) that i am using in local and replace the extension( github.com/grafana/xk6-kafka (devel), k6/x/kafka [js]) in dev?

from xk6-kafka.

mostafa avatar mostafa commented on September 22, 2024

@arpitaso

Try running xk6 without pointing to a local copy. This will fetch the latest version from GitHub and build k6 with that. FYI, the latest version of xk6-kafka is v0.1.9.0 and k6 is v0.45.0.

xk6 build --with github.com/mostafa/xk6-kafka@latest

from xk6-kafka.

arpitaso avatar arpitaso commented on September 22, 2024

@mostafa
in my local below is the version for k6 and ./k6

arpita.sood@MMDVD9TJQR30M sre-perf-ls-test-demo % k6 version
k6 v0.45.0 ((devel), go1.20.5, darwin/arm64)

arpita.sood@MMDVD9TJQR30M sre-perf-ls-test-demo % ./k6 version
k6 v0.45.0 ((devel), go1.20.5, darwin/arm64)
Extensions:
  github.com/mostafa/xk6-kafka v0.19.0, k6/x/kafka [js]

the script with above config is working as expected

in dev env k6 and ./k6 version is below

k6 version
k6 v0.45.0 ((devel), go1.20.6 linux/amd64)
Extensions:
  github.com/mostafa/xk6-kafka (devel), k6/x/kafka [js]

 ./k6 version
k6 v0.45.0 ((devel), go1.20.6, linux/amd64)
Extensions:
  github.com/mostafa/xk6-kafka (devel), k6/x/kafka [js]

even though whatever version i use in the dev env, i get (devel) in the extension but all versions are working as expected in local env.

please help here,
thanks

from xk6-kafka.

mostafa avatar mostafa commented on September 22, 2024

@arpitaso

That's actually a k6 question that should be posted on https://community.k6.io. Nevertheless, you are using a compiled version of k6 in your $PATH and your local directory. Either way, I highly recommend using the latest Docker images or binaries from here.

from xk6-kafka.

mostafa avatar mostafa commented on September 22, 2024

@arpitaso

I suppose this is resolved, so I'll close it.

from xk6-kafka.

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.