This discussion is locked
bustback

Q: PostgreSQL viewing/administration

We now know that Final Cut Server uses PostgreSQL for the database and that it's available on port 5443 (I think).

Two questions:

1. How can I connect to the database?
2. Has anyone tried to install phpPgAdmin into the Final Cut Server installation to check and review the database?

Also, separate but semi-related question from an administration standpoint...

Where is the documentation on importing/exporting XML definitions of assets in Final Cut Server?

I have to web-enable the Final Cut Server installation and am looking for resources on how I might go about this. I think there was a ruby/php driven web interface that was demoed at NAB but that it's currently unavailable and is an internal Apple project (why would that be... Artbox had some of those capabilities already?!).

Anyway, if anyone can point me in the right direction I'd appreciate it. There's no documentation on the low level capabilities of Final Cut Server (command-line, XML handling, etc.).

cheers,

jon

g5, Mac OS X (10.4.11)

Posted on Apr 28, 2008 5:16 AM

Close

Q: PostgreSQL viewing/administration

  • All replies
  • Helpful answers

Previous Page 2
  • by pc.huff,

    pc.huff pc.huff Nov 10, 2008 7:54 AM in response to Will Griffith
    Level 1 (0 points)
    Nov 10, 2008 7:54 AM in response to Will Griffith
    First of all, thank you so much for your help with this.

    I have configured the remote login in Sys prefs and can see that ssh is turned on. However, I keep getting a "SSH Tunnel: 2 Conenct failed, Connection Refused" error trying to connect. Any ideas? I'm putting in the right IP, username and password.

    I can use Putty and can log in to the machine no problem. Navicat is giving me fits though!
  • by pc.huff,

    pc.huff pc.huff Nov 10, 2008 7:56 AM in response to pc.huff
    Level 1 (0 points)
    Nov 10, 2008 7:56 AM in response to pc.huff
    Also, if I change the general connection for teh server ip to "username@ipaddress" I get a different error:

    "SSH Tunnel: 1 Administratively prohibited, open failed"
  • by pc.huff,

    pc.huff pc.huff Nov 10, 2008 8:11 AM in response to pc.huff
    Level 1 (0 points)
    Nov 10, 2008 8:11 AM in response to pc.huff
    I also get this error:

    "SSH Tunnel: 30016 Invalid username or password reported by server, or bad private key."
  • by pc.huff,

    pc.huff pc.huff Nov 11, 2008 6:52 AM in response to pc.huff
    Level 1 (0 points)
    Nov 11, 2008 6:52 AM in response to pc.huff
    Ok. So I'm trying to do this programmatically. I can establish the ssh session and setup port forwarding. However, I get a timeout every time I try to establish the connection to the Server. Any ideas?
  • by pc.huff,

    pc.huff pc.huff Nov 11, 2008 11:56 AM in response to pc.huff
    Level 1 (0 points)
    Nov 11, 2008 11:56 AM in response to pc.huff
    I could never get the SSH to work and I did not have a root password to the machine. Here is what I did to access the configuration files and open remote access to the database:

    While machine is booting press Command-S to boot into root Shell

    type "/sbin/fsck -fy" and press enter and wait for commands to finish (will return command prompt to ":/ root#")
    type "/sbin/mount -uw /" and press enter and wait for commands to finish (will return command prompt to ":/ root#")
    type "cd /var/db/finalcutserver/data" and press enter to navigate to the PostgreSQL db location.

    1. You have to make PostgreSQL listen for remote incoming TCP connections because the default settings
    allow it to listen only for connections on the loopback interface. To be able to reach the server remotely
    you have to add the following line into the file /var/db/finalcutserver/data/postgresql.conf:

    type "emacs postgresql.conf" and press enter

    Find the following line, remove the '#' comment character and edit it read as follows:

    listen_addresses = '*'

    press ctrl-x followed by ctl-s to save the file
    press ctrl-x followed by ctl-c to exit emacs


    2. PostgreSQL by default refuses all connections it receives from any remote address,
    you have to relax these rules by adding this line to /var/db/finalcutserver/data/pg_hba.conf:

    add this line under the loopback line (127.0.0.1)

    host all all 0.0.0.0/0 trust

    press ctrl-x followed by ctl-s to save the file
    press ctrl-x followed by ctl-c to exit emacs

    type "logout" to exit root shell and boot into the OS

    Now you can remotely connect to the Postgre database for FCS.

    The database name for FCS is px.
  • by JoshP.,

    JoshP. JoshP. Nov 12, 2008 4:43 PM in response to pc.huff
    Level 1 (45 points)
    Nov 12, 2008 4:43 PM in response to pc.huff
    Note that the instructions provided above will change the postgresql setup from a local system only configuration to allowing any user from any IP address attempt to connect to the Final Cut Server database, which may or may not meet your security guidelines.

    Please refer to the instructions in the postgresql.conf and pg_hba.conf files for information on security for the database, or alternately, you can work with Apple Professional Services or a local value-added reseller for a configuration that suits your needs.
  • by pc.huff,

    pc.huff pc.huff Nov 13, 2008 10:41 AM in response to JoshP.
    Level 1 (0 points)
    Nov 13, 2008 10:41 AM in response to JoshP.
    Okay, yes this violates security standards. It turns out I was doing things wrong. I've got it to work now. Both programmatically and from Putty.

    Here is a link to a great article on how to get this setup:

    http://www.postgresonline.com/journal/index.php?/archives/38-PuTTY-for-SSH-Tunne ling-to-PostgreSQL-Server.html

    The port for FCS PostgreSQL instance is 5433. This will do it for ya!
Previous Page 2