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

Unable to update toxic using prebuilt windows server #553

Open
mikeucfl opened this issue Jan 3, 2024 · 0 comments
Open

Unable to update toxic using prebuilt windows server #553

mikeucfl opened this issue Jan 3, 2024 · 0 comments

Comments

@mikeucfl
Copy link

mikeucfl commented Jan 3, 2024

I'm fairly new to Toxiproxy and was going through some examples to understand how to utilize it. I downloaded the prebuilt binaries for 2.7.0 and ran into an issue when trying to update a toxic.

$ toxiproxy-cli-windows-amd64.exe -v
toxiproxy-cli version 2.7.0

$ toxiproxy-cli-windows-amd64.exe create --listen 127.0.0.1:9100 --upstream 127.0.0.1:9000 myProxy
Created new proxy myProxy

$ toxiproxy-cli-windows-amd64.exe toxic add -t latency -n myToxic -a latency=100 -a jitter=50 myProxy
Added downstream latency toxic 'myToxic' on proxy 'myProxy'

$ toxiproxy-cli-windows-amd64.exe toxic update -n myToxic -a jitter=25 myProxy
Failed to update toxic: failed to update toxic 'myToxic' of proxy 'myProxy': json: cannot unmarshal number into Go value of type toxiproxy.ApiError

I went to grab the source and debug what was going on, and it seems like the issue originates with the server. If I run the server from source I'm able to update the value with no issues (using commit 7abcb6f)

$ go run cli.go create --listen 127.0.0.1:9100 --upstream 127.0.0.1:9000 myProxy
Created new proxy myProxy

$ go run cli.go toxic add -t latency -n myToxic -a latency=100 -a jitter=50 myProxy
Added downstream latency toxic 'myToxic' on proxy 'myProxy'

$ go run cli.go toxic update -n myToxic -a jitter=25 myProxy
Updated toxic 'myToxic' on proxy 'myProxy'

I took a look at wireshark to compare the responses (left is prebuilt server using prebuilt cli, and right is running server from source with prebuilt cli)
image

Is there something I'm doing wrong with the prebuilt version, or is this some sort of bug? Thanks!

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

No branches or pull requests

1 participant