Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

403 when i add a iptables rule #1517

Open
CormickKneey opened this issue Dec 1, 2020 · 0 comments
Open

403 when i add a iptables rule #1517

CormickKneey opened this issue Dec 1, 2020 · 0 comments

Comments

@CormickKneey
Copy link

CormickKneey commented Dec 1, 2020

Question

What i did

In order to transfer the request from origin registry xxx.xxx.xxx:9082 to localhost:65001
I add a rule in iptables:

iptables -t nat -A OUTPUT -p tcp --dport 9082 -j DNAT --to 127.0.0.1:65001

This step is in order to make sure when the k8s restart or update a pod, it will get the lastest image from localhost:65001 instead of xxx.xxx.xxx:9082

issue occurred

# log in dfdaemon.log
WARN sign:1 : no matched registry for xxx.xxx.xxx        # without the port info(xxx.xxx.xxx:9082)

# result  in console
Error response from daemon: error parsing HTTP 403 response body: invalid character 'o' in literal null (expecting 'u'): "no matched registry for xxx.xxx.xxx"

the strat command is:

dfclient/dfdaemon --registry=http://xxx.xxx.xxx:9082

If I turn off the iptables, everything is okay.
But it seems that the dfdaemon failed to reconginze the address--xxx.xxx.xxx

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

No branches or pull requests

1 participant