[Bacula-users] bacula-dir + FreeBSD
Hi list, today I built bacula from FreeBSD ports. Now I can start both bacula-sd and bacula-fd on startup, yet I cant start bacula-dir on startup. The error message I get in my log is: Mar 30 21:13:16 freebsd /boot/generic/kernel: pid 42355 (bacula-dir), uid 910: exited on signal 6 I don't know why bacula-dir exits with Abort? I can start bacula-dir from the command line if I type this: # /usr/local/sbin/bacula-fd -vt -c /usr/local/etc/bacula-fd.conf -- Kimi - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] bacula-dir + FreeBSD
On 30/03/07, Jason King <[EMAIL PROTECTED]> wrote: > I ran into the same problem. You have to check the startup script and > change the user that it starts as. It's wanting to start as a user other > than root. Here is the line you are looking for in the rc.d script. The > -u flag should be changed it root. > > : ${bacula_dir_flags=" -u root -g wheel -v -c > /usr/local/etc/bacula-dir.conf"} > Ok. its not a proper fix. I just executed: /usr/local/sbin/bacula-dir -fv -d99 -u bacula -g bacula -c /usr/local/etc/bacula-dir.conf works just fine. A bug in the rc script. I'll open a PR or contact the port maintainer. thank you!! -- Kimi - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] bacula-dir + FreeBSD
On 30/03/07, Arno Lehmann <[EMAIL PROTECTED]> wrote: > Hi, > > On 3/30/2007 10:38 PM, Jason King wrote: > > I ran into the same problem. You have to check the startup script and > > change the user that it starts as. It's wanting to start as a user other > > than root. Here is the line you are looking for in the rc.d script. The > > -u flag should be changed it root. > > Oh... I don't agree here. I mean, I'm running the DIR as root, but this > is on a machine dedicated to running Bacula, no user access, no access > from beyond my firewall, not even any user accounts that could log into it. > > Generally, for security reasons, it's a good idea to run all services as > non-root user. > > In fact I do know for sure that Bacula can run as non-root user, both on > linux and on FreeBSD. > > You should make sure the acount the DIR tries to run as exists, and can > access all the vital locations the DIR needs to access. These include > the working directory and configuration files, and it is possible I > forgot others :-) > > > : ${bacula_dir_flags=" -u root -g wheel -v -c > > /usr/local/etc/bacula-dir.conf"} > > > > Kimi Ostro wrote: > >> Hi list, > >> > >> today I built bacula from FreeBSD ports. > >> > >> Now I can start both bacula-sd and bacula-fd on startup, yet I cant > >> start bacula-dir on startup. The error message I get in my log is: > >> Mar 30 21:13:16 freebsd /boot/generic/kernel: pid 42355 (bacula-dir), > >> uid 910: exited on signal 6 > >> > >> I don't know why bacula-dir exits with Abort? > >> > >> I can start bacula-dir from the command line if I type this: > >> # /usr/local/sbin/bacula-fd -vt -c /usr/local/etc/bacula-fd.conf > > The t options means a test of the configuration. It will not actually > run the DIR as a daemon. > sorry, was a typo error. still, typing: /usr/local/sbin/bacula-dir -fv -d99 -u bacula -g bacula -c /usr/local/etc/bacula-dir.conf works fine. yet /usr/local/etc/rc.d/bacula-dir start does not work and leave a message in /var/log/message about sig 6/abort. A buggy rc.d script. I am going to re-write it and see if that fixes the problem. > Arno > > >> > > > > > > - > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys-and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > ___ > > Bacula-users mailing list > > Bacula-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/bacula-users > > -- > IT-Service Lehmann[EMAIL PROTECTED] > Arno Lehmann http://www.its-lehmann.de > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > -- Kimi - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] bacula-dir + FreeBSD
On 30/03/07, Arno Lehmann <[EMAIL PROTECTED]> wrote: > Hi, > > Which version of Bacula and FreeBSD is this? > Bacula Version: 2.0.3 (06 March 2007) FreeBSD 6.2-STABLE #0: Fri Mar 30 07:19:11 GMT 2007 > I'm quite sure that FreeBSD 5 and 6 and Bacula (from ports) versions 2.0 > up to the current version work out of the box in other installations. > Yeah, I was following directions on Dan Langille's FreeBSD Diary site. I cd in to: # cd /usr/ports/sysutils/bacula-server # make install clean # cd /usr/ports/sysutils/bacula-client # make install clean I enabled bacula-sd, bacula-dir, bacula-fd in /etc/rc.conf.local then typed: # /usr/local/etc/rc.d/bacula-dir start # /usr/local/etc/rc.d/bacula-sd start # /usr/local/etc/rc.d/bacula-fd start executed top and noticed bacula-dir wasn't running so ran the rc script again. nothing, checked over my rc.conf{.local} files, executed bacula-dir's rc once again, nothing. so checked my /var/log/message and noticed: Mar 30 21:13:16 freebsd/boot/generic/kernel: pid 42355 (bacula-dir), uid 910: exited on signal 6 Mar 30 21:51:21 freebsd /boot/generic/kernel: pid 59009 (bacula-dir), uid 910: exited on signal 6 Mar 30 21:53:25 freebsd /boot/generic/kernel: pid 60559 (bacula-dir), uid 910: exited on signal 6 > I'm not a FreeBSD person, so I won't discuss their rc.d and startup > scripts... > okay. > Arno > thanks for you time. -- Kimi - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] bacula-dir + FreeBSD
On 30/03/07, Dan Langille <[EMAIL PROTECTED]> wrote: > On 30 Mar 2007 at 22:16, Kimi Ostro wrote: > > > On 30/03/07, Arno Lehmann <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > On 3/30/2007 10:38 PM, Jason King wrote: > > > > I ran into the same problem. You have to check the startup script and > > > > change the user that it starts as. It's wanting to start as a user other > > > > than root. Here is the line you are looking for in the rc.d script. The > > > > -u flag should be changed it root. > > > > > > Oh... I don't agree here. I mean, I'm running the DIR as root, but this > > > is on a machine dedicated to running Bacula, no user access, no access > > > from beyond my firewall, not even any user accounts that could log into > > > it. > > > > > > Generally, for security reasons, it's a good idea to run all services as > > > non-root user. > > > > > > In fact I do know for sure that Bacula can run as non-root user, both on > > > linux and on FreeBSD. > > > > > > You should make sure the acount the DIR tries to run as exists, and can > > > access all the vital locations the DIR needs to access. These include > > > the working directory and configuration files, and it is possible I > > > forgot others :-) > > > > > > > : ${bacula_dir_flags=" -u root -g wheel -v -c > > > > /usr/local/etc/bacula-dir.conf"} > > > > > > > > Kimi Ostro wrote: > > > >> Hi list, > > > >> > > > >> today I built bacula from FreeBSD ports. > > > >> > > > >> Now I can start both bacula-sd and bacula-fd on startup, yet I cant > > > >> start bacula-dir on startup. The error message I get in my log is: > > > >> Mar 30 21:13:16 freebsd /boot/generic/kernel: pid 42355 (bacula-dir), > > > >> uid 910: exited on signal 6 > > > >> > > > >> I don't know why bacula-dir exits with Abort? > > > >> > > > >> I can start bacula-dir from the command line if I type this: > > > >> # /usr/local/sbin/bacula-fd -vt -c /usr/local/etc/bacula-fd.conf > > > > > > The t options means a test of the configuration. It will not actually > > > run the DIR as a daemon. > > > > > > > sorry, was a typo error. > > still, typing: > > /usr/local/sbin/bacula-dir -fv -d99 -u bacula -g bacula -c > > /usr/local/etc/bacula-dir.conf > > > > works fine. yet > > > > /usr/local/etc/rc.d/bacula-dir start > > > > does not work and leave a message in /var/log/message about sig 6/abort. > > > > A buggy rc.d script. I am going to re-write it and see if that fixes > > the problem. > > I'll be happy to see any solutions you find. some progress: executing: # /usr/local/sbin/bacula-dir -d99 -v -u root -g bacula -c /usr/local/etc/bacula-dir.conf results in: bacula-dir: dird.c:152 Debug level = 99 Fatal error 'mutex is on list' at line 540 in file /usr/src/lib/libpthread/thread/thr_mutex.c (errno = 3) # gdb /usr/local/sbin/bacula-dir /var/crash/bacula-dir:10541.core (gdb) where #0 0x28166537 in pthread_testcancel () from /lib/libpthread.so.2 #1 0x2815589a in sigaction () from /lib/libpthread.so.2 #2 0x2814f88d in pthread_kill () from /lib/libpthread.so.2 #3 0x2814f256 in raise () from /lib/libpthread.so.2 #4 0x28512e34 in abort () from /lib/libc.so.6 #5 0x28166c6f in pthread_testcancel () from /lib/libpthread.so.2 #6 0x2815b85f in _pthread_mutex_trylock () from /lib/libpthread.so.2 #7 0x2815c590 in _pthread_mutex_lock () from /lib/libpthread.so.2 #8 0x28152361 in _spinlock () from /lib/libpthread.so.2 #9 0x284b0afb in _UTF8_init () from /lib/libc.so.6 #10 0x2852d2e0 in _thread_autoinit_dummy_decl_stub () from /lib/libc.so.6 #11 0xbfbfea44 in ?? () #12 0x280cc599 in symlook_obj () from /libexec/ld-elf.so.1 #13 0x281573ff in pthread_attr_init () from /lib/libpthread.so.2 #14 0x281538fd in sigaction () from /lib/libpthread.so.2 #15 0x2815d915 in pthread_mutexattr_init () from /lib/libpthread.so.2 #16 0x28157116 in pthread_create () from /lib/libpthread.so.2 #17 0x08079c16 in start_UA_server () #18 0x0804e601 in main () beyond me :( > -- > Dan Langille : Software Developer looking for work > my resume: http://www.freebsddiary.org/dan_langille.php > PGCon - The PostgreSQL Conference - http://www.pgcon.org/ > -- Kimi - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] bacula-dir + FreeBSD
On 30/03/07, Dan Langille <[EMAIL PROTECTED]> wrote: > On 30 Mar 2007 at 23:21, Kimi Ostro wrote: > > > On 30/03/07, Arno Lehmann <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > Which version of Bacula and FreeBSD is this? > > > > > > > Bacula Version: 2.0.3 (06 March 2007) > > FreeBSD 6.2-STABLE #0: Fri Mar 30 07:19:11 GMT 2007 > > Oh, here it is over here! Sorry. > that ok > Ahh good. Well, that's pretty close to what I'm running: > > > > I'm quite sure that FreeBSD 5 and 6 and Bacula (from ports) versions 2.0 > > > up to the current version work out of the box in other installations. > > > > > > > Yeah, I was following directions on Dan Langille's FreeBSD Diary site. > > > > I cd in to: > > # cd /usr/ports/sysutils/bacula-server > > # make install clean > > # cd /usr/ports/sysutils/bacula-client > > # make install clean > > > > I enabled bacula-sd, bacula-dir, bacula-fd in /etc/rc.conf.local then typed: > > > > # /usr/local/etc/rc.d/bacula-dir start > > # /usr/local/etc/rc.d/bacula-sd start > > # /usr/local/etc/rc.d/bacula-fd start > > > > executed top and noticed bacula-dir wasn't running > > > > so ran the rc script again. nothing, checked over my rc.conf{.local} > > files, executed bacula-dir's rc once again, nothing. so checked my > > /var/log/message and noticed: > > > > Mar 30 21:13:16 freebsd/boot/generic/kernel: pid 42355 (bacula-dir), > > uid 910: exited on signal 6 > > Mar 30 21:51:21 freebsd /boot/generic/kernel: pid 59009 (bacula-dir), > > uid 910: exited on signal 6 > > Mar 30 21:53:25 freebsd /boot/generic/kernel: pid 60559 (bacula-dir), > > uid 910: exited on signal 6 > > It's beyond me. I have no ideas at this point. But I don't think it > is a rc.d issue. > neither do I now :( > Do you have a customized kernel? > No, just GENERIC. I'm going to try this on a CURRENT, under a jail. > -- > Dan Langille : Software Developer looking for work > my resume: http://www.freebsddiary.org/dan_langille.php > PGCon - The PostgreSQL Conference - http://www.pgcon.org/ > -- Kimi - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] bacula-dir + FreeBSD
Ok, work under CURRENT not problem. teos# ps aux | grep bacula bacula 27290 0.0 0.7 7708 3792 ?? Ss1:13AM 0:00.02 /usr/local/sbin/bacula-sd -u bacula -g bacula -v -c /usr/local/etc/bacula-sd.conf bacula 27868 0.0 0.8 9248 4280 ?? Ss1:13AM 0:00.01 /usr/local/sbin/bacula-dir -u bacula -g bacula -v -c /usr/local/etc/bacula-dir.co root 28501 0.0 0.7 7580 3528 ?? Ss1:13AM 0:00.02 /usr/local/sbin/bacula-fd -u root -g wheel -v -c /usr/local/etc/bacula-fd.conf teos# uname -a FreeBSD freebsdc.example.org 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Fri Mar 30 03:18:00 BST 2007 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/generic i386 although not under jail - some kind Disk I/O error with sqlite3. Thanks all. ps - I going try re-try with a fresh STABLE over the weekend. -- Kimi - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] bacula-dir + FreeBSD
On 31/03/07, Dan Langille <[EMAIL PROTECTED]> wrote: > > BINGO! Oops! I was not clear. under FreeBSD-CURRENT, I created a jail (Basically I have a test box that runs CURRENT with loads of jails) so I thought I could create a new jail and build ports/sysutils/bacula-server. That did not work as planned, sqlite kept saying Disk I/O Error when executing /usr/local/share/bacula/make_bacula_tables (this I will investigate too) Which is the funny thing, Jails are the main reason I looked at using Bacula in the first place. > > Try MySQL on 6.2. well I will try Postgresql as I dont have MySQL server setup and much preferd Postgresql and Sqlite. > > I suspect a pthreads problem with SQLite: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/106781 > > If you can figure out how to fix it.. one "fix": use ports/databases/sqlite3-threads instead of ports/databases/sqlite3 :) - maybe change the dependency? both seem different looking at the Makefiles, although the threads flavour of sqlite3 seems to enable more options, even though it a slave of sqlite3. > > -- > Dan Langille : Software Developer looking for work > my resume: http://www.freebsddiary.org/dan_langille.php > PGCon - The PostgreSQL Conference - http://www.pgcon.org/ > -- Kimi - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] bacula-dir + FreeBSD
Just to follow up: I basically spent my weekend testing various ways and this is what I came up with: the thing that always breaks bacula-dir is sqlite3 with threads. now, if you want to use a threaded sqlite3, better of using sqlite3-threads port (i reckon changing dependency to this might be safer!?). Yes there is difference between ports/databases/sqlite3 built with WITH_THREADS options compared to ports/databases/sqlite3-threads, I wont pretend to understand why??. building ports/sysutils/bacula-server with WITH_MYSQL or WITH_POSTGRESQL work fine. also to note, if you want to jail(8) bacula-dir with sqlite3 - use sqlite3-threads, otherwise Disk I/O Error and not being able to add Tables to database all hell will break loose. all tested with FreeBSD-STABLE and FreeBSD-CURRENT. Thanks all, for the rapid responses and the great software :) -- Kimi - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] bacula-dir + FreeBSD
On 01/04/07, Dan Langille <[EMAIL PROTECTED]> wrote: > On 1 Apr 2007 at 21:59, Kimi Ostro wrote: > > > Just to follow up: > > > > I basically spent my weekend testing various ways and this is what I > > came up with: > > > > the thing that always breaks bacula-dir is sqlite3 with threads. now, > > if you want to use a threaded sqlite3, better of using sqlite3-threads > > port (i reckon changing dependency to this might be safer!?). > > > > Yes there is difference between ports/databases/sqlite3 built with > > WITH_THREADS options compared to ports/databases/sqlite3-threads, I > > wont pretend to understand why??. building > > ports/sysutils/bacula-server with WITH_MYSQL or WITH_POSTGRESQL work > > fine. > > > > also to note, if you want to jail(8) bacula-dir with sqlite3 - use > > sqlite3-threads, otherwise Disk I/O Error and not being able to add > > Tables to database all hell will break loose. > > > > all tested with FreeBSD-STABLE and FreeBSD-CURRENT. > > Am I correct? sqlite3-threads worked in all cases? If so, I will > make the change immediately. Yes, each (STABLE then CURRENT) on normal non-jailed FreeBSD and again each in jail. > > > Thanks all, for the rapid responses and the great software :) > > Thank you for figuring it out. > It was fun > -- > Dan Langille : Software Developer looking for work > my resume: http://www.freebsddiary.org/dan_langille.php > PGCon - The PostgreSQL Conference - http://www.pgcon.org/ > > > -- Kimi - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users