Help Center/ CodeArts Deploy/ FAQs/ Hosts/ Why Does a Task Fail on an Ubuntu Host After Being Successfully Run on a CentOS Host?
Updated on 2024-08-06 GMT+08:00

Why Does a Task Fail on an Ubuntu Host After Being Successfully Run on a CentOS Host?

Symptoms

The following log information is displayed.

Figure 1 Log information

Cause Analysis

By default, CentOS uses bash and Ubuntu OS uses dash. Bash and dash are incompatible with each other. In CodeArts Deploy, the default script generated can only run on a host that uses bash. Therefore, an error will be reported if the script is run on an Ubuntu host.

Solution

Log in to the target host, run the sudo dpkg-reconfigure dash command, and select no to switch the shell of the Ubuntu OS to bash.