Announcement

Collapse
No announcement yet.

create defaut context problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • create defaut context problem

    hello

    i have this problem with debian5 lenny installation , i can't create defaut context

    #/opt/open-xchange/sbin/createcontext -A oxadminmaster -P 1234 -c 1 -u oxadmin -d "Context Admin" -g Admin -s User -p 1234 -L defaultcontext -e oxadmin@example.com -q 1024 --access-combination-name=all

    context 1 could not be created:
    Server response:
    com.mysql.jdbc.exceptions.MySQLNonTransientConnect ionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.


    connection to the database is ok:

    messagerie:/usr/local/share# mysql -h localhost -u openexchange -p configdb
    Enter password:
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 57
    Server version: 5.0.51a-24+lenny1 (Debian)

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    mysql>
    mysql> show tables
    -> ;
    +------------------------+
    | Tables_in_configdb |
    +------------------------+
    | configdb_sequence |
    | context |
    | context_server2db_pool |
    | db_cluster |
    | db_pool |
    | filestore |
    | login2context |
    | reason_text |
    | server |
    +------------------------+
    9 rows in set (0.00 sec)

    mysql> select * from context;
    Empty set (0.00 sec)

    --------------------------
    thanks for your help
    Last edited by Guest; 06-24-2009, 03:48 PM.

  • #2
    Hi,

    please check the database configurations at /opt/open-xchange/groupware/configdb.properties and /opt/open-xchange/groupware/configdb.properties. Also check the output of /opt/open-xchange/sbin/listdatabases

    Greetings

    Comment


    • #3
      thanks for your help

      vim /opt/open-xchange/etc/groupware/configdb.properties
      --------------------------------
      useSeparateWrite=false
      readDriverClass=com.mysql.jdbc.Driver
      readUrl=jdbc:mysql://localhost:3306/configdb
      readProperty.1=user=openexchange
      readProperty.2=password=1234
      readProperty.3=useUnicode=true
      readProperty.4=characterEncoding=UTF-8
      readProperty.5=autoReconnect=true
      readProperty.6=useServerPrepStmts=false
      readProperty.7=useTimezone=true
      readProperty.8=serverTimezone=UTC
      readProperty.9=connectTimeout=15000
      readProperty.10=socketTimeout=15000
      writeDriverClass=com.mysql.jdbc.Driver
      writeUrl=jdbc:mysql://localhost:3306/configdb
      writeProperty.1=user=openexchange
      writeProperty.2=password=sam125
      writeProperty.3=useUnicode=true
      writeProperty.4=characterEncoding=UTF-8
      writeProperty.5=autoReconnect=true
      writeProperty.6=useServerPrepStmts=false
      writeProperty.7=useTimezone=true
      writeProperty.8=serverTimezone=UTC
      writeProperty.9=connectTimeout=15000
      writeProperty.10=socketTimeout=15000
      .......
      ------------------------------------------------------
      the user name and password correct
      Last edited by Guest; 06-24-2009, 03:43 PM.

      Comment


      • #4
        The problem is quite likely not a wrongly set up configdb, but a wrongly registered database (using the registerdatabase command).

        createcontext reads the access parameters for the context database(es) from within the configdb registered databases.

        Check whether you specified the correct paramaters within registerdatabase (run listdatabase --csv)

        Comment


        • #5
          plz can you give the commend to do this ?

          Comment


          • #6
            E.g.:

            Code:
            $ /opt/open-xchange/sbin/listdatabase -A oxadminmaster -P secret --csv
            id,display_name,url,master,masterid,clusterweight,maxUnits,currentunits,poolHardLimit,poolMax,poolInitial,login,password,driver,read_id,scheme
            "5","choeger","jdbc:mysql://localhost/?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useUnicode=true&useServerPrepStmts=false&useTimezone=true&serverTimezone=UTC&connectTimeout=15000&socketTimeout=15000","true","0","100","5000","3","0","100","2","openexchange","secret","com.mysql.jdbc.Driver",,

            Comment


            • #7
              this a resulta of
              #/opt/open-xchange/sbin/listdatabase -A oxadminmaster -P secret --csv
              my reel user=openexchange
              my reel passe=1234

              id,display_name,url,master,masterid,clusterweight, maxUnits,currentunits,poolHard Limit,poolMax,poolInitial,login,password,driver,re ad_id,scheme
              "4","oxdatabase","jdbc:mysql://localhost/?useUnicode=true&characterEncoding=UTF-8
              &autoReconnect=true&useUnicode=true&useServerPrepS tmts=false&useTimezone=true&s erverTimezone=UTC&connectTimeout=15000&socketTimeo ut=15000","true","0","100","10
              00","0","0","100","2","openexchange","db_password" ,"com.mysql.jdbc.Driver",,

              Comment


              • #8
                Originally posted by anisdz View Post
                this a resulta of
                #/opt/open-xchange/sbin/listdatabase -A oxadminmaster -P secret --csv
                my reel user=openexchange
                my reel passe=1234

                id,display_name,url,master,masterid,clusterweight, maxUnits,currentunits,poolHard Limit,poolMax,poolInitial,login,password,driver,re ad_id,scheme
                "4","oxdatabase","jdbc:mysql://localhost/?useUnicode=true&characterEncoding=UTF-8
                &autoReconnect=true&useUnicode=true&useServerPrepS tmts=false&useTimezone=true&s erverTimezone=UTC&connectTimeout=15000&socketTimeo ut=15000","true","0","100","10
                00","0","0","100","2","openexchange","db_password" ,"com.mysql.jdbc.Driver",,
                You did specify "db_password" as password when you registered the database.
                Solution:

                use /opt/open-xchange/sbin/changedatabase to fix that.

                Comment


                • #9
                  thank you for your help it work

                  Comment


                  • #10
                    additional information

                    Thank you for this answer the most valuable for me on the subject: the problem is in the patrameters of the registerdatabase command. It helped me solve the same problem but due to another cause: mysql port number.

                    I run a "mysql_multi" server with multiple instances on multiple port.

                    In my config I do need to specify an ip and a port to access the target mysql database.
                    BUT , neither changedatabase nor registerdatabase propose the option --port
                    (whereas oxinstaller or initconfigdb command does !?).
                    listdatabase is confusing because it gets the port number from "*.properties" file.

                    The solution is to use registerdatabase or changedatabase with option -H myip:myport
                    eg: registerdatabase -A oxadminmaster -P somepass -n oxdatabase -H 172.21.33.6:3307

                    my createcontext command now works like a charm.

                    cheers

                    Yannick
                    Last edited by Guest; 11-21-2009, 02:25 AM.

                    Comment

                    Working...
                    X