-
Notifications
You must be signed in to change notification settings - Fork 31
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
Can not start muxy proxy with a network_shape configuration. #23
Comments
I debug this code, and got a error: func addRootQDisc(cfg *Config, c commander) error {
//Add the root QDisc
log.Debug(cfg.Device)
root := fmt.Sprintf(tcRootQDisc, cfg.Device)
strs := []string{tcAddQDisc, root, "htb", tcRootExtra}
cmd := strings.Join(strs, " ")
log.Debug(cmd)
return c.execute(cmd)
} output 2018/08/21 14:46:08.458131 [DEBUG] eth0
2018/08/21 14:46:08.458140 [DEBUG] sudo tc qdisc add dev eth0 handle 10: root htb default 1 I execute this command directly, and got a error too: root@appframe205 muxy]# sudo tc qdisc add dev eth0 handle 10: root htb default 1
RTNETLINK answers: File exists
|
I debug the final executed command like this:
It looks like that this command has syntax error ? |
Thanks for the report. Just an aside, you need to use three backticks (`) for your code gates, otherwise it doesn't format properly. I've updated your comments to aid readability. In terms of the bug, I'll need to dig into that command as I've forgotten the details of how it runs. Also, please provided details of your operating environment so we can track versions of OS etc. |
First of all thank you for the formatting problem!
Operating system
If you think of my modification method can be used, I'm very happy to submit a pr. |
By the way, the version I run here is obtained by compiling the master branch. |
Muxy doesn't work for us with a network_shape config either. We're running muxy v0.0.5 in docker on MacOSX 10.4.4. Here's the config:
Here are the muxy container logs:
Of course there's a chance our config is invalid. 😄 |
Hi @mycargus - long time no see! Thanks, yes I recall this being an issue. Let me see if I can repro again and get to the bottom of it. Weird the issue is happening in Docker though, I only noticed the issue on OSX previously. |
* Vendor comcast library and modify (remove exits and update print statements to use logger) * Log messages from comcast appropriately to TRACE See #23
I've created a small branch to test out an alternative approach. See https://github.com/mefellows/muxy/releases/tag/v0.0.6 to test the binary out. If this proves to be working better, I'll get thiss into mainline. The main issue is that comcast isn't really designed for lib use in this way - its use of |
Haha long time indeed. :) Thanks so much for working on this, man! I'll try it out tomorrow (I'm away from my computer today) and share feedback here. |
By the way, we're using muxy at Instructure now. Thanks for yet another excellent testing tool! |
Oh that's so cool! I'd love to hear a bit more about it next time we chat. In the meanwhile, I'll take another look this weekend across the different OS's. The main change you should see above is that any notices/errors will start to be logged (some always, some others at TRACE level only). So if it does fail, we'll at least find out why. |
Alrighty, I tried out the 0.0.6 muxy release in a docker container. Here are the container logs:
I then ran
I'm not sure what to think of it. Lemme know if I can provide any other info that might help! |
I've just got it running now in a local Docker environment - things seem to be working nicely. I think it's fixed on OSX now also.
Dockerfile:
Muxy config:
screenshot where you can see the proxy working (manipulating response code) and also the network shape taking effect: |
I also just noticed in your previous comments that you ran You might want to test the command against the running container i.e. something more like |
I've just pushed out an updated |
Doh! Good catch, sorry about that. Trying now. |
Works great! Adding the Thanks for your help! |
Fantastic! I wonder if the loopback device will catch others too? I think I added it to the README in the most recent commit but will double check that. I'd love to hear how you're using Muxy and if there is anything I should be adding to make it better / more useful. |
My muxy.config:
command
logs
and Muxy process exited.
I viewed the source code, I think that this code will has a panic:
network_shape.go - 62
how can I solve this problem? thanks.
The text was updated successfully, but these errors were encountered: