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

error occur when run ansible-playbook -i ansible/local ansible/setup.yml #1

Open
ETOjianglinpai opened this issue Feb 1, 2023 · 8 comments

Comments

@ETOjianglinpai
Copy link

in TASK [Build the browser image], I got errors:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error building dep-fetch - code: 4, message: The command '/bin/sh -c wget -q \"https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${chromium_commit}%2Fchrome-linux.zip?alt=media\"    -O chrome-linux.zip' returned a non-zero code: 4

I think the reasons could be RUN wget -q "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${chromium_commit}%2Fchromedriver_linux64.zip?alt=media" -O chromedriver.zip in the Dockerfile.
And I cannot visit "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${chromium_commit}%2Fchromedriver_linux64.zip?alt=media", has this URL changed?

@jpcsmith
Copy link
Owner

jpcsmith commented Feb 3, 2023 via email

@ETOjianglinpai
Copy link
Author

in TASK [Check Wireguard client connectivity], I got errors:

failed: [localhost] (item={'region_id': 0, 'client_id': 0, 'tag': '0-0'}) => {"ansible_loop_var": "item", "changed": true, "cmd": "/home/ssc/qcsd-experiments/workflow/scripts/test-vpn 0 0\n", "delta": "0:00:40.410608", "end": "2023-02-04 09:13:37.979608", "item": {"client_id": 0, "region_id": 0, "tag": "0-0"}, "msg": "non-zero return code", "rc": 4, "start": "2023-02-04 09:12:57.569000", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

Is this related to the gateway_ip in the ansible/distributed file? How should I set this variable, can I make gateway_ip equal EtherNet ip?

@jpcsmith
Copy link
Owner

jpcsmith commented Feb 6, 2023

It needs to be a public IP address of the host, so that the client can connect to the wireguard gateway.

@ETOjianglinpai
Copy link
Author

I got the public IP address of the host from https://www.whatismypublicip.com, and changed all of them to this IP address
image
distributed:

localhost   ansible_connection=local ansible_python_interpreter="{{ ansible_playbook_python }}"
frankfurt   ansible_user=root ansible_host=au22
new_york    ansible_user=root ansible_host=au22
bengaluru   ansible_user=root ansible_host=au22
client_runner   ansible_host=au22 exp_path=/home/ssc/qcsd-experiments

[wg_gateways]
frankfurt   region_id=0 gateway_ip=61.239.74.219
new_york    region_id=1 gateway_ip=61.239.74.219
bengaluru   region_id=2 gateway_ip=61.239.74.219

[wg_gateways:vars]
n_clients_per_gateway=12

[wg_clients]
client_runner

local:

localhost ansible_connection=local ansible_python_interpreter="{{ ansible_playbook_python }}"

[wg_gateways]
localhost region_id=0 gateway_ip=61.239.74.219

[wg_gateways:vars]
n_clients_per_gateway=6

[wg_clients]
localhost exp_path=/home/ssc/qcsd-experiments copy_experiment=False

but it still reports errors (The first line error was split) :

failed: [localhost]
(item={'region_id': 0, 'client_id': 0, 'tag': '0-0'}) => 
{"ansible_loop_var": "item", "changed": true, 
"cmd": "/home/ssc/qcsd-experiments/workflow/scripts/test-vpn 0 0\n", "delta": "0:00:40.186401", 
"end": "2023-02-06 09:58:14.693341", 
"item": {"client_id": 0, "region_id": 0, "tag": "0-0"}, "msg": "non-zero return code", 
"rc": 4, "start": "2023-02-06 09:57:34.506940", "stderr": "", 
"stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [localhost] (item={'region_id': 0, 'client_id': 1, 'tag': '0-1'}) => {"ansible_loop_var": "item", "changed": true, "cmd": "/home/ssc/qcsd-experiments/workflow/scripts/test-vpn 0 1\n", "delta": "0:00:40.187832", "end": "2023-02-06 10:13:41.569648", "item": {"client_id": 1, "region_id": 0, "tag": "0-1"}, "msg": "non-zero return code", "rc": 4, "start": "2023-02-06 10:13:01.381816", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [localhost] (item={'region_id': 0, 'client_id': 2, 'tag': '0-2'}) => {"ansible_loop_var": "item", "changed": true, "cmd": "/home/ssc/qcsd-experiments/workflow/scripts/test-vpn 0 2\n", "delta": "0:00:40.158226", "end": "2023-02-06 10:14:21.815985", "item": {"client_id": 2, "region_id": 0, "tag": "0-2"}, "msg": "non-zero return code", "rc": 4, "start": "2023-02-06 10:13:41.657759", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [localhost] (item={'region_id': 0, 'client_id': 3, 'tag': '0-3'}) => {"ansible_loop_var": "item", "changed": true, "cmd": "/home/ssc/qcsd-experiments/workflow/scripts/test-vpn 0 3\n", "delta": "0:00:40.189213", "end": "2023-02-06 10:15:02.093988", "item": {"client_id": 3, "region_id": 0, "tag": "0-3"}, "msg": "non-zero return code", "rc": 4, "start": "2023-02-06 10:14:21.904775", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
failed: [localhost] (item={'region_id': 0, 'client_id': 4, 'tag': '0-4'}) => {"ansible_loop_var": "item", "changed": true, "cmd": "/home/ssc/qcsd-experiments/workflow/scripts/test-vpn 0 4\n", "delta": "0:00:40.180087", "end": "2023-02-06 10:15:42.377015", "item": {"client_id": 4, "region_id": 0, "tag": "0-4"}, "msg": "non-zero return code", "rc": 4, "start": "2023-02-06 10:15:02.196928", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}

@jpcsmith
Copy link
Owner

jpcsmith commented Feb 6, 2023 via email

@ETOjianglinpai
Copy link
Author

Sorry, I still can't configure successfully

Do I need to configure the virtual machine to the bridging mode, and then set the gateway IP to the public IP? To configure local, do you only need the public IP address of the virtual machine? This step has not been successful. I hope to get your guidance

exec docker run "${DOCKER_RUN_ARGS[@]}" --entrypoint wget wg-client -q --spider http://google.com

Due to the problem that the network may not be accessible, I changed the spider website to baidu.com, which also failed.

failed: [localhost]
(item={'region_id': 0, 'client_id': 0, 'tag': '0-0'}) => 
{"ansible_loop_var": "item", "changed": true, 
"cmd": "/home/ssc/qcsd-experiments/workflow/scripts/test-vpn 0 0\n", "delta": "0:00:40.186401", 
"end": "2023-02-06 09:58:14.693341", 
"item": {"client_id": 0, "region_id": 0, "tag": "0-0"}, "msg": "non-zero return code", 
"rc": 4, "start": "2023-02-06 09:57:34.506940", "stderr": "", 
"stderr_lines": [], "stdout": "", "stdout_lines": []}

@jpcsmith
Copy link
Owner

I cannot tell what the issue with your configuration would be. At that stage however, the docker containers should be created, so you can access a shell in the container and attempt to manually configure the wireguard to see what the configuration needs to be for them to communicate.

@ETOjianglinpai
Copy link
Author

Thank you for your help! I have now run Docker and changed the function of demo.smk to:

rule demo__all:
    input:
        "/home/whisperliang/qcsd-experiments/results/plots/demo-plot-0001.png"

And try running snakemake -j 2 --configfile=config/test.yaml demo__all, an error message was generated in/qcsd experiments/results/demo/0001/undefended. log:

Error: TransportError(CryptoError(NssError { name: "SEC_ERROR_INVALID_ARGS", code: -8187, desc: "security library: invalid arguments." }))

May I ask what is the reason for this?

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

2 participants