Plastic 2 on Solaris

Thursday, January 17, 2008 , , 1 Comments

I've just finished setting up a Plastic BL081 (preview 2) server on Solaris.

$ uname -a
SunOS atenea 5.11 snv_34 sun4u sparc SUNW,
Sun-Blade-1000
$


I've downloaded the latest 2.0.3 Firebird Server for Solaris 10 SPARC,
installed it and had some minor troubles to make it run.

I tried to start the plasticd server but it failed telling it wasn't able to create the databases. Odd.

Once installed it was refusing all connections. The classic server was listening (you were able to connect using a telnet to port 3050, but it was giving some errors: it wasn't able to find libfbembed.so library!

Well, it looked like a LD_LIBRARY_PATH issue.

Looking into /etc/inetd.conf (which is actually a link to /etc/inet/inetd.conf) I found out a line like the following:

gds_db stream tcp nowait root /opt/firebird/bin/fb_inet_server fb_inet_server

Well, it seemed that nobody was telling info about where the libraries were located.

I tried to run fb_inet_server manually and it failed because libgcc-3.4.6-sol9-sparc-local package wasn't installed. A quick visit to sunfreeware and pkgadd was enough this time.

Then the problem with the LD_LIBRARY_PATH: I typed the following script named fbserver at /opt/firebird/bin


#!/bin/sh
# all in one line
LD_LIBRARY_PATH=/usr/local/lib:/opt/firebird/lib
/opt/firebird/bin/fb_inet_server


And then modified inetd.conf to have the following line:

gds_db stream tcp nowait root /opt/firebird/bin/fbserver fbserver

And finally restart inetd.

But, hey, in solaris you have to take some intermediate steps:

  • run inetconv to convert inetd.conf in the internal xml format. It will let you know if the previous manifest was there already (mine was at /var/svc/manifest/network/gds_db-tcp.xml, remove it and run inetconv again)
  • then disable and enable again gds (firebird server) with inetadm
  • finally restart inetd


    # inetconv
    # inetadm -d svc:/network/gds_db/tcp:default
    # inetadm -e svc:/network/gds_db/tcp:default
    # svcadm disable inetd
    # svcadm enable inetd
    #


    And you're done. I guess there must be an easier way to set up a firebird server on Solaris but...

    I used the following db.conf to configure the plastic database backend


    <DbConfig>
    <ProviderName>firebird</ProviderName>
    <ConnectionString>ServerType=0;Server=localhost;Port=3050;
    User=SYSDBA;Password=masterkey;Database={0};
    Pooling=true;Connection Timeout=120;</ConnectionString>
    <DatabasePath></DatabasePath>
    </DbConfig>


    Well, remember all the connection string goes in one line.


    Hope it helps!
  • 1 comment:

    1. try setting:
      1. crle -l /opt/firebird/lib for the LD_LIBRARY_PATH issue
      2. Yes Firebird for Solaris Sparc and Intel were built using gcc so you do need to download libgcc
      3. re. inetconv I could put that in the install script but decided not to - perhaps next time.

      ReplyDelete