Launcher fails: line 334: NULL-Byte ignored

Current rebuild of web-app fails with this error:

root@docker2:/var/discourse# ./launcher stop web_only && ./launcher rebuild data && ./launcher rebuild web_only
x86_64 arch detected.
+ /usr/bin/docker stop -t 600 web_only
web_only
x86_64 arch detected.
Ensuring launcher is up to date
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 600 data
data
./launcher: Zeile 334: Warnung: Kommandoersetzung: NULL-Byte in der Eingabe ignoriert.
2.0.20240825-0027: Pulling from discourse/base
Digest: sha256:6de68cb49198b5281f79ed9401b3fe818c854d220dcf0238549fe2f2adb19146
Status: Image is up to date for discourse/base:2.0.20240825-0027
docker.io/discourse/base:2.0.20240825-0027
/usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups.rb
/usr/local/bin/pups --stdin
I, [2024-10-04T15:54:02.326983 #1]  INFO -- : Reading from stdin
/usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/cli.rb:54:in `split': invalid byte sequence in UTF-8 (ArgumentError)

        split = conf.split("_FILE_SEPERATOR_")
                           ^^^^^^^^^^^^^^^^^^
        from /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/cli.rb:54:in `run'
        from /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/bin/pups:9:in `<top (required)>'
        from /usr/local/bin/pups:25:in `load'
        from /usr/local/bin/pups:25:in `<main>'
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.

Any ideas how to fix this? My forum is currently unavailable after this re-deployment :worried:

1 Like

You should be able to get it back up with

 ./launcher start app

That will restart the old container.

I don’t know what the actual problem might be, but it could be a regression.

In this case web_only and data are separated containers and the startup of the web_only container fails with

oot@docker2:/var/discourse# ./launcher start web_only
x86_64 arch detected.

starting up existing container
+ /usr/bin/docker start web_only
Error response from daemon: Cannot link to a non running container: /data AS /web_only/data
Error: failed to start containers: web_only

Maybe I need to start manually through docker in this case as the database is external on another machine, see this code in the web_only yaml:

 ## connect to central postgres database
  DISCOURSE_DB_SOCKET: ''
  DISCOURSE_DB_USERNAME: discourse
  DISCOURSE_DB_PASSWORD: xxxxxxxxxx
  DISCOURSE_DB_HOST: 10.10.xx.xx
  DISCOURSE_REDIS_HOST: data

Sorry. I didn’t know that part (or maybe didn’t read carefully).

Then you need to

./launcher destroy web_only;./launcher start web_only

Unless you’ve run a cleanup that deleted the container, in which case you’re likely in trouble.

Then I’m surprised to see the “cannot link” error. I’ve only seen that when it’s trying to use a docker link to talk to another container on the same machine.

Oh! Yeah, it’s the redis that it can’t connect to. You’ve got a data container with the redis in it, right? The destroy start should work with the given caveat.

@pfaffman thanks, that fixed it. I forgot that the data container also provides the redis caching functionality - but anyway, now the containers are running again.

What can we do with the bootstrap error from launcher script, line 334? I never saw this error before. Is the launcher_go/v2 ready to use as a replacement instead?

330 set_template_info() {
    331     templates=$(find_templates $config_file)
    332 
    333     arrTemplates=(${templates// / })
    334     config_data=$(cat $config_file)
    335 
    336     input="hack: true"
    337 
    338     for template in "${arrTemplates[@]}"
    339     do
    340       [ ! -z $template ] && {
    341         input="$input _FILE_SEPERATOR_ $(cat $template)"
    342       }
    343     done
    344
1 Like

This is not the error, it’s just a warning

This is the error.

It seems to me your web-app.yml might be corrupted.

2 Likes

yep:

root@docker2:/var/discourse/containers# yamllint web_only.yml
web_only.yml
  5:81      error    line too long (115 > 80 characters)  (line-length)
  8:1       warning  missing document start "---"  (document-start)
  14:4      warning  missing starting space in comment  (comments)
  14:3      warning  comment not indented like content  (comments-indentation)
  15:4      warning  missing starting space in comment  (comments)
  18:81     error    line too long (85 > 80 characters)  (line-length)
  36:3      warning  comment not indented like content  (comments-indentation)
  37:4      warning  missing starting space in comment  (comments)
  43:81     error    line too long (85 > 80 characters)  (line-length)
  44:81     error    line too long (87 > 80 characters)  (line-length)
  58:81     error    line too long (84 > 80 characters)  (line-length)
  67:81     error    line too long (90 > 80 characters)  (line-length)
  68:4      warning  missing starting space in comment  (comments)
  77:81     error    line too long (83 > 80 characters)  (line-length)
  79:4      warning  missing starting space in comment  (comments)
  99:81     error    line too long (81 > 80 characters)  (line-length)
  110:81    error    line too long (81 > 80 characters)  (line-length)
  117:81    error    line too long (81 > 80 characters)  (line-length)
  126:43    error    trailing spaces  (trailing-spaces)
  151:4     warning  missing starting space in comment  (comments)
  154:4     warning  missing starting space in comment  (comments)
  155:4     warning  missing starting space in comment  (comments)
  156:4     warning  missing starting space in comment  (comments)
  156:81    error    line too long (131 > 80 characters)  (line-length)

It definitely needs some cleanup :wink: