Kubuntu 6.06, Linux Intel
I'm trying to get bacula working with Postgres but I'm having trouble getting
the director to connect. I can connect to Postgres as bacula:
sh-3.1$ id
uid=118(bacula) gid=118(bacula) groups=26(tape),118(bacula)
sh-3.1$ psql -Ubacula bacula
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
bacula=> \dt
List of relations
Schema | Name | Type | Owner
--------+--------------+-------+----------
public | basefiles | table | postgres
public | cdimages | table | postgres
public | client | table | postgres
public | counters | table | postgres
public | file | table | postgres
public | filename | table | postgres
public | fileset | table | postgres
public | job | table | postgres
public | jobmedia | table | postgres
public | media | table | postgres
public | path | table | postgres
public | pool | table | postgres
public | temp | table | ssimpson
public | temp2 | table | ssimpson
public | unsavedfiles | table | postgres
public | version | table | postgres
(16 rows)
bacula=> \q
Next I try running the director manually:
[EMAIL PROTECTED]:/etc/bacula# /usr/sbin/bacula-dir -c
/etc/bacula/bacula-dir.conf -u
bacula -g bacula
22-Aug 15:33 bacula-dir: Fatal error: Could not open database "bacula".
22-Aug 15:33 bacula-dir: Fatal error: postgresql.c:174 Unable to connect to
PostgreSQL server.
Database=bacula User=bacula
It is probably not running or your password is incorrect.
22-Aug 15:33 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf
Running strace gives me on the previous command gives me
connect(8, {sa_family=AF_INET, sin_port=htons(5432),
sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EINPROGRESS (Operation now in
progress)
poll([{fd=8, events=POLLOUT|POLLERR, revents=POLLOUT}], 1, -1) = 1
getsockopt(8, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
getsockname(8, {sa_family=AF_INET, sin_port=htons(47113),
sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
poll([{fd=8, events=POLLOUT|POLLERR, revents=POLLOUT}], 1, -1) = 1
rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
send(8, "\0\0\0%\0\3\0\0user\0bacula\0database\0bac"..., 37, 0) = 37
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
poll([{fd=8, events=POLLIN|POLLERR, revents=POLLIN}], 1, -1) = 1
recv(8, "R\0\0\0\f\0\0\0\5\212?\257~", 16384, 0) = 13
rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
send(8, "p\0\0\0(md5d3fc19db1a0ff7f51aa1e5a1"..., 41, 0) = 41
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
poll([{fd=8, events=POLLIN|POLLERR, revents=POLLIN}], 1, -1) = 1
recv(8, "E\0\0\0_SFATAL\0C28000\0Mpassword aut"..., 16384, 0) = 96
brk(0x8135000) = 0x8135000
brk(0x8127000) = 0x8127000
nanosleep({5, 0}, NULL) = 0
time(NULL) = 1156286147
open("/etc/localtime", O_RDONLY) = 9
fstat64(9, {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0
fstat64(9, {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7acc000
read(9, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 4096) =
1017
close(9) = 0
munmap(0xb7acc000, 4096) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0
time([1156286147]) = 1156286147
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0
socket(PF_FILE, SOCK_DGRAM, 0) = 9
fcntl64(9, F_SETFD, FD_CLOEXEC) = 0
connect(9, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0
send(9, "<27>Aug 22 15:35:47 bacula-dir: "..., 92, MSG_NOSIGNAL) = 92
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7acc000
write(1, "22-Aug 15:35 bacula-dir: Fatal "..., 7322-Aug 15:35 bacula-dir:
Fatal error: Could not open database "bacula".
) = 73
time(NULL) = 1156286147
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0
time([1156286147]) = 1156286147
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0
send(9, "<27>Aug 22 15:35:47 bacula-dir: "..., 201, MSG_NOSIGNAL) = 201
write(1, "22-Aug 15:35 bacula-dir: Fatal "..., 18222-Aug 15:35 bacula-dir:
Fatal error: postgresql.c:174 Unable to connect to PostgreSQL server.
Database=bacula User=bacula
It is probably not running or your password is incorrect.
) = 182
time(NULL) = 1156286147
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0
write(1, "22-Aug 15:35 bacula-dir ERROR TE"..., 10522-Aug 15:35 bacula-dir
ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf
) = 105
There is something listening on the postgres port:
[EMAIL PROTECTED]:/etc/bacula# grep postgres /etc/services
postgresql 5432/tcp postgres # PostgreSQL Database
postgresql 5432/udp postgres
[EMAIL PROTECTED]:/etc/bacula# netstat -an |grep 5432
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
unix 2 [ ACC ] STREAM LISTENING
10707 /var/run/postgresql/.s.PGSQL.5432
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users