7 Replies Latest reply: Nov 25, 2009 12:36 AM by 807567 RSS

    SMC 4.0 setup database failed

    807567
      Hi,

      I'm trying to install SMC 4.0 on Sun V240 having Solaris 10 with release 10/09. The physical memory on the machine is 3 GB. Installation of SMC completes successfully but the setup fails with error message "Database setup failed : db-start failed".
      copying template1 to postgres ... ok
      
      WARNING: enabling "trust" authentication for local connections
      You can change this by editing pg_hba.conf or using the -A option the
      next time you run initdb.
      
      Success. You can now start the database server using:
      
          postmaster -D /var/opt/SUNWsymon/db/data/SunMC
      or
          pg_ctl -D /var/opt/SUNWsymon/db/data/SunMC -l logfile start
      
      createdb: could not connect to database postgres: could not connect to server: Connection refused
              Is the server running on host "127.0.0.1" and accepting
              TCP/IP connections on port 5433?
      Started /var/opt/SUNWsymon/install/guibased-setup.1258931301102.sh at Mon Nov 23 12:11:38 NZDT 2009.
      Running on SunOS wgls07.nz.thenational.com 5.10 Generic_141444-09 sun4u sparc SUNW,Sun-Fire-V240.
      psql: could not connect to server: Connection refused
              Is the server running on host "127.0.0.1" and accepting
              TCP/IP connections on port 5433?
      createlang: could not connect to database sunmc: could not connect to server: Connection refused
              Is the server running on host "127.0.0.1" and accepting
              TCP/IP connections on port 5433?
      psql: could not connect to server: Connection refused
              Is the server running on host "127.0.0.1" and accepting
              TCP/IP connections on port 5433?
      After some digging I made an update in /var/opt/SUNWsymon/db/data/SunMC/postgresql.conf, chaging the line listen_address from *'{localhost, 127.0.0.1}'* to '(asterisk)' +[I had to use, in this post, the word asterisk insterad of teh character, which was activating the bold format]+ . This fixed the database manual startup. Running the setup script again removes the changes I made and the problem returns.

      My network configuration is:
      # ifconfig -a
      lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
              inet 127.0.0.1 netmask ff000000
      lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
              zone wglsdb2
              inet 127.0.0.1 netmask ff000000
      lo0:2: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
              zone wglsdb1
              inet 127.0.0.1 netmask ff000000
      bge0: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 2
              inet 10.64.86.27 netmask ffffff00 broadcast 10.64.86.255
              groupname ipmp-test
              ether 0:3:ba:e8:65:9
      bge0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
              inet 10.64.86.36 netmask ffffff00 broadcast 10.64.86.255
      bge0:2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
              zone wglsdb2
              inet 10.64.86.101 netmask ffffff00 broadcast 10.64.86.255
      bge0:3: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
              zone wglsdb1
              inet 10.64.86.100 netmask ffffff00 broadcast 10.64.86.255
      bge1: flags=19040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,FAILED> mtu 1500 index 3
              inet 10.64.86.28 netmask ffffff00 broadcast 10.64.86.255
              groupname ipmp-test
              ether 0:3:ba:e8:65:a
      bge2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
              inet 10.64.87.20 netmask ffffff00 broadcast 10.64.87.255
              ether 0:3:ba:e8:65:b
      System is still using the */etc/pam.conf* file that comes with Sol10.

      Request if someone can help on how to setup the SMC 4.0.
      Cheers,
      Andreas

      Edited by: Bank_Of_New_Zealand on 23/11/2009 14:21
        • 1. Re: SMC 4.0 setup database failed
          752865
          Hi Andreas,

          The database user is commonly allocated resources from the default project in the /etc/project file. Edit the /etc/project file before performing setup of the SunMC server.

          The original file will look like this:

          system:0::::
          user.root:1::::
          noproject:2::::
          default:3::::
          group.staff:10::::

          Change it to this:

          system:0::::
          user.root:1::::
          noproject:2::::
          default:3::::project.max-shm-memory=(priv,5368708912,deny)
          group.staff:10::::

          Regards,

          Pegah Garousi
          Halcyon Monitoring Solutions
          • 2. Re: SMC 4.0 setup database failed
            807567
            Hello Pegah

            Even after that change, is still not working. Any more ideas?
            # cat /etc/project
            system:0::::
            user.root:1::::
            noproject:2::::
            #default:3::::
            default:3::::poject.max-shm-memory=(priv,1073741824,deny)
            group.staff:10::::
            # prtdiag|grep Memory\ size
            Memory size: 3GB
            # DISPLAY=10.68.66.16:0.0 /opt/SUNWsymon/sbin/es-guisetup &
            [1] 16681
            # Nov 25 08:24:04 wgls07.nz.thenational.com svc.startd[7]: application/management/sunmcdatabase:default failed repeatedly: transitioned to maintenance (see 'svcs -xv' for details)
            # tail /var/opt/SUNWsymon/install/gui_setup_wgls07.nz.thenational.com.091125082050
            Successfully disabled service sunmc-webserver
            Stopping agent component
            Successfully disabled service sunmc-agent
            Stopping platform component
            Successfully disabled service sunmc-platform
            verifyDatabaseDown: instance is not executing
            
            Successfully enabled service sunmc-database
            Please wait, Sun Management Center database setup in progress. It may take 5 minutes...
            Database setup failed : See the logfile /var/opt/SUNWsymon/install/core-db-setup_wgls07.nz.thenational.com.091125082357.17266
            # cat /var/opt/SUNWsymon/install/core-db-setup_wgls07.nz.thenational.com.091125082357.17266
            Started /var/opt/SUNWsymon/install/guibased-setup.1259090629094.sh at Wed Nov 25 08:23:57 NZDT 2009.
            Running on SunOS wgls07.nz.thenational.com 5.10 Generic_141444-09 sun4u sparc SUNW,Sun-Fire-V240.   
            The files belonging to this database system will be owned by user "smcdbu".                         
            This user must also own the server process.                                                         
            
            The database cluster will be initialized with locale C.
            
            creating directory /var/opt/SUNWsymon/db/data/SunMC ... ok
            creating directory /var/opt/SUNWsymon/db/data/SunMC/global ... ok
            creating directory /var/opt/SUNWsymon/db/data/SunMC/pg_xlog ... ok
            creating directory /var/opt/SUNWsymon/db/data/SunMC/pg_xlog/archive_status ... ok
            creating directory /var/opt/SUNWsymon/db/data/SunMC/pg_clog ... ok               
            creating directory /var/opt/SUNWsymon/db/data/SunMC/pg_subtrans ... ok           
            creating directory /var/opt/SUNWsymon/db/data/SunMC/pg_twophase ... ok           
            creating directory /var/opt/SUNWsymon/db/data/SunMC/pg_multixact/members ... ok  
            creating directory /var/opt/SUNWsymon/db/data/SunMC/pg_multixact/offsets ... ok  
            creating directory /var/opt/SUNWsymon/db/data/SunMC/base ... ok                  
            creating directory /var/opt/SUNWsymon/db/data/SunMC/base/1 ... ok                
            creating directory /var/opt/SUNWsymon/db/data/SunMC/pg_tblspc ... ok             
            selecting default max_connections ... 100                                        
            selecting default shared_buffers ... 1000                                        
            creating configuration files ... ok                                              
            creating template1 database in /var/opt/SUNWsymon/db/data/SunMC/base/1 ... ok    
            initializing pg_authid ... ok                                                    
            setting password ... ok                                                          
            enabling unlimited row size for system tables ... ok                             
            initializing dependencies ... ok
            creating system views ... ok
            loading pg_description ... ok
            creating conversions ... ok
            setting privileges on built-in objects ... ok
            creating information schema ... ok
            vacuuming database template1 ... ok
            copying template1 to template0 ... ok
            copying template1 to postgres ... ok
            
            WARNING: enabling "trust" authentication for local connections
            You can change this by editing pg_hba.conf or using the -A option the
            next time you run initdb.
            
            Success. You can now start the database server using:
            
                postmaster -D /var/opt/SUNWsymon/db/data/SunMC
            or
                pg_ctl -D /var/opt/SUNWsymon/db/data/SunMC -l logfile start
            
            createdb: could not connect to database postgres: could not connect to server: Connection refused
                    Is the server running on host "127.0.0.1" and accepting
                    TCP/IP connections on port 5433?
            Started /var/opt/SUNWsymon/install/guibased-setup.1259090629094.sh at Wed Nov 25 08:27:19 NZDT 2009.
            Running on SunOS wgls07.nz.thenational.com 5.10 Generic_141444-09 sun4u sparc SUNW,Sun-Fire-V240.
            psql: could not connect to server: Connection refused
                    Is the server running on host "127.0.0.1" and accepting
                    TCP/IP connections on port 5433?
            createlang: could not connect to database sunmc: could not connect to server: Connection refused
                    Is the server running on host "127.0.0.1" and accepting
                    TCP/IP connections on port 5433?
            psql: could not connect to server: Connection refused
                    Is the server running on host "127.0.0.1" and accepting
                    TCP/IP connections on port 5433?
            Cheers
            Andreas

            Edited by: Bank_Of_New_Zealand on 25/11/2009 09:34
            • 3. Re: SMC 4.0 setup database failed
              807567
              (cont...)

              But, if I try manually
              # sudo -u smcdbu postmaster -D /var/opt/SUNWsymon/db/data/SunMC
              LOG:  could not bind IPv6 socket: Cannot assign requested address
              HINT:  Is another postmaster already running on port 5433? If not, wait a few seconds and retry.
              LOG:  could not bind IPv4 socket: Address already in use
              HINT:  Is another postmaster already running on port 5433? If not, wait a few seconds and retry.
              WARNING:  could not create listen socket for "127.0.0.1"
              LOG:  database system was shut down at 2009-11-25 08:24:02 NZDT
              LOG:  checkpoint record is at 0/38DB60
              LOG:  redo record is at 0/38DB60; undo record is at 0/0; shutdown TRUE
              LOG:  next transaction ID: 567; next OID: 10793
              LOG:  next MultiXactId: 1; next MultiXactOffset: 0
              LOG:  database system is ready
              LOG:  transaction ID wrap limit is 2147484148, limited by database "postgres"
              ^CLOG:  received fast shutdown request
              LOG:  shutting down
              LOG:  database system is shut down
              # svcs -vx 
              ...
              svc:/application/management/sunmcdatabase:default (SunMC database service)
               State: maintenance since Wed Nov 25 08:27:42 2009                        
              Reason: Restarting too quickly.                                           
                 See: http://sun.com/msg/SMF-8000-L5                                    
                 See: /var/svc/log/application-management-sunmcdatabase:default.log     
              Impact: This service is not running.                                      
              ...
              # svcs -l svc:/application/management/sunmcdatabase:default
              fmri         svc:/application/management/sunmcdatabase:default
              name         SunMC database service                           
              enabled      true                                             
              state        maintenance                                      
              next_state   none                                             
              state_time   Wed Nov 25 08:27:42 2009                         
              logfile      /var/svc/log/application-management-sunmcdatabase:default.log
              restarter    svc:/system/svc/restarter:default                            
              contract_id                                                               
              dependency   require_all/none svc:/system/filesystem/local (online)       
              dependency   require_all/none svc:/network/initial (online)               
              # svcadm clear svc:/application/management/sunmcdatabase:default
              # svcs -vx
              ...
              svc:/application/management/sunmcdatabase:default (SunMC database service)
               State: maintenance since Wed Nov 25 08:52:19 2009                        
              Reason: Restarting too quickly.                                           
                 See: http://sun.com/msg/SMF-8000-L5                                    
                 See: /var/svc/log/application-management-sunmcdatabase:default.log     
              Impact: This service is not running.                                     
              ...
              I guess I found the problem. The start/stop method for the service is an empty file.
              # tail /var/svc/log/application-management-sunmcdatabase:default.log
              [ Nov 25 08:52:19 Method "start" exited with status 0 ]
              [ Nov 25 08:52:19 Stopping because all processes in service exited. ]
              [ Nov 25 08:52:19 Executing stop method ("/lib/svc/method/es-svc.sh stop database") ]
              [ Nov 25 08:52:19 Method "stop" exited with status 0 ]
              [ Nov 25 08:52:19 Executing start method ("/lib/svc/method/es-svc.sh start database") ]
              [ Nov 25 08:52:19 Method "start" exited with status 0 ]
              [ Nov 25 08:52:19 Stopping because all processes in service exited. ]
              [ Nov 25 08:52:19 Executing stop method ("/lib/svc/method/es-svc.sh stop database") ]
              [ Nov 25 08:52:19 Method "stop" exited with status 0 ]
              [ Nov 25 08:52:19 Restarting too quickly, changing state to maintenance ]
              # ls -la /lib/svc/method/es-svc.sh
              -rwxr-xr-x   1 root     other          0 Nov 17 10:19 /lib/svc/method/es-svc.sh
              Cheers,
              Andreas

              Edited by: Bank_Of_New_Zealand on 25/11/2009 10:35
              • 4. Re: SMC 4.0 setup database failed
                807567
                Aftre uninstalling the software and manually removing the '''/lib/svc/method/es-svc.sh''' file, a new installation was successful.
                • 5. Re: SMC 4.0 setup database failed
                  807567
                  I am getting the same thing:

                  .................
                  Database setup failed : db-start failed

                  Could not finish requested task.


                  Install logfile is : /var/opt/SUNWsymon/install/install.091124201906.28357

                  End of Installation


                  Exiting Sun Management Center 4.0 installation.
                  ================================================================================
                  after installing no matter what I do and have tried 5 times so far......

                  in dmesg I get:

                  Nov 24 19:41:27 svc.startd[7]: [ID 748625 daemon.error] application/management/sunmcdatabase:default failed fatally: transitioned to maintenance (see 'svcs -xv' for details)
                  Nov 24 20:55:58 svc.startd[7]: [ID 652011 daemon.warning] svc:/application/management/sunmcdatabase:default: Method "/lib/svc/method/es-svc.sh start database" failed with exit status 95.
                  Nov 24 20:55:58 svc.startd[7]: [ID 748625 daemon.error] application/management/sunmcdatabase:default failed fatally: transitioned to maintenance (see 'svcs -xv' for details)

                  ================================================================================
                  svc:/application/management/sunmcdatabase:default (SunMC database service)
                  State: maintenance since Tue Nov 24 20:55:58 2009
                  Reason: Start method exited with $SMF_EXIT_ERR_FATAL.
                  See: http://sun.com/msg/SMF-8000-KS
                  See: /var/svc/log/application-management-sunmcdatabase:default.log
                  Impact: This service is not running.
                  ================================================================================

                  Any ideas I am running Sparc 10 - Solaris 10 - 10/09 Release

                  Any help would be appreciated!!!
                  Tom
                  • 6. Re: SMC 4.0 setup database failed
                    807567
                    Heres some more if it helps anyone:


                    exiting........................
                    [ Nov 24 19:13:54 Method "start" exited with status 95 ]
                    [ Nov 24 19:25:25 Leaving maintenance because disable requested. ]
                    [ Nov 24 19:25:25 Disabled. ]
                    [ Nov 24 19:25:32 Enabled. ]
                    [ Nov 24 19:25:32 Executing start method ("/lib/svc/method/es-svc.sh start database") ]

                    ERROR:Sun Management Center has not been setup.
                    Run es-setup to set up Sun Management Center.

                    Exiting..
                    [ Nov 24 19:25:35 Method "start" exited with status 113 ]
                    [ Nov 24 19:25:35 Executing start method ("/lib/svc/method/es-svc.sh start database") ]

                    ERROR:Sun Management Center has not been setup.
                    Run es-setup to set up Sun Management Center.

                    Exiting..
                    [ Nov 24 19:25:39 Method "start" exited with status 113 ]
                    [ Nov 24 19:25:39 Executing start method ("/lib/svc/method/es-svc.sh start database") ]

                    ERROR:Sun Management Center has not been setup.
                    Run es-setup to set up Sun Management Center.

                    Exiting..
                    [ Nov 24 19:25:43 Method "start" exited with status 113 ]
                    [ Nov 24 19:31:11 Leaving maintenance because disable requested. ]
                    [ Nov 24 19:31:11 Disabled. ]
                    [ Nov 24 19:31:12 Enabled. ]
                    [ Nov 24 19:31:12 Executing start method ("/lib/svc/method/es-svc.sh start database") ]
                    [ Nov 24 19:31:22 Method "start" exited with status 0 ]
                    [ Nov 24 19:31:43 Stopping because service disabled. ]
                    [ Nov 24 19:31:43 Executing stop method ("/lib/svc/method/es-svc.sh stop database") ]
                    [ Nov 24 19:31:52 Method "stop" exited with status 0 ]
                    [ Nov 24 19:40:18 Enabled. ]
                    [ Nov 24 19:40:18 Executing start method ("/lib/svc/method/es-svc.sh start database") ]
                    execution of verifyDatabaseUp failed


                    exiting........................
                    [ Nov 24 19:41:27 Method "start" exited with status 95 ]
                    [ Nov 24 20:38:01 Disabled. ]
                    [ Nov 24 20:38:02 Rereading configuration. ]
                    [ Nov 24 20:47:33 Enabled. ]
                    [ Nov 24 20:47:34 Executing start method ("/lib/svc/method/es-svc.sh start database") ]
                    [ Nov 24 20:47:43 Method "start" exited with status 0 ]
                    [ Nov 24 20:48:04 Stopping because service disabled. ]
                    [ Nov 24 20:48:05 Executing stop method ("/lib/svc/method/es-svc.sh stop database") ]
                    [ Nov 24 20:48:13 Method "stop" exited with status 0 ]
                    [ Nov 24 20:54:49 Enabled. ]
                    [ Nov 24 20:54:49 Executing start method ("/lib/svc/method/es-svc.sh start database") ]
                    execution of verifyDatabaseUp failed


                    exiting........................
                    [ Nov 24 20:55:58 Method "start" exited with status 95 ]
                    • 7. Re: SMC 4.0 setup database failed
                      807567
                      I don't claim to understand this BUT I rebooted the machine and then ran
                      /opt/SUNWsymon/sbin/es-setup answered the questions for the SNMP
                      etc. and then it completed sucessfully and I am on to the next phase...

                      If I have anymore issues I will post but definitely this was a dead stop
                      and hopefully too many people won't hit this again!

                      Tom