The configuration file containers/app.yml already exists! Stopping existing container in 5 seconds or Control-C to cancel

On ssh to the vm, I immediately got:

The configuration file containers/app.yml already exists!
Saving old file as app.yml.2024-12-25-193919.bak
Stopping existing container in 5 seconds or Control-C to cancel.

Not sure what it is trying to do?

I wish I never installed Right Sidebar Blocks, though I am not sure this issue is related. https://meta.discourse.org/t/issues-when-i-enable-component-maybe-right-sidebar-blocks/343964/13

I did an app rebuild thinking this would help, but every time i logion to the vm I now get:

The configuration file containers/app.yml already exists!
Saving old file as app.yml.2024-12-25-xxxxxx.bak
Stopping existing container in 5 seconds or Control-C to cancel.

If I don’t kill it, it seems it wants to do a full initial setup? I had a recent snapshot and restored it.

I ran this: ./launcher rebuild app
and it succeeded
I can ping outside world, website is up and working…

but on vm login, I immediately get this issue.

If I kill the process within 5 seconds, everything seems fine, the website works well, so what is causing this issue and how do I stop this on vm login?

I also rebooted the vm, same issue on ssh into the vm post reboot, but website is up and working.

1 Like

Very odd!

It’s like you’ve got a custom login bash script running of some kind.

How did you install Discourse? Strictly using the standard install?

No, it’s not going to be the Theme Component.

4 Likes

You get that message when you run discourse-setup after it’s been run the first time. You can run it again to change settings. Usually you just want to run a

./launcher rebuild app
1 Like

that runs immediately, automatically on login?

Then maybe that’s what a digital ocean one click discourse install does.

That’s why the standard install is recommended since it doesn’t do that. I think their documentation may tell you that you can delete or edit .bashrc or similar.

You can just do a control c when you log in, though you’ll still end up with a bunch of files that won’t really hurt, but would be rather annoying.

2 Likes

Yes, that sounds more likely.

1 Like

I used the standard install many months ago. I do use an nginx reverse proxy, note that it has been running w/o issue since August.

I did not run discourse-setup ( well 5 seconds got away once and it started to run the setup script but I kllled it and restored from a snapshot., I did run ./launcher rebuild app.

Yes: “that runs immediately, automatically on login?” As soon as I logon and sudo su to root, it runs automatically,

I don’t use Digital Ocean.

I just looked at the .bashrc file for root, last line is:

/opt/hostinger/scripts/discourse_conf.sh

Let me see what that does. If it has not been there all along, note that I did not add it.

#!/bin/bash
clear
cd /var/discourse

if ./discourse-setup; then
  clear
  echo "Discourse is now installed. Log into your admin account in a browser to continue"
  echo "configuring Discourse."

  cp -f /etc/skel/.bashrc /root/.bashrc
else
  echo ""
  echo "-----------------------------------------------------------------------------"
  echo "The setup script failed with the provided Discourse details."
  echo "It will rerun. Please address the above issues."
  echo "-----------------------------------------------------------------------------"
  echo "When you are ready, press Enter"
  echo "To cancel setup, press Ctrl+C and this script will be rerun on your next login"
  read wait
fi

Hostinger hosts the vm. Let me remove that line, and try to logon and su again, I have no idea how that got into the .bashrc file, I certainly did not manually add it.

Yes, that corrects the issue, it never dawned on me that a rc file would be modified like that, so it never dawned on me to check. Thanks guys for your help, it is much appreciated!

After commening that line in the bashrc:

cd /var/discourse
if ./discourse-setup; then  echo 'found it'; else  echo 'not found'; fi

returns: not found

To me it is odd it found it at all, ever.

However, if I now run (like 15 minutes later) ls -al ./discourse-setup returns: -rwxr-xr-x 1 root root 28715 Dec 23 23:24 ./discourse-setup

If I run if ./discourse-setup; then echo 'found it'; else echo 'not found'; fi now, runs the issue I was having: ...Stopping existing container in 5 seconds or Control-C to cancel

I removed the comment, logged in again and ran sudo su, and it wanted to start the install process, but it did not create the discourse-setup script, so how does the discourse-setup get created?

How is the discourse-setup script getting created, and can I manually delete it? If I rename it, I do not see it re-created on login, with or without the /opt/hostinger/scripts/discourse_conf.sh line in the root .bashrc.

Note that I never saw:

  echo "The setup script failed with the provided Discourse details."
  echo "It will rerun. Please address the above issues."

It cleared the screen, and t only comments I saw were:

The configuration file containers/app.yml already exists!
Saving old file as app.yml.2024-12-25-193919.bak
Stopping existing container in 5 seconds or Control-C to cancel.
 diff ./.bashrc /etc/skel/.bashrc
118d117
< # /opt/hostinger/scripts/discourse_conf.sh

No idea how that line got into the .bashrc file, and the text I see on issue is not what is described in the /opt/hostinger/scripts/discourse_conf.sh file, but the issue seems to have gone away.

I also note that when I now run ./launcher rebuild app, or reboot the vm, I got a 502 error if i try to access the website too quickly, it takes like a minute for the website to be available. I don’t recall that in the past, but I may never have tried to immediately access the website. Any thoughts on that?

1 Like

Well you’ll need to investigate the scripts that are running upon login and remove the lines associated with running setup.

Afaia, a standard install will not modify those, but here we are.

You did something that installed that.

1 Like

Oh you expanded your post out of chronology

Good stuff!

Sorry about that, it was like 2:00AM.

Thanks everyone for the assistance. Some of the issues I highlighted above are still not clear to me, but it does seem the issue has gone away with the removal of the last line of the .bashrc file.

To answer my own question: How is the discourse-setup script getting created, and can I manually delete it?

The discourse-setup script should exist in /var/discourse. It ships as part of the base code.

The 502 for a minute, I’ll live with it unless I hear otherwise.

1 Like

But you didn’t. You used some hostinger image that automatically runs discourse setup when you log in.

You want to delete the line that runs hostinger script from the .bashrc

You don’t want to delete discourse-setup, but you don’t want to run it, either.

1 Like

Yeah, that’s what I did in terms of the .bashrc and discourse-setup, but I do not recall running the install automatically, nor do I understand why it just kicked off again all of a sudden after many months.

I seem to recall following the instructions at GitHub, but I could be remembering incorrectly.

Anyway, I have removed that line from the .bashrc file.

Thank you.