mistio / mist-ce

Mist is an open source, multicloud management platform
https://mist.io
Apache License 2.0
1.87k stars 316 forks source link

Unable to create file through scripts in a vm #1027

Closed meenaTrex closed 2 years ago

meenaTrex commented 2 years ago

INLINE SCRIPT

!/usr/bin/env bash

echo 'hello world' > meenakshi.txt

ERROR "command": "fetchrun() { TMP_DIR=$(mktemp -d /tmp/script-6e35e568f07447bc875ced6d99777694-2ed06d1ce50e494abbf81bf650ed1f32-XXXX) && cd $TMP_DIR && command -v curl > /dev/null 2>&1 && DLCMD=\"curl -o \" || DLCMD=\"wget -O \" && $DLCMD ./script \"http://localhost/api/v1/fetch?action=fetch_script&object_id=6e35e568f07447bc875ced6d99777694&_expires=1646811109&_mac=0eb46a8c68e2355b464a50e5aeb87f0ceb592384c0733f3e36b625d3780bef51\" > /dev/null 2>&1 && (unzip ./script > /dev/null 2>&1 || tar xvzf ./script > /dev/null 2>&1); (chmod +x .//main > /dev/null 2>&1 && .//main ) || (chmod +x ./script && ./script ); retval=\"$?\"; echo $retval; rm -rf $TMP_DIR; echo $retval; cd - > /dev/null 2>&1; return \"$retval\";} && fetchrun", "stdout": "chmod: cannot access './script': No such file or directory\n1\n1\n",

d-mo commented 2 years ago

Hi. You need to configure the CORE_URI in settings.py to something different than localhost. It requires an IP or hostname that's addressable by the Mist containers, e.g. your host's public IP or its local network IP address. https://github.com/mistio/mist-ce#url

d-mo commented 2 years ago

Please reopen if the problem persists.