-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Step 1: Run the following script on macOS with NoRouter v0.5.0.
#!/bin/bash
set -eux -o pipefail
L="norouter-test"
NET="norouter-test"
x="$(docker container ls -a -q --filter label=$L)"; if [ -n "$x" ]; then docker container rm -f $x; fi
x="$(docker network ls -q --filter label=$L)"; if [ -n "$x" ]; then docker network rm $x; fi
docker network create --label $L $NET
docker run --label $L -d --name bastion --hostname bastion --network $NET alpine sleep infinity
docker run --label $L -d --name wordpress --hostname wordpress --network $NET wordpress
docker run --label $L -d --name mysql --hostname mysql --network $NET -e MYSQL_ROOT_PASSWORD=******** mysql
docker cp $GOPATH/src/github.com/norouter/norouter/bin/norouter-Linux-x86_64 bastion:/usr/local/bin/norouter
cat << EOF | norouter /dev/stdin
hostTemplate:
loopback:
disable: true
hosts:
local:
vip: "127.0.42.100"
http:
listen: "127.0.0.1:18080"
bastion:
cmd: "docker exec -i bastion norouter"
vip: "127.0.42.101"
routes:
- via: bastion
to: ["*.${NET}"]
EOF
Step 2: Launch Firefox (v82), and set the proxy to http://127.0.0.1:18080
Step 3: Open http://wordpress.norouter-test via Firefox
Step 4: Fulfill the database configuration
Step 5: Click "Submit". It fails with "See NoRouter agent log" error.
NoRouter logs:
+ norouter /dev/stdin
suda-mbp.local: INFO[0000] Ready: 127.0.42.100
suda-mbp.local: INFO[0000] Ready: 127.0.42.101
suda-mbp.local: WARN[0053] stderr[bastion(127.0.42.101)]: bastion: time="2020-11-13T07:29:15Z" level=warning msg="failed to call hookRouteOnSYN" error="failed to listen on {'\\x00' \"172.27.0.3\" 'P'}: bind tcp 172.27.0.3:80: port is in use"
suda-mbp.local: WARN[0053] stderr[local(127.0.42.100)]: suda-mbp.local: time="2020-11-13T16:29:15+09:00" level=warning msg="failed to call do()" error="failed to dial gonet 172.27.0.3:80: connect tcp 172.27.0.3:80: connection was refused"
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working