Hi guys,
First off, really impressed with FreeBSD, ZFS and Jails. We're slowly switching out our computing platform over to FreeBSD from CentOS.
I'm trying to run Postgres 9.1.2 inside FreeBSD 9.0 jail with DTrace turned on.
Got the jail to work fine. When inside the jail, dtrace -l|head works, so DTrace works.
But you try to compile the databases/postgresql91-server port with DTrace turned on, I get a compiler error:
I assumed this is because even though the dtrace probes are running, the files needed to compile aren't accessible inside the jail?
So I went ahead and compiled the same port in the "master" (non-jail) environment with dtrace enabled. This worked. Of course, you can't run the compiled binaries inside the jail. So I copied all the files created from installing the port into the /usr/jail//usr/local (basically copy all the binaries).
Then went back into the jail and was able to run initdb and then pg_ctl. The database runs, but I get an error:
Can anyone here tell me what's the best way to accomplish this?
I've read the docs on dtrace and jails and they all works. Just not sure how to go about dtrace + jail + postgres.
Thanks!
Matt
First off, really impressed with FreeBSD, ZFS and Jails. We're slowly switching out our computing platform over to FreeBSD from CentOS.
I'm trying to run Postgres 9.1.2 inside FreeBSD 9.0 jail with DTrace turned on.
Got the jail to work fine. When inside the jail, dtrace -l|head works, so DTrace works.
But you try to compile the databases/postgresql91-server port with DTrace turned on, I get a compiler error:
Code:
===> Building for postgresql-client-9.1.2
gmake -C utils probes.h
gmake[1]: Entering directory `/usr/ports/databases/postgresql91-client/work/postgresql-9.1.2/src/backend/utils'
dtrace -C -h -s probes.d -o probes.h.tmp
dtrace: failed to compile script probes.d: "/usr/lib/dtrace/psinfo.d", line 37: syntax error near "uid_t"
gmake[1]: *** [probes.h] Error 1
gmake[1]: Leaving directory `/usr/ports/databases/postgresql91-client/work/postgresql-9.1.2/src/backend/utils'
gmake: *** [utils/probes.h] Error 2
*** Error code 2
Stop in /usr/ports/databases/postgresql91-client.
*** Error code 1
Stop in /usr/ports/databases/postgresql91-server.
*** Error code 1
I assumed this is because even though the dtrace probes are running, the files needed to compile aren't accessible inside the jail?
So I went ahead and compiled the same port in the "master" (non-jail) environment with dtrace enabled. This worked. Of course, you can't run the compiled binaries inside the jail. So I copied all the files created from installing the port into the /usr/jail//usr/local (basically copy all the binaries).
Then went back into the jail and was able to run initdb and then pg_ctl. The database runs, but I get an error:
Code:
pg_ctl -D ~/data/ start
pg_ctl: another server might be running; trying to start server anyway
server starting
WARNING: number of probes fixed does not match the number of defined probes (54 != 68, respectively)
WARNING: some probes might not fire or your program might crash
Can anyone here tell me what's the best way to accomplish this?
I've read the docs on dtrace and jails and they all works. Just not sure how to go about dtrace + jail + postgres.
Thanks!
Matt