Error executing command "./launcher rebuild app"

Hello.
The command “./launcher rebuild app” does not work for me.
Discourse installed in Digital Ocean
Ubuntu 20.04.2
After SSHing into my server I found that I needed an update so I ran “apt-get update” and “apt-get upgrade”.
Then I tried to install the “Discourse Solved” plugin, ran “./launcher rebuild app” and it showed me the following:

./launcher rebuild app
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
./launcher: line 289: warning: command substitution: ignored null byte in input
cd /pups && git pull && git checkout v1.0.3 && /pups/bin/pups --stdin
From https://github.com/discourse/pups
   17f04ec..e0ff889  master     -> origin/master
 * [new tag]         v1.1.1     -> v1.1.1
 * [new tag]         v1.1.0     -> v1.1.0
Updating 17f04ec..e0ff889
Fast-forward
 .github/workflows/ci.yml     |  29 ++++++
 .github/workflows/lint.yml   |  27 +++++
 .rubocop.yml                 |   3 +
 Gemfile                      |   2 +
 Guardfile                    |   4 +-
 README.md                    |  21 ++++
 Rakefile                     |  14 +--
 bin/pups                     |   8 +-
 lib/pups.rb                  |  32 ++++--
 lib/pups/cli.rb              |  92 ++++++++++-------
 lib/pups/command.rb          |  25 +++--
 lib/pups/config.rb           | 240 +++++++++++++++++++++++--------------------
 lib/pups/docker.rb           |  69 +++++++++++++
 lib/pups/exec_command.rb     | 182 ++++++++++++++++----------------
 lib/pups/file_command.rb     |  60 +++++------
 lib/pups/merge_command.rb    |  94 ++++++++---------
 lib/pups/replace_command.rb  |  70 +++++++------
 lib/pups/runit.rb            |  47 +++++----
 lib/pups/version.rb          |   4 +-
 pups.gemspec                 |  37 ++++---
 test/cli_test.rb             | 102 +++++++++++++++---
 test/config_test.rb          | 215 ++++++++++++++++++++++++++++----------
 test/docker_test.rb          | 157 ++++++++++++++++++++++++++++
 test/exec_command_test.rb    |  62 ++++++-----
 test/file_command_test.rb    |  17 ++-
 test/merge_command_test.rb   |  64 ++++++------
 test/replace_command_test.rb |  86 ++++++++--------
 test/test_helper.rb          |   2 +
 28 files changed, 1158 insertions(+), 607 deletions(-)
 create mode 100644 .github/workflows/ci.yml
 create mode 100644 .github/workflows/lint.yml
 create mode 100644 .rubocop.yml
 create mode 100644 lib/pups/docker.rb
 create mode 100644 test/docker_test.rb
Note: checking out 'v1.0.3'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at d1db030 cut a new version
I, [2021-08-03T13:36:03.894819 #1]  INFO -- : Loading --stdin
/pups/lib/pups/cli.rb:15:in `split': invalid byte sequence in UTF-8 (ArgumentError)
        from /pups/lib/pups/cli.rb:15:in `run'
        from /pups/bin/pups:8:in `<main>'
8a2fdd1ae3783177d5d5a04ac692afbf3c3e445398484e6f1845171f763ceb20
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

Then I ran the command “./discourse-doctor” and it gave me the following:

./discourse-doctor
DISCOURSE DOCTOR Tue Aug 3 13:20:43 UTC 2021
OS: Linux foro 5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux


Found containers/app.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=
SMTP_ADDRESS=
DEVELOPER_EMAILS=REDACTED 
SMTP_PASSWORD=REDACTED 
SMTP_PORT=
SMTP_USER_NAME=
LETSENCRYPT_ACCOUNT_EMAIL=REDACTED 

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 20.10.7, build f0df350

DOCKER PROCESSES (docker ps -a)

CONTAINER ID   IMAGE                 COMMAND        CREATED      STATUS                   PORTS     NAMES
66eba750efb9   local_discourse/app   "/sbin/boot"   4 days ago   Exited (5) 3 hours ago             app

==================== SERIOUS PROBLEM!!!! ====================
app not running!
Attempting to rebuild
==================== REBUILD LOG ====================
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
./launcher: line 289: warning: command substitution: ignored null byte in input
cd /pups && git pull && git checkout v1.0.3 && /pups/bin/pups --stdin
From https://github.com/discourse/pups
   17f04ec..e0ff889  master     -> origin/master
 * [new tag]         v1.1.1     -> v1.1.1
 * [new tag]         v1.1.0     -> v1.1.0
Updating 17f04ec..e0ff889
Fast-forward
 .github/workflows/ci.yml     |  29 ++++++
 .github/workflows/lint.yml   |  27 +++++
 .rubocop.yml                 |   3 +
 Gemfile                      |   2 +
 Guardfile                    |   4 +-
 README.md                    |  21 ++++
 Rakefile                     |  14 +--
 bin/pups                     |   8 +-
 lib/pups.rb                  |  32 ++++--
 lib/pups/cli.rb              |  92 ++++++++++-------
 lib/pups/command.rb          |  25 +++--
 lib/pups/config.rb           | 240 +++++++++++++++++++++++--------------------
 lib/pups/docker.rb           |  69 +++++++++++++
 lib/pups/exec_command.rb     | 182 ++++++++++++++++----------------
 lib/pups/file_command.rb     |  60 +++++------
 lib/pups/merge_command.rb    |  94 ++++++++---------
 lib/pups/replace_command.rb  |  70 +++++++------
 lib/pups/runit.rb            |  47 +++++----
 lib/pups/version.rb          |   4 +-
 pups.gemspec                 |  37 ++++---
 test/cli_test.rb             | 102 +++++++++++++++---
 test/config_test.rb          | 215 ++++++++++++++++++++++++++++----------
 test/docker_test.rb          | 157 ++++++++++++++++++++++++++++
 test/exec_command_test.rb    |  62 ++++++-----
 test/file_command_test.rb    |  17 ++-
 test/merge_command_test.rb   |  64 ++++++------
 test/replace_command_test.rb |  86 ++++++++--------
 test/test_helper.rb          |   2 +
 28 files changed, 1158 insertions(+), 607 deletions(-)
 create mode 100644 .github/workflows/ci.yml
 create mode 100644 .github/workflows/lint.yml
 create mode 100644 .rubocop.yml
 create mode 100644 lib/pups/docker.rb
 create mode 100644 test/docker_test.rb
Note: checking out 'v1.0.3'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at d1db030 cut a new version
I, [2021-08-03T13:20:51.459842 #1]  INFO -- : Loading --stdin
/pups/lib/pups/cli.rb:15:in `split': invalid byte sequence in UTF-8 (ArgumentError)
	from /pups/lib/pups/cli.rb:15:in `run'
	from /pups/bin/pups:8:in `<main>'
8a2381ff0429f3448f46daa6c1b238dde16efbaa75c7e3b9dc1b9cfb8090a069
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
==================== END REBUILD LOG ====================
Failed to rebuild app.

Checking your domain name . . .

Connection to 443 succeeded.
You should probably remove any non-standard plugins and rebuild.
Attempting to restart existing container. . . 

starting up existing container
+ /usr/bin/docker start app
app
Restarted the container.


==================== PLUGINS ====================


No non-official plugins detected.

See https://github.com/discourse/discourse/blob/master/lib/plugin/metadata.rb for the official list.

========================================
Discourse version at : NOT FOUND
Discourse version at localhost: NOT FOUND


==================== MEMORY INFORMATION ====================
OS: Linux
RAM (MB): 2084

              total        used        free      shared  buff/cache   available
Mem:           1987         266         869          17         852        1542
Swap:          2047           0        2047

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        49G  8.1G   41G  17% /

==================== DISK INFORMATION ====================
Disk /dev/loop0: 55.45 MiB, 58134528 bytes, 113544 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 67.58 MiB, 70848512 bytes, 138376 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 70.32 MiB, 73728000 bytes, 144000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 55.43 MiB, 58114048 bytes, 113504 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 32.3 MiB, 33865728 bytes, 66144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 32.29 MiB, 33853440 bytes, 66120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/vda: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: BEF50A53-93AD-46BC-A437-0668221D1666

Device      Start       End   Sectors  Size Type
/dev/vda1  227328 104857566 104630239 49.9G Linux filesystem
/dev/vda14   2048     10239      8192    4M BIOS boot
/dev/vda15  10240    227327    217088  106M Microsoft basic data

Partition table entries are not in disk order.

==================== END DISK INFORMATION ====================

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Sending mail to REDACTED  . . 
Testing sending to test-9jlant6d8@srv1.mail-tester.com using smtp.sendgrid.net:587, username:apikey with plain auth.
SMTP server connection successful.
Sending to test-9jlant6d8@srv1.mail-tester.com. . . 
Mail accepted by SMTP server.
Message-ID: 4e0d23cb-7ae1-4158-b365-9e5da624e2e8@fHIDDEN

If you do not receive the message, check your SPAM folder
or test again using a service like http://www.mail-tester.com/.

If the message is not delivered it is not a problem with Discourse.
Check the SMTP server logs for the above Message ID to see why it
failed to deliver the message.

==================== DONE! ====================
Publicly available log not generated.

You can examine the output of this script with 
LESS=-Ri less /tmp/discourse-debug.txt

BUT FIRST, make sure that you know the first three commands below!!!

Commands to know when viewing the file with the above command (called 'less'): 
q              -- quit
/error<ENTER>  -- search for the word 'error'
n              -- search for the next occurrence
g              -- go to the beginning of the file
f              -- go forward a page
b              -- go back a page
G              -- go to the end of the file

My file “app.yml” I have it like this:

.app.yml
## this is the all-in-one, standalone Discourse Docker container template
##
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
##
## BE *VERY* CAREFUL WHEN EDITING!
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
## visit http://www.yamllint.com/ to validate this file as needed

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
  - "80:80"   # http
  - "443:443" # https

params:
  db_default_text_search_config: "pg_catalog.english"

  ## Set db_shared_buffers to a max of 25% of the total memory.
  ## will be set automatically by bootstrap based on detected RAM, or you can override
  db_shared_buffers: "256MB"

  ## can improve sorting performance, but adds memory usage per-connection
  #db_work_mem: "40MB"

  ## Which Git revision should this container use? (default: tests-passed)
  #version: tests-passed

env:
  LC_ALL: en_US.UTF-8
  LANG: en_US.UTF-8
  LANGUAGE: en_US.UTF-8
  # DISCOURSE_DEFAULT_LOCALE: en

  ## How many concurrent web requests are supported? Depends on memory and CPU cores.
  ## will be set automatically by bootstrap based on detected CPUs, or you can override
  UNICORN_WORKERS: 4

  ## TODO: The domain name this Discourse instance will respond to
  ## Required. Discourse will not work with a bare IP number.
  DISCOURSE_HOSTNAME: HIDDEN

  ## Uncomment if you want the container to be started with the same
  ## hostname (-h option) as specified above (default "$hostname-$config")
  #DOCKER_USE_HOSTNAME: true

  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: 'HIDDEN'

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  # SMTP ADDRESS, username, and password are required
  # WARNING the char '#' in SMTP password can cause problems!
  DISCOURSE_SMTP_ADDRESS: HIDDEN
  DISCOURSE_SMTP_PORT: HIDDEN
  DISCOURSE_SMTP_USER_NAME: HIDDEN
  DISCOURSE_SMTP_PASSWORD: "HIDDEN"
  #DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)
  DISCOURSE_SMTP_DOMAIN: HIDDEN
  DISCOURSE_NOTIFICATION_EMAIL: HIDDEN

  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
  LETSENCRYPT_ACCOUNT_EMAIL: HIDDEN

  ## The http or https CDN address for this Discourse instance (configured to pull)
  ## see https://meta.discourse.org/t/14857 for details
  #DISCOURSE_CDN_URL: https://discourse-cdn.example.com
  
  ## The maxmind geolocation IP address key for IP address lookup
  ## see https://meta.discourse.org/t/-/137387/23 for details
  #DISCOURSE_MAXMIND_LICENSE_KEY: 1234567890123456

## The Docker container is stateless; all data is stored in /shared
volumes:
  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-voting          

## Any custom commands to run after building
run:
  - exec: echo "Beginning of custom commands"
  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec: echo "End of custom commands"

I appreciate your help in advance.

Your app.yml contains an invalid character. It’s probably one that you elided when posting here.

Where? tell me please

Try validating it with a tool. http://www.yamllint.com/ should work.

Yes, it is valid, it does not mark an error.

I already solved it, apparently the file was corrupt, the only thing I did was delete it and create a new one by pasting the data using the “sublimetext3” editor.
I forgot to mention that the error occurred after wanting to edit the “app.yaml” file through an editor in android “Admin Hands: SSH / FTP / SFTP / TLN”, apparently when saving the editor it saved the file in an erroneous and corrupted, but the funny thing is that I could edit it without problems and it passed the site test: http://www.yamllint.com/.
Anyway I leave this message for possible future references.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.