Announcement

Collapse
No announcement yet.

Remote access to mysql db

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

  • Remote access to mysql db

    Hi all,

    we have an ox Hyperion installation built in April 2008 which runs fine.
    All configuration is stored in a local mysql database. We now would like to have remote access to the db, which involves assigning the actual ip address to "bind-address" in the mysql configuration. This, however, breaks the entire ox setup. We have changed the database host in /etc/postfix (e.g. ox_aliases.cf), which makes imap access through external clients working again. However, we could not manage to access the ox web frontend again. Login always failed at about 10% with one of the two messages listed below.

    There are several references to "localhost" / "127.0.0.1" also in /opt/open-xchange/etc/*, e.g. in groupware/configdb.properties

    readDriverClass=com.mysql.jdbc.Driver
    readUrl=jdbc:mysql://localhost/configdb
    writeDriverClass=com.mysql.jdbc.Driver
    writeUrl=jdbc:mysql://localhost/configdb

    which we also changed, yet without success.
    Another reference is in the database itself, "configdb/db_pool", which we also changed, again with no success.

    Since the second error message below mentions "database 4", which is the actual number of the "open-xchange-db" in the list of all databases, we believe that basic access to mysql is working at some point (maybe to the "configdb"). However, we still could not log into the web frontend.

    So the question is: what files besides /opt/open-xchanges/etc/* and /etc/postfix/* need to be changed when the database host changes?
    Also, a better understanding of the login procedure into the web frontend would also help for sure.

    Any help is greatly appreciated!

    Best regards
    Andy

    ************************************************** *******

    Aug 13, 2009 8:23:01 PM com.openexchange.tools.webdav.OXServlet doAuth
    SEVERE: CTX-0005 Category=5 Message=Cannot get connection to database. exceptionID=-1580582750-39
    CTX-0005 Category=5 Message=Cannot get connection to database. exceptionID=-1580582750-39
    at com.openexchange.groupware.contexts.RdbLoginInfo.h andleLoginInfo(RdbLoginInfo.java:97)
    at com.openexchange.sessiond.SessionHandler.addSessio n(SessionHandler.java:167)
    at com.openexchange.sessiond.SessiondConnector.addSes sion(SessiondConnector.java:137)
    at com.openexchange.tools.webdav.OXServlet.addSession (OXServlet.java:321)
    at com.openexchange.tools.webdav.OXServlet.doAuth(OXS ervlet.java:173)
    at com.openexchange.webdav.PermissionServlet.service( PermissionServlet.java:68)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    at com.openexchange.tools.ajp13.AJPv13Request.respons e(AJPv13Request.java:92)
    at com.openexchange.tools.ajp13.AJPv13RequestHandler. createResponse(AJPv13RequestHandler.java:363)
    at com.openexchange.tools.ajp13.AJPv13Connection.crea teResponse(AJPv13Connection.java:168)
    at com.openexchange.tools.ajp13.AJPv13Listener.run(AJ Pv13Listener.java:245)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: CTX-0005 Category=5 Message=Cannot get connection to database. exceptionID=-1580582750-38
    at com.openexchange.groupware.contexts.RdbContextStor age.getMailadmin(RdbContextStorage.java:155)
    at com.openexchange.groupware.contexts.RdbContextStor age.loadContext(RdbContextStorage.java:251)
    at com.openexchange.groupware.contexts.CachingContext Storage.loadContext(CachingContextStorage.java:165 )
    at com.openexchange.groupware.contexts.ContextStorage .getContext(ContextStorage.java:109)
    at com.openexchange.groupware.contexts.RdbLoginInfo.h andleLoginInfo(RdbLoginInfo.java:82)
    ... 11 more
    Caused by: DBP-0002 Category=8 Message=Resolving database for context 1 and server -1 not possible! exceptionID=-1580582750-37
    at com.openexchange.database.AssignmentStorage.loadAs signment(AssignmentStorage.java:167)
    at com.openexchange.database.AssignmentStorage.getAss ignment(AssignmentStorage.java:132)
    at com.openexchange.database.Database.get(Database.ja va:144)
    at com.openexchange.database.Database.get(Database.ja va:131)
    at com.openexchange.server.DBPool.pickup(DBPool.java: 71)
    at com.openexchange.groupware.contexts.RdbContextStor age.getMailadmin(RdbContextStorage.java:153)
    ... 15 more

    ************************************************** *******

    Aug 13, 2009 8:26:22 PM com.openexchange.tools.Logging log
    SEVERE: SVL-0001 Category=8 Message=com.openexchange.admin.rmi.exceptions.Pool Exception: DBP-0003 Category=5 Message=Cannot get connection to database 4. exceptionID=-1525748914-2 exceptionID=-1580582750-41
    SVL-0001 Category=8 Message=com.openexchange.admin.rmi.exceptions.Pool Exception: DBP-0003 Category=5 Message=Cannot get connection to database 4. exceptionID=-1525748914-2 exceptionID=-1580582750-41
    at com.openexchange.admin.ajax.actions.LoginAction.ac tion(LoginAction.java:111)
    at com.openexchange.admin.ajax.Login.doPost(Login.jav a:152)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    at com.openexchange.tools.ajp13.AJPv13Request.respons e(AJPv13Request.java:92)
    at com.openexchange.tools.ajp13.AJPv13RequestHandler. createResponse(AJPv13RequestHandler.java:363)
    at com.openexchange.tools.ajp13.AJPv13Connection.crea teResponse(AJPv13Connection.java:168)
    at com.openexchange.tools.ajp13.AJPv13Listener.run(AJ Pv13Listener.java:245)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: com.openexchange.admin.rmi.exceptions.StorageExcep tion: com.openexchange.admin.rmi.exceptions.PoolExceptio n: DBP-0003 Category=5 Message=Cannot get connection to database 4. exceptionID=-1525748914-2
    at com.openexchange.admin.storage.mysqlStorage.OXAuth MySQLStorage.authenticateUser(OXAuthMySQLStorage.j ava:254)
    at com.openexchange.admin.rmi.impl.BasicAuthenticator .doUserAuthentication(BasicAuthenticator.java:171)
    at com.openexchange.admin.rmi.impl.OXLogin.login2User (OXLogin.java:107)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:294)
    at sun.rmi.transport.Transport$1.run(Transport.java:1 53)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport. java:149)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:466)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:707)
    at java.lang.Thread.run(Thread.java:595)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceiv edFromServer(StreamRemoteCall.java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Str eamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:1 26)
    at java.rmi.server.RemoteObjectInvocationHandler.invo keRemoteMethod(RemoteObjectInvocationHandler.java: 179)
    at java.rmi.server.RemoteObjectInvocationHandler.invo ke(RemoteObjectInvocationHandler.java:132)
    at $Proxy7.login2User(Unknown Source)
    at com.openexchange.admin.ajax.actions.LoginAction.ac tion(LoginAction.java:92)
    ... 8 more
    Caused by: com.openexchange.admin.rmi.exceptions.PoolExceptio n: DBP-0003 Category=5 Message=Cannot get connection to database 4. exceptionID=-1525748914-2
    at com.openexchange.admin.storage.sqlStorage.OXAdminP oolDBPool.getREADConnectionForContext(OXAdminPoolD BPool.java:94)
    at com.openexchange.admin.tools.AdminCache.getREADCon nectionForContext(AdminCache.java:166)
    at com.openexchange.admin.storage.mysqlStorage.OXAuth MySQLStorage.authenticateUser(OXAuthMySQLStorage.j ava:223)
    at com.openexchange.admin.rmi.impl.BasicAuthenticator .doUserAuthentication(BasicAuthenticator.java:171)
    at com.openexchange.admin.rmi.impl.OXLogin.login2User (OXLogin.java:107)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:294)
    at sun.rmi.transport.Transport$1.run(Transport.java:1 53)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport. java:149)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:466)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport.java:707)
    ... 1 more

  • #2
    Hi,

    you may need to change the database host with "changedatabase" AND configure the host of the database at the configdb.properties files. Databases like open-xchange-db are resolved through configdb, "changedatabase" changes the database information stored at configdb.

    Greetings

    Comment


    • #3
      Thanks for your prompt reply, Martin!

      Unfortunately, changedatabase did not solve the problem. It isn't available for the old release we have installed, only for newer ones. We also have a recent ox 6 installation for testing and tried changedatabase there, which lead to the same results as described in the original post: user authentification fails at the login screen with an error.

      What we then tried was to run the oxinstaller script with the desired ip address instead of localhost as database host. This solved the problem for the test installation, users can now log into the web frontend also when mysql is bound to an address other than localhost.

      Nevertheless, two questions remain:

      1) Why does it work with oxinstaller but not with changedatabase or when manually changing all relevant entries. Obviously because we did not change all relevant entries However, A diff on /opt/open-xchange/etc showed only changes for the database read and write urls, as expected, a new password hash (new salt?) and changes in the osgi subdir. Also, the mysql database is left unchanged. So what were we missing, where does the change occur?

      2) Will oxinstaller do the trick also for our running system, which is pre ox6, built in April 2008, without causing harm to the existing user data? This is yet to be tested, but of course, we'd appreciate a prognosis or a warning

      Thanks again!

      Comment

      Working...
      X