bacula - install issue ( service bacula-dir start give " Exec format error " )

Hi all,
after some reading I was trying to install bacula on my
OpenSUSE 10.2 x64

Reading here and there found out that it’s a quite complex systems…a “read doc first” ones.

I started from documentation. Seems nothing impossible.

Added the repository

http://download.opensuse.org/repositories/Archiving%3a/Backup/openSUSE_11.2/

Then started installing the pkgs.

zypper install bacula-*

Then, as stated in the documentation, configured the various .conf files.

Quite charming…BUT…

When I had to get the service started the system reply with an unpleasant error


# service bacula-dir start
# Starting the Bacula Director daemonstartproc:  cannot execute /usr/sbin/bacula-dir: Exec format error

I found that
init.d script bacula-dir point to an executable, well that it’s not an executable. It’s just a Zero byte file.


# ll /usr/sbin/bacula-dir
-rwxr-xr-x 1 root root 0 Nov  9 09:42 /usr/sbin/bacula-dir

So I didn’t give up and try to build pkg from src.rpm.

rpmbuild give me same result, the created ELF executable it’s empty


ll BUILDROOT/bacula-5.0.3-5.1.x86_64/usr/sbin/bacula-dir
-rwxr-xr-x 1 root root 0 Jan 23 16:14 BUILDROOT/bacula-5.0.3-5.1.x86_64/usr/sbin/bacula-dir

Someone could help?
Thanks.

So openSUSE 10.2 is no longer supported carlo_t, which does not mean a good Samaritan who knows the exact answer might not pop up here. However, we would not know any better about how to do this than the bacula web site where you found this file. I am thinking I would try the rpm files instead of trying a compile, perhaps the older the better, but I don’t really know:

Bacula - Browse /rpms at SourceForge.net

The file bacula does not show up in a YaST search but it is in the 1-Click install here:

software.opensuse.org: Search Results

I am thinking though you would need to upgrade openSUSE to at least 11.2 to use these files however, but I could be wrong. Good luck.

Thank You,

Not 10.2 Sorry !!!

It’s a OpenSUSE 11.2 . . .

Not 10.2 Sorry !!!

It’s a OpenSUSE 11.2 . . .
software.opensuse.org: Search Results

Then, if you have not already figured it out, you can switch to openSUSE 11.2 and find that the bacula file can be installed using the 1-Click install for openSUSE 11.2 as shown above.

Thank You,

I’ll try, but adding the repos (Index of /repositories/Archiving:/Backup/openSUSE_11.2) and installing via zypper or yast isn’t the same?
I see the same pckt downloaded and installed.

Anyway compiling the src.rpm give me a zero byte executables I can’t investigate further, so I opened a bug:
https://bugzilla.novell.com/show_bug.cgi?id=666430
Thanks for help and answers

I’ll try, but adding the repos (Index of /repositories/Archiving:/Backup/openSUSE_11.2) and installing via zypper or yast isn’t the same?
I see the same pckt downloaded and installed.

Anyway compiling the src.rpm give me a zero byte executables I can’t investigate further, so I opened a bug:
https://bugzilla.novell.com/show_bug.cgi?id=666430
Thanks for help and answers
carlo_t, it is my opinion that in almost every case, you would better off installing the application, if it exists, from the 1-click installation rather than trying to compile the application yourself for the very reason you state when trying to compile the source code yourself. You are not the only person that have had such issues. In any event, good luck with your endeavor to install bacula. We want you to success and please ask for help if you need any more.

Thank You,

1-click install gave me the same result.


# service bacula-dir start
Starting the Bacula Director daemonstartproc:  cannot execute /usr/sbin/bacula-dir: Exec format error
                                                                                                                                                                                                        failed
# ll /usr/sbin/bacula-dir
-rwxr-xr-x 1 root root 0 Jan 23 18:01 /usr/sbin/bacula-dir

a zero byte executable…
sad…

So it is possible that your attempt to compile the application has left something that can not be over written by the new install. I might suggest you open YaST / Software / Software Management and search for bacula. When found. right click on it and select Delete and let the program be uninstalled. Then, open up a terminal session and input the following commands:

su -
password:
rm /usr/sbin/bacula-dir

Next, open YaST / Software / Software Management and search for bacula again and this time elect to reinstall it. I assume that the one click install left the repository for this application, but if you removed it, then you need to go back to the 1-click just as before and install that way. See if this makes any difference.

Thank You,

Fly-checked before the 1-click install. Nothing left behind.
thanks

Same trouble on OpenSuse 11.3 It looks like bacula installation packages are completely damaged, all these files should be soft or hard links to their MySQL equivalents, but they are just zero sized, and if copied manually, they are erased on each package upgrade… It sucks…
Breaks backups completely.


/usr/sbin # ls -l -1 bacula* bcopy* bscan* dbcheck* 
-rwxr-xr-x 1 root root   1636 2011-01-21 04:55 bacula
-rwxr-xr-x 1 root root      0 2011-01-21 04:55 bacula-dir
-rwxr-xr-x 1 root root 861588 2011-01-21 04:55 bacula-dir.mysql
-rwxr-xr-x 1 root root 429228 2011-01-21 04:55 bacula-fd
-rwxr-xr-x 1 root root 595948 2011-01-21 04:55 bacula-sd
-rwxr-xr-x 1 root root      0 2011-01-21 04:55 bcopy
-rwxr-xr-x 1 root root 498608 2011-01-21 04:55 bcopy.mysql
-rwxr-xr-x 1 root root      0 2011-01-21 04:55 bscan
-rwxr-xr-x 1 root root 605552 2011-01-21 04:55 bscan.mysql
-rwxr-xr-x 1 root root      0 2011-01-21 04:55 dbcheck
-rwxr-xr-x 1 root root 397932 2011-01-21 04:55 dbcheck.mysql

As I see, the root cause of this issue is that ‘bacula-director-mysql’ and other RPMs contain zero-sized binaries packaged inside RPM file:


-rwxr-xr-x 1 root root      0 Feb  1 14:44 bacula-dir
-rwxr-xr-x 1 root root 964367 Feb  1 14:44 bacula-dir.mysql
-rwxr-xr-x 1 root root      0 Feb  1 14:44 dbcheck
-rwxr-xr-x 1 root root 436831 Feb  1 14:44 dbcheck.mysql

And following post-install script will not overwrite existing zero-sized files. However, if zero-sized files are not packaged into RPM, it will create correct symlinks.


/usr/sbin/update-alternatives --install \
        /usr/sbin/bacula-dir bacula-dir /usr/sbin/bacula-dir.mysql 50

So, the RPM packages for bacula must be fixed.

FYI - there is a bug already opened https://bugzilla.novell.com/show_bug.cgi?id=653513

Thanks. I had updated the bug report.
Now

https://bugzilla.novell.com/show_bug.cgi?id=666430

is a duplicate of

https://bugzilla.novell.com/show_bug.cgi?id=653513

I solved the problem by removing bacula-dir and linking bacula-dir.mysql with bacula-dir :


rm bacula-dir
ln -s bacula-dir.mysql bacula-dir

It’s ok for me now.

This bug still exists in openSUSE 11.4.

Note to jdmcdaniel3: You got it completely backwards. The OP did install from RPM packages, and that is actually the cause of the trouble. The problem can be completely avoided by compiling from source.