EA31337 / ansible-role-metatrader

Ansible role to automate MetaTrader platform installation
GNU General Public License v3.0
2 stars 3 forks source link

fonts-opensymbol not found when installing metatrader via verb #6

Closed NirobNabil closed 10 months ago

NirobNabil commented 1 year ago

This error appeared when trying to run mt-runner through ansible-playbook on an amazon EC2 instance.

The link seems to be down which was an old issue in winetricks too

TASK [metatrader : Install MetaTrader (via verb file)]
task path: /home/ubuntu/.ansible/roles/metatrader/tasks/main.yml:29
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: ubuntu
<localhost> EXEC /bin/sh -c 'echo ~ubuntu && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/ubuntu/.ansible/tmp `"&& mkdir "` echo /home/ubuntu/.ansible/tmp/ansible-tmp-1697371803.2724235-21433-210340193036749 `" && echo ansible-tmp-1697371803.2724235-21433-210340193036749="` echo /home/ubuntu/.ansible/tmp/ansible-tmp-1697371803.2724235-21433-210340193036749 `" ) && sleep 0'
Using module file /home/ubuntu/.local/lib/python3.10/site-packages/ansible/modules/command.py
<localhost> PUT /home/ubuntu/.ansible/tmp/ansible-local-204252b6t4h8a/tmptajf33p2 TO /home/ubuntu/.ansible/tmp/ansible-tmp-1697371803.2724235-21433-210340193036749/AnsiballZ_command.py
<localhost> EXEC /bin/sh -c 'chmod u+x /home/ubuntu/.ansible/tmp/ansible-tmp-1697371803.2724235-21433-210340193036749/ /home/ubuntu/.ansible/tmp/ansible-tmp-1697371803.2724235-21433-210340193036749/AnsiballZ_command.py && sleep 0'
<localhost> EXEC /bin/sh -c 'sudo -H -S -n  -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-zwurtnxfxyznmnzrndwfjcetaxblcrhs ; /usr/bin/python3 /home/ubuntu/.ansible/tmp/ansible-tmp-1697371803.2724235-21433-210340193036749/AnsiballZ_command.py'"'"' && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /home/ubuntu/.ansible/tmp/ansible-tmp-1697371803.2724235-21433-210340193036749/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
  "changed": true,
  "cmd": "DISPLAY=:0 WINEDLLOVERRIDES=\"mscoree,mshtml=,winebrowser.exe=\" winetricks -q /tmp/mt5_install.verb && touch ~/.wine/.installed-mt5\n",
  "delta": "0:00:21.689910",
  "end": "2023-10-15 12:10:25.149646",
  "invocation": {
    "module_args": {
      "_raw_params": "DISPLAY=:0 WINEDLLOVERRIDES=\"mscoree,mshtml=,winebrowser.exe=\" winetricks -q /tmp/mt5_install.verb && touch ~/.wine/.installed-mt5\n",
      "_uses_shell": true,
      "argv": null,
      "chdir": null,
      "creates": "/root/.wine/.installed-mt5",
      "executable": "/bin/bash",
      "removes": null,
      "stdin": null,
      "stdin_add_newline": true,
      "strip_empty_ends": true
    }
  },
  "msg": "non-zero return code",
  "rc": 1,
  "start": "2023-10-15 12:10:03.459736",
  "stderr": "--2023-10-15 12:10:09--  https://cdn-aws.deb.debian.org/debian-security/pool/updates/main/libr/libreoffice/fonts-opensymbol_102.10+LibO6.1.5-3+deb10u4_all.deb\nResolving cdn-aws.deb.debian.org (cdn-aws.deb.debian.org)... 52.84.251.36, 52.84.251.127, 52.84.251.12, ...\nConnecting to cdn-aws.deb.debian.org (cdn-aws.deb.debian.org)|52.84.251.36|:443... connected.\nHTTP request sent, awaiting response... 404 Not Found\n2023-10-15 12:10:09 ERROR 404: Not Found.\n\n--2023-10-15 12:10:09--  https://web.archive.org/web/2000/https/cdn-aws.deb.debian.org/debian-security/pool/updates/main/libr/libreoffice/fonts-opensymbol_102.10+LibO6.1.5-3+deb10u4_all.deb\nResolving web.archive.org (web.archive.org)... 207.241.237.3\nConnecting to web.archive.org (web.archive.org)|207.241.237.3|:443... connected.\nUnable to establish SSL connection.",
  "stderr_lines": [
    "--2023-10-15 12:10:09--  https://cdn-aws.deb.debian.org/debian-security/pool/updates/main/libr/libreoffice/fonts-opensymbol_102.10+LibO6.1.5-3+deb10u4_all.deb",
    "Resolving cdn-aws.deb.debian.org (cdn-aws.deb.debian.org)... 52.84.251.36, 52.84.251.127, 52.84.251.12, ...",
    "Connecting to cdn-aws.deb.debian.org (cdn-aws.deb.debian.org)|52.84.251.36|:443... connected.",
    "HTTP request sent, awaiting response... 404 Not Found",
    "2023-10-15 12:10:09 ERROR 404: Not Found.",
    "",
    "--2023-10-15 12:10:09--  https://web.archive.org/web/2000/https/cdn-aws.deb.debian.org/debian-security/pool/updates/main/libr/libreoffice/fonts-opensymbol_102.10+LibO6.1.5-3+deb10u4_all.deb",
    "Resolving web.archive.org (web.archive.org)... 207.241.237.3",
    "Connecting to web.archive.org (web.archive.org)|207.241.237.3|:443... connected.",
    "Unable to establish SSL connection."
  ],
  "stdout": "------------------------------------------------------\nwarning: Running Wine/winetricks as root is highly discouraged. See https://wiki.winehq.org/FAQ#Should_I_run_Wine_as_root.3F\n------------------------------------------------------\nExecuting mkdir -p /root\n------------------------------------------------------\nwarning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.\n------------------------------------------------------\nUsing winetricks 20210206 - sha256sum: 0f21da98811e0bfda16a7d6d6b8e860a9cedbd4e836c7dd9b02f068d3092ee2e with wine-6.0 (Ubuntu 6.0+repack-1ubuntu1) and WINEARCH=win64\nExecuting w_do_call mt5_install\nExecuting mkdir -p /root\n------------------------------------------------------\nwarning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.\n------------------------------------------------------\nExecuting load_mt5_install \n------------------------------------------------------\nwarning: Working around wine bug 7156 -- MetaTrader 5 needs wingdings.ttf, installing opensymbol\n------------------------------------------------------\nExecuting w_do_call opensymbol\nExecuting mkdir -p /root\n------------------------------------------------------\nwarning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.\n------------------------------------------------------\nExecuting load_opensymbol \nExecuting cd /root/.cache/winetricks/opensymbol\nDownloading https://cdn-aws.deb.debian.org/debian-security/pool/updates/main/libr/libreoffice/fonts-opensymbol_102.10+LibO6.1.5-3+deb10u4_all.deb to /root/.cache/winetricks/opensymbol\nExecuting cd /root/.cache/winetricks/opensymbol\nDownloading https://web.archive.org/web/2000/https/cdn-aws.deb.debian.org/debian-security/pool/updates/main/libr/libreoffice/fonts-opensymbol_102.10+LibO6.1.5-3+deb10u4_all.deb to /root/.cache/winetricks/opensymbol\n------------------------------------------------------\nwarning: Downloading https://web.archive.org/web/2000/https/cdn-aws.deb.debian.org/debian-security/pool/updates/main/libr/libreoffice/fonts-opensymbol_102.10+LibO6.1.5-3+deb10u4_all.deb failed\n------------------------------------------------------"
  "stdout_lines": [
    "------------------------------------------------------",
    "warning: Running Wine/winetricks as root is highly discouraged. See https://wiki.winehq.org/FAQ#Should_I_run_Wine_as_root.3F",
    "------------------------------------------------------",
    "Executing mkdir -p /root",
    "------------------------------------------------------",
    "warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.",
    "------------------------------------------------------",
    "Using winetricks 20210206 - sha256sum: 0f21da98811e0bfda16a7d6d6b8e860a9cedbd4e836c7dd9b02f068d3092ee2e with wine-6.0 (Ubuntu 6.0+repack-1ubuntu1) and WINEARCH=win64",
    "Executing w_do_call mt5_install",
    "Executing mkdir -p /root",
    "------------------------------------------------------",
    "warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.",
    "------------------------------------------------------",
    "Executing load_mt5_install ",
    "------------------------------------------------------",
    "warning: Working around wine bug 7156 -- MetaTrader 5 needs wingdings.ttf, installing opensymbol",
    "------------------------------------------------------",
    "Executing w_do_call opensymbol",
    "Executing mkdir -p /root",
    "------------------------------------------------------",
    "warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.",
    "------------------------------------------------------",
    "Executing load_opensymbol "
    "Executing cd /root/.cache/winetricks/opensymbol",
    "Downloading https://cdn-aws.deb.debian.org/debian-security/pool/updates/main/libr/libreoffice/fonts-opensymbol_102.10+LibO6.1.5-3+deb10u4_all.deb to /root/.cache/winetricks/opensymbol",
    "Executing cd /root/.cache/winetricks/opensymbol",
    "Downloading https://web.archive.org/web/2000/https/cdn-aws.deb.debian.org/debian-security/pool/updates/main/libr/libreoffice/fonts-opensymbol_102.10+LibO6.1.5-3+deb10u4_all.deb to /root/.cache/winetricks/opensymbol",
    "------------------------------------------------------",
    "warning: Downloading https://web.archive.org/web/2000/https/cdn-aws.deb.debian.org/debian-security/pool/updates/main/libr/libreoffice/fonts-opensymbol_102.10+LibO6.1.5-3+deb10u4_all.deb failed",
    "------------------------------------------------------"
  ]
}
kenorb commented 1 year ago

For the workaround, to proceed further (till the endpoint is fixed at winetricks), you can try to comment out w_call opensymbol line in templates/mt5_install.verb.j2. I'm not quiet sure if this is needed (opensymbol) and for what.

NirobNabil commented 1 year ago

For the workaround, to proceed further (till the endpoint is fixed at winetricks), you can try to comment out w_call opensymbol line in templates/mt5_install.verb.j2. I'm not quiet sure if this is needed (opensymbol) and for what.

This did made the step complete successfully but i think the absence of the font is making metatradere5 exit abruptly. Please check https://github.com/EA31337/ansible-role-mt-runner/issues/8

kenorb commented 10 months ago

Fixed upstream at https://github.com/Winetricks/winetricks/issues/2137.