Can not deploy OS

27 views
Skip to first unread message

Meth

unread,
Sep 4, 2024, 9:25:52 AMSep 4
to bacularis
Hello Marcin

When installing Storage, it stays at this stage, when I check /var/log/auth.d, the last step is ;

Sep 4 16:19:28 backupserver100 sudo: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/chmod 644 /usr/share/keyrings/bacula-archive-keyring.gpg

I get an error, there is no output in the rawlog of the error.
But I am attaching the images below anyway, along with the full log.


Screenshot_20240904_162318.png


Screenshot_20240904_162335.png



root@backupserver100:/etc/sudoers.d# tail -f /var/log/auth.log | grep "COMMAND="
Sep  4 16:15:21 backupserver100 sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/chmod 644 /usr/share/keyrings/bacula-archive-keyring.gpg
Sep  4 16:19:13 backupserver100 sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/ls /
Sep  4 16:19:22 backupserver100 sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/mv /tmp/bacularis-deploy/bacularis.pub.gpg /usr/share/keyrings/bacularis-archive-keyring.gpg
Sep  4 16:19:23 backupserver100 sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/chown root:root /usr/share/keyrings/bacularis-archive-keyring.gpg
Sep  4 16:19:23 backupserver100 sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/chmod 644 /usr/share/keyrings/bacularis-archive-keyring.gpg
Sep  4 16:19:24 backupserver100 sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/mv /tmp/bacularis-deploy/Bacularis.list /etc/apt/sources.list.d/Bacularis.list
Sep  4 16:19:25 backupserver100 sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/chown root:root /etc/apt/sources.list.d/Bacularis.list
Sep  4 16:19:25 backupserver100 sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/chmod 640 /etc/apt/sources.list.d/Bacularis.list
Sep  4 16:19:27 backupserver100 sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/mv /tmp/bacularis-deploy/bacularis.pub.gpg /usr/share/keyrings/bacula-archive-keyring.gpg
Sep  4 16:19:28 backupserver100 sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/chown root:root /usr/share/keyrings/bacula-archive-keyring.gpg
Sep  4 16:19:28 backupserver100 sudo:     root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/chmod 644 /usr/share/keyrings/bacula-archive-keyring.gpg

Marcin Haba

unread,
Sep 4, 2024, 11:15:10 AMSep 4
to Meth, bacularis
On Wed, 4 Sept 2024 at 15:25, Meth <bys...@gmail.com> wrote:
Hello Marcin

When installing Storage, it stays at this stage, when I check /var/log/auth.d, the last step is ;

Sep 4 16:19:28 backupserver100 sudo: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/chmod 644 /usr/share/keyrings/bacula-archive-keyring.gpg

I get an error, there is no output in the rawlog of the error.

Hi Meth,

Many thanks for reporting this problem.

You found a bug in the deployment process. It happens if users use a custom Bacula repository to install Bacula for example the package repository from Bacula.org. It is when the option "Use system repository for Bacula packages" is unchecked as shown on the attached screenshot.

I prepared a fix for that. It will be available in the next Bacularis version.

For a case if you would like to try the fix now, in attachment I am sending a patch with the fix. To apply it, you need to copy the patch file to the main protected Bacularis directory and run the patch command. For Bacularis installed by binary packages it looks like here:

# cp 0001-Fix-using-custom-Bacula-package-repository-in-OS-pro.patch /usr/share/bacularis/protected
# cd /usr/share/bacularis/protected
# patch -p1 < 0001-Fix-using-custom-Bacula-package-repository-in-OS-pro.patch
# rm 0001-Fix-using-custom-Bacula-package-repository-in-OS-pro.patch

This patch is for version 4.0.0 and it is required only on the host with the Bacularis web interface (the main interface host). Deployed Bacularis instances do not need it.


From other topics, on the screenshot from your mail, I am seeing that you checked the "Use sudo" option in the Deploy API host window. If in the deployment process is used the 'root' user, the sudo option is no longer needed to be checked.

Thanks again, Meth.

Best regards,
Marcin Haba (gani) 
Bacularis-Bacula-Web-Interface-unchecked-system-package-repository.png
0001-Fix-using-custom-Bacula-package-repository-in-OS-pro.patch

Meth

unread,
Sep 4, 2024, 11:23:12 AMSep 4
to bacularis
 Yeey!! this is my second bug finding moment. Can I be Bacularis Bug Hunter now? hehehe 8)
Thank you Marcin for the solution. I will try it tomorrow and let you know the result.

4 Eylül 2024 Çarşamba tarihinde saat 18:15:10 UTC+3 itibarıyla Marcin Haba şunları yazdı:

Marcin Haba

unread,
Sep 4, 2024, 11:28:49 AMSep 4
to Meth, bacularis
On Wed, 4 Sept 2024 at 17:23, Meth <bys...@gmail.com> wrote:
> Yeey!! this is my second bug finding moment. Can I be Bacularis Bug Hunter now? hehehe 8)

Sure, you can :-)

> Thank you Marcin for the solution. I will try it tomorrow and let you know the result.

OK. Thanks in advance for trying it.

Meth

unread,
Sep 5, 2024, 4:38:33 AMSep 5
to bacularis
Hi, Marcin,

Your fix worked and it worked, but I got an error in another step. I'm attaching you a screenshot of the OS Profile I edited, and I'm attaching a screenshot of the error log.

Note
The version on my Bacularis Server is 4.0. I want to install Storega Daemon on another machine and then I encountered these errors.


root@backupserver100:/etc/apt/sources.list.d# apt update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [128 kB]
Ign:3 https://www.bacula.org/packages/*************/debs/13.0.2 focal InRelease
Err:4 https://packages.bacularis.app/stable/ubuntu focal InRelease
  401  Unauthorized [IP: 3.120.118.12 443]

Hit:5 https://www.bacula.org/packages/*************/debs/13.0.2 focal Release
Hit:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:8 http://archive.ubuntu.com/ubuntu focal-security InRelease
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [17.7 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [28.0 kB]
Reading package lists... Done
E: Failed to fetch https://packages.bacularis.app/stable/ubuntu/dists/focal/InRelease  401  Unauthorized [IP: 3.120.118.12 443]
E: The repository 'https://packages.bacularis.app/stable/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Skipping acquire of configured file 'main/source/Sources' as repository 'https://www.bacula.org/packages/*************/debs/13.0.2 focal InRelease' does not seem to provide it (sources.list entry misspelt?)




root@backupserver100:/etc/apt/sources.list.d#cat Bacula.list
deb [signed-by=/usr/share/keyrings/bacula-archive-keyring.gpg] https://www.bacula.org/packages/*************/debs/13.0.2 focal main
deb-src [signed-by=/usr/share/keyrings/bacula-archive-keyring.gpg] https://www.bacula.org/packages/*************/debs/13.0.2 focal main





resim_2024-09-05_113548975.png

4 Eylül 2024 Çarşamba tarihinde saat 18:28:49 UTC+3 itibarıyla Marcin Haba şunları yazdı:

Marcin Haba

unread,
Sep 5, 2024, 4:45:12 AMSep 5
to Meth, bacularis
On Thu, 5 Sept 2024 at 10:38, Meth <bys...@gmail.com> wrote:
Hi, Marcin,

Your fix worked and it worked, but I got an error in another step. I'm attaching you a screenshot of the OS Profile I edited, and I'm attaching a screenshot of the error log.

Note
The version on my Bacularis Server is 4.0. I want to install Storega Daemon on another machine and then I encountered these errors.


root@backupserver100:/etc/apt/sources.list.d# apt update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [128 kB]
Ign:3 https://www.bacula.org/packages/*************/debs/13.0.2 focal InRelease
Err:4 https://packages.bacularis.app/stable/ubuntu focal InRelease
  401  Unauthorized [IP: 3.120.118.12 443]

Hit:5 https://www.bacula.org/packages/*************/debs/13.0.2 focal Release
Hit:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:8 http://archive.ubuntu.com/ubuntu focal-security InRelease
Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [17.7 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata [28.0 kB]
Reading package lists... Done
E: Failed to fetch https://packages.bacularis.app/stable/ubuntu/dists/focal/InRelease  401  Unauthorized [IP: 3.120.118.12 443]
E: The repository 'https://packages.bacularis.app/stable/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Skipping acquire of configured file 'main/source/Sources' as repository 'https://www.bacula.org/packages/*************/debs/13.0.2 focal InRelease' does not seem to provide it (sources.list entry misspelt?)

Hi Meth,

Many thanks for your test and the confirmation about the patch.

For this error that you see now, it is expected behaviour if you don't have provided the repository authentication parameters. You need to take your individual repository parameters from your account at https://users.bacularis.com and use them in the new 'Repo auth' function on the Deployment page. Here you can see the video guide that explains how to do it:

https://bacularis.app/news/90/36/Using-deployment-function-with-protected-package-repositories

Meth

unread,
Sep 5, 2024, 5:17:05 AMSep 5
to bacularis
Hello Marcin

I solved the problem the way you said and  I have installed the OS but it does not show up under Deployment > Hosts tab.
I can also see it in the API Host tab.
resim_2024-09-05_121654894.png

resim_2024-09-05_121433191.png


Client's dpkg and netstat output;

resim_2024-09-05_121552146.png


5 Eylül 2024 Perşembe tarihinde saat 11:45:12 UTC+3 itibarıyla Marcin Haba şunları yazdı:

Marcin Haba

unread,
Sep 5, 2024, 5:23:32 AMSep 5
to Meth, bacularis
On Thu, 5 Sept 2024 at 11:17, Meth <bys...@gmail.com> wrote:
> I solved the problem the way you said and I have installed the OS but it does not show up under Deployment > Hosts tab.
> I can also see it in the API Host tab.

Hi Meth,

Super. So, you deployed Bacularis successfully.

To see the new API host in the combobox at the top, you need to assign
this new API host to your user. In this combobox are listed to choose
only API hosts assigned to currently logged in user.

The assignment is possible to do on the Security page on the Users tab
in editing the user window.

Meth

unread,
Sep 5, 2024, 7:11:25 AMSep 5
to bacularis
I solved it the way you said, but this time it stays like this. I have already installed Bacula-Storage on this system for testing.
Do you think deleting all postgresql data will solve this problem?

It's like this;

sudo apt remove --purge postgresql postgresql-*
sudo rm -rf /var/lib/postgresql
sudo rm -rf /etc/postgresql
sudo rm -rf /var/log/postgresql

This is the ps aux output for about 10 minutes.

resim_2024-09-05_141056309.png


resim_2024-09-05_140928397.png




5 Eylül 2024 Perşembe tarihinde saat 12:23:32 UTC+3 itibarıyla Marcin Haba şunları yazdı:

Marcin Haba

unread,
Sep 5, 2024, 7:50:09 AMSep 5
to Meth, bacularis
On Thu, 5 Sept 2024 at 13:11, Meth <bys...@gmail.com> wrote:
I solved it the way you said, but this time it stays like this. I have already installed Bacula-Storage on this system for testing.
Do you think deleting all postgresql data will solve this problem?

It's like this;

sudo apt remove --purge postgresql postgresql-*
sudo rm -rf /var/lib/postgresql
sudo rm -rf /etc/postgresql
sudo rm -rf /var/log/postgresql

Hi Meth,

Installing client, storage or console does not install the postgresql database, at least if the Bacula system packages are used. If you use the SD from Bacula.org, then yes, it is different because SD is in the same package as Director.

If you need to remove postgresql on that host then your listed commands seem to be correct.

After running the first one:


sudo apt remove --purge postgresql postgresql-*

the apt tool probably will ask you if the database should be cleared or not.

Meth

unread,
Sep 5, 2024, 8:08:16 AMSep 5
to bacularis
Actually what I want to do is download bacula-postgresql as you suggested in a past thread (because it contains Storage Daemon).

But every time I list the client with DPKG for bacula-postgresql it returns “iF”.

I think I need to run sudo dpkg --configure -a and configure it manually, but here I have a question;

Do I need to enter Bacularis Server's information in the required database information?

5 Eylül 2024 Perşembe tarihinde saat 14:50:09 UTC+3 itibarıyla Marcin Haba şunları yazdı:

Marcin Haba

unread,
Sep 5, 2024, 8:52:27 AMSep 5
to Meth, bacularis
On Thu, 5 Sept 2024 at 14:08, Meth <bys...@gmail.com> wrote:
>
> Actually what I want to do is download bacula-postgresql as you suggested in a past thread (because it contains Storage Daemon).
>
> But every time I list the client with DPKG for bacula-postgresql it returns “iF”.
>
> I think I need to run sudo dpkg --configure -a and configure it manually, but here I have a question;
>
> Do I need to enter Bacularis Server's information in the required database information?

Hi Meth,

I am not sure if I understood your question well. The
bacula-postgresql is in "iF" state probably because the database is
not fully configured and the Director will not work (it is
incomplete). The database is not configured due to it is interactive
process and in the deploy window we are not able to do interactions
with the installation processes running in the background.

I would propose to add to the OS profile, to the Storage installation
command also this package "dbconfig-no-thanks" that could make this
process non-interactive. The Storage installation command in the OS
profile could look like here:

/usr/bin/apt -y install dbconfig-no-thanks bacula-postgresql

Another solution is using the following environment variable, but
first I would propose to try the above test with dbconfig-no-thanks.

DEBIAN_FRONTEND=noninteractive

I tried both solutions when I was preparing changes to the local
Bacula installation in the Bacularis install wizard. I don't guarantee
that it will solve the bacula-postgresql installation but you will see
how it will go.

As always - good luck :-)

Meth

unread,
Sep 10, 2024, 2:36:30 AMSep 10
to bacularis
Hello Marcin,

I'll do as you say, but should the boxes here be like this?


Screenshot_20240910_093424.png

5 Eylül 2024 Perşembe tarihinde saat 15:52:27 UTC+3 itibarıyla Marcin Haba şunları yazdı:

Marcin Haba

unread,
Sep 10, 2024, 2:56:47 AMSep 10
to Meth, bacularis
On Tue, 10 Sept 2024 at 08:36, Meth <bys...@gmail.com> wrote:
Hello Marcin,

I'll do as you say, but should the boxes here be like this?

Hi Meth,

The director command configuration can stay as it is, because you are not going to install the director directly, thus it will not be used during the SD deployment.

In the storage commands I would propose to add the dbconfig-no-thanks command to the storage installation command. For now I would propose to add it to test and to check if it will work.

I am attaching a screenshot with this config.

Please let us know if it worked. Good luck :-)
Screenshot_20240910_093424.png

Meth

unread,
Sep 10, 2024, 3:38:24 AMSep 10
to bacularis
Hello Marcin,
I did as you said, but I got the following error.
My own solution is actually as follows, but I need to get your opinion.

Error message;

Software managment command is not configured.,Non-zero exitcode returned by software management command. Output:sudo /usr/bin/apt -y install bacula-postgresql dbconfig-no-thanks 2>&1 WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Reading package lists... Building dependency tree... Reading state information... Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: bacula-postgresql : PreDepends: dbconfig-pgsql but it is not going to be installed E: Unable to correct problems, you have held broken packages.
The path I followed for the solution (I actually interrupted what I was doing, your opinion is important);

root@backupserver100:~# sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree      
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@backupserver100:~# sudo apt install dbconfig-pgsql
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following additional packages will be installed:
  dbconfig-common postgresql-client postgresql-client-12 postgresql-client-common
Suggested packages:
  postgresql postgresql-12 postgresql-doc-12
The following NEW packages will be installed:
  dbconfig-common dbconfig-pgsql postgresql-client postgresql-client-12 postgresql-client-common
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,674 kB of archives.
After this operation, 5,677 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

10 Eylül 2024 Salı tarihinde saat 09:56:47 UTC+3 itibarıyla Marcin Haba şunları yazdı:

Marcin Haba

unread,
Sep 10, 2024, 5:18:26 AMSep 10
to Meth, bacularis
On Tue, 10 Sept 2024 at 09:38, Meth <bys...@gmail.com> wrote:
>
> Hello Marcin,
> I did as you said, but I got the following error.
> My own solution is actually as follows, but I need to get your opinion.
>
> Error message;
>
> Software managment command is not configured.,Non-zero exitcode returned by software management command. Output:sudo /usr/bin/apt -y install bacula-postgresql dbconfig-no-thanks 2>&1 WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Reading package lists... Building dependency tree... Reading state information... Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: bacula-postgresql : PreDepends: dbconfig-pgsql but it is not going to be installed E: Unable to correct problems, you have held broken packages.
> The path I followed for the solution (I actually interrupted what I was doing, your opinion is important);

Hi Meth,

OK, I see. Thanks for performing this test.

It happens because the bacula-postgresql package from Bacula.org has
defined the following pre-dependencies:

Pre-Depends: debconf (>= 1.4.30) | debconf-2.0, dbconfig-common, dbconfig-pgsql

It could work if there would be:

Pre-Depends: debconf (>= 1.4.30) | debconf-2.0, dbconfig-common,
dbconfig-pgsql | dbconfig-no-thanks

but it isn't there.

So, we need to install the storage daemon in another way.

In the OS profile in the storage installation command could you put
this command?

/usr/bin/sh -c DEBIAN_FRONTEND=noninteractive\ /usr/bin/apt\ -y\
install\ bacula-postgresql


The backslashes are correct, please preserve them as they are in this
command. This method uses noninteractive mode, so the packages will be
installed with correct states (no iF). I tested it with the
bacula-postgresql package and it works well.

Once it is done, you need to deploy Bacularis to that host once again
and at the end run the storage daemon installation on the Bacularis
interface.

For your question about this command:

sudo apt --fix-broken install

yes, I think it is correct and can fix this installation. For the long
term solution for deploying on this host and other hosts, the above
way with DEBIAN_FRONTEND variable can be more effective.

Meth

unread,
Sep 10, 2024, 6:03:07 AMSep 10
to bacularis
I made the change as you said. I did it in the Host profile, but first I installed bacularis and bacula-client on the backup server with that host profile to install the Client. I just accessed the Client's Bacularis Web page and changed the “Storage Daemon installation command” box in Software management.

Screenshot_20240910_125832.png

And that's how I started the storage installation (I also changed the Host profile to avoid problems in the future).



Screenshot_20240910_125912.png
Do you think I should click “Cancel” at this stage?


I think it worked, but as in the second image, the process remained pending. When I check through Bacularis, I can access the storage daemon I want.

Screenshot_20240910_130025.png   Screenshot_20240910_130059.png


10 Eylül 2024 Salı tarihinde saat 12:18:26 UTC+3 itibarıyla Marcin Haba şunları yazdı:

Marcin Haba

unread,
Sep 10, 2024, 6:25:24 AMSep 10
to Meth, bacularis
On Tue, 10 Sept 2024 at 12:03, Meth <bys...@gmail.com> wrote:
I made the change as you said. I did it in the Host profile, but first I installed bacularis and bacula-client on the backup server with that host profile to install the Client. I just accessed the Client's Bacularis Web page and changed the “Storage Daemon installation command” box in Software management.

Hi Meth,

Great. We are successful :-) Thanks for this try. Your steps are correct with the software management and the OS profile.
 
Do you think I should click “Cancel” at this stage?


For your question about Non-zero exit code returned by software management command, this is the correct situation. In this place is used the "Storage info command" that is for checking if a Bacula component package is installed or not (see attachment). As long as the storage daemon is not installed (bacula-postgresql package in this case) as long this command will report error code != 0. Thanks to knowing that the SD is installed or not, Bacularis can also make the install SD checkbox enabled or disabled depending on this state.

Now, when you have the SD installed, this command will return the correct value (and error code 0).
info_command.png

Meth

unread,
Sep 10, 2024, 7:05:20 AMSep 10
to bacularis
Then apparently I did everything right, now I need to install a 2nd storage daemon. I will do it on Ubuntu 22.04LTS. There was a video on YouTube about it - the video you recorded :) - (how to install Bacularis on 22.04lts) and I will take some ideas from that video.

If I get stuck, should I post in this thread or start a new thread, which do you think would be better?

10 Eylül 2024 Salı tarihinde saat 13:25:24 UTC+3 itibarıyla Marcin Haba şunları yazdı:

Marcin Haba

unread,
Sep 10, 2024, 7:14:00 AMSep 10
to Meth, bacularis
On Tue, 10 Sept 2024 at 13:05, Meth <bys...@gmail.com> wrote:
>
> Then apparently I did everything right, now I need to install a 2nd storage daemon. I will do it on Ubuntu 22.04LTS. There was a video on YouTube about it - the video you recorded :) - (how to install Bacularis on 22.04lts) and I will take some ideas from that video.

Hi Meth,

Fine. I remember this video guide :-)

> If I get stuck, should I post in this thread or start a new thread, which do you think would be better?

Yes, it might be a good idea to open a new thread for the SD
deployment, I think. Thanks.
Reply all
Reply to author
Forward
0 new messages