Homepage | Products | OX Knowledge Base | Support | Try Now | Contact | Company
OX Logo
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2012
    Posts
    8

    Default Open-XChange serious installation issues

    hi, I have been running a open-xchange server on a different domain for some years now with no worries so I decide to make a 2nd server

    For this new server I have been working on a open-xchange installation on CentOS 6.5 for some days and I have an issue that is a show stopper:

    Originally I ran (at the start of the install)

    Code:
    /opt/open-xchange/sbin/oxinstaller --no-license \
    --servername=oxserver --configdb-pass=********** \
    --master-pass=********** --ajp-bind-port=localhost –-servermemory 512
    and the prompt replied

    Code:
    Error: Connection refused to host: localhost; nested exception is:
            java.net.ConnectException: Connection refused
    I was in a panic but I changed /etc/hosts to this (where 12.34.56.78 is the external IP)

    Code:
    127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4
    12.34.56.78  thissvr.domain.com thissvr
    ::1        localhost localhost.localdomain localhost6 localhost6.localdomain6
    and then the oxinstaller worked. This confused me but I persevered

    BUT

    when I got right to the end of the install I did

    Code:
    /opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P **********
    It failed utterly: I forget the exact error (read: did not write it down) but I had a hunch so when it refused to register, so I reverted the /etc/hosts back to this (in desperation)

    Code:
    127.0.0.1       localhost localhost.localdomain
    12.34.56.78  thissvr
    ::1             localhost6 ocalhost6.localdomain6
    then it let me pass

    I continued the dovecot the postfix install correctly got the apache working (it shows the right OX website) I also created a test user and made his maildir and changed permissions and updated the alias file etc etc

    however when I got to

    Code:
    /opt/open-xchange/sbin/createuser -c 1 -A oxadmin -P ********** -u test.user \
      -d "Test User" -g Test -s User -p tmppass -e test.user@domain.com \
      --imaplogin tuser --imapserver 127.0.0.1:993 --smtpserver 127.0.0.1
    it bombs

    Code:
    user in context 1 could not be created:
    Error: Connection refused to host: localhost; nested exception is:
            java.net.ConnectException: Connection refused
    it now fails no matter what I do to /etc/hosts

    I think I may have messed up the oxinstaller because I re-ran it a few times (maybe a few times too many) it no longer reports *any* servermemory and it incorrectly (compared to my other server) shows the wrong domains name all the way along and will not accept changes

    EG: oxinstaller --help

    Code:
    --servername            |                                               |
    --imapserver            | thissvr.domain.local                        |
    --smtpserver            | thissvr.domain.local                        |
    --mail-login-src        | login                                         | login mail name
    --mail-server-src       | user                                          | user global
    --transport-server-src  | user                                          | user global
    --configdb-user         | openexchange                                  |
    --configdb-pass         |                                               |
    --configdb-readhost     | localhost                                     |
    --configdb-writehost    | localhost                                     |
    --configdb-dbname       | configdb                                      |
    --servermemory          |                                               |
    --clt-memory            | 50                                            |
    --configdb-readport     | 3306                                          |
    --configdb-writeport    | 3306                                          |
    --tmpdir-path           | /var/spool/open-xchange/uploads               |
    --master-pass           |                                               |
    --master-user           | oxadminmaster                                 |
    --jkroute               | APP1                                          |
    --object-link-hostname  | thissvr.domain.local                        |
    --extras-link           | http://thissvr.domain.local/                |
    --maxSession            | 0                                             |
    --sessionDefLifeTime    | 3600000                                       |
    --disableauth           |                                               |
    --no-license            |                                               |
    --add-license           |                                               |
    --name-of-oxcluster     | thissvr.domain.local                        |
    --network-listener-host | localhost                                     |
    --ajp-bind-port         |                                               |
    Last edited by conanman; 01-15-2014 at 12:07 PM.

  2. #2
    Join Date
    May 2012
    Posts
    8

    Default

    I figured this out and it's very hard to deduce the cause, but I did.

    The Error
    Code:
    user in context 1 could not be created:
    Error: Connection refused to host: localhost; nested exception is:
            java.net.ConnectException: Connection refused
    Happened because mysql didn't have the relevant permissions. It was nothing to do with Java. The error is java simply repeating the mysql error (but in the second person, so it confuses)- so the QuickFix solution is to update the mysql permissions (log into mysql command line manually using root) like this

    Code:
    MYSQL> GRANT ALL PRIVILEGES ON configdb.* TO openexchange@localhost IDENTIFIED BY '**********' WITH GRANT OPTION;
    But that is not all, the permissions were mis-aligned because
    Code:
    /opt/open-xchange/sbin/registerdatabase
    was run while /etc/hosts and /etc/hostname were incorrect (READ: not set yet). This was why it worked when I badly wrecked /etc/hosts - it ran because it had permissions pertaining to those nonsense default settings . The simple fact is that registerdatabase READS the information from these two sources (/etc/hosts and /etc/hostname - via "hostname -f") then RELIES on their feedback declarations for the hard settings used whole permissions thing to work. i.e. if you don't make damn sure /etc/hosts and /etc/hostname are right BEFORE you start the whole ox installation you're doomed: simply because the ORIGIN machine name is hard-set wrong

    remedy? a) config of /etc/hosts and /etc/hostname should be explicit in the pre-requisites and maybe even good examples in the ox installer guides and b) in the mean time here is an excellent explanation of how to set /etc/hostname and /etc/hosts for your flavour of Linux and do this BEFORE you start any ox installation
    Last edited by conanman; 01-16-2014 at 12:26 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •