我是 Open Xchange 的新手,并尝试按照以下步骤在干净的 Debian 10.7 VM 上安装它官方安装说明。
我在同一台服务器上安装了 MariaDB,为 root 用户设置了密码(root_db_pass
#example),创建了新的数据库(open_xchange
)和用户(open_xchange_user
),并设置密码(ox_db_pass
#example)。
按照安装说明中的所有步骤操作,一切正常,直到我需要在 Open-Xchange configdb 数据库 ( /opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P admin_master_password
) 上注册本地服务器,然后我收到错误
root@axx-oxch-srv01:~# /opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P admin_master_password
server could not be registered:
Server response:
Look-up failed. Service "OXUtil_V2" is not available.
at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:227)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(RegistryImpl_Skel.java:133)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:469)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:301)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:303)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:279)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:380)
at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:123)
at java.rmi.Naming.lookup(Naming.java:101)
at com.openexchange.admin.console.util.server.RegisterServer.<init>(RegisterServer.java:77)
at com.openexchange.admin.console.util.server.RegisterServer.main(RegisterServer.java:91)
我在 Google 上搜索了这个问题,但几乎没有找到任何相关信息。我检查了密码 3 次,以确保我没有输入错误!我该如何解决这个问题?
我可能需要一些额外的信息来帮助我
使用initconfigdb
命令
/opt/open-xchange/sbin/initconfigdb --configdb-dbname open_xchange --configdb-user open_xchange_user --configdb-pass ox_db_pass --mysql-root-passwd root_db_pass
使用oxinstaller
命令
/opt/open-xchange/sbin/oxinstaller --no-license --servername=oxserver --configdb-pass=ox_db_pass --master-pass=admin_master_password --network-listener-host=localhost --servermemory 1024
如果需要更多数据,请告诉我,我会更新我的问题...
更新 1
我刚刚发现,记录的内容与我在控制台中收到的消息不同。service open-xchange restart
执行后需要输入以下日志条目/opt/open-xchange/sbin/oxinstaller --no-license --servername=oxserver
日志:
2021-01-07T01:56:55,546-0600 INFO [pool-8-thread-1] com.openexchange.startup.impl.osgi.DBMigrationMonitorTracker$1.run(DBMigrationMonitorTracker$1.java:132)
Open-Xchange Server v7.10.4-Rev14 initialized. The server should be up and running...
2021-01-07T01:57:01,425-0600 INFO [OXTimer-0000006] com.openexchange.push.impl.balancing.reschedulerpolicy.PermanentListenerRescheduler.cancelTimerTask(PermanentListenerRescheduler.java:207)
Canceled timer task for rescheduling checks
2021-01-07T01:57:01,439-0600 WARN [OXTimer-0000006] com.openexchange.database.internal.ReplicationMonitor.checkActualAndFallback(ReplicationMonitor.java:181)
DBP-0001 Categories=SERVICE_DOWN Message='Cannot get connection to config DB.' exceptionID=808265395-5
com.openexchange.exception.OXException: DBP-0001 Categories=SERVICE_DOWN Message='Cannot get connection to config DB.' exceptionID=808265395-5
at com.openexchange.database.DBPoolingExceptionCodes.create(DBPoolingExceptionCodes.java:260)
at com.openexchange.database.internal.ReplicationMonitor.createException(ReplicationMonitor.java:245)
at com.openexchange.database.internal.ReplicationMonitor.checkActualAndFallback(ReplicationMonitor.java:174)
at com.openexchange.database.internal.ReplicationMonitor.checkActualAndFallback(ReplicationMonitor.java:157)
at com.openexchange.database.internal.ConfigDatabaseServiceImpl.get(ConfigDatabaseServiceImpl.java:138)
at com.openexchange.database.internal.ConfigDatabaseServiceImpl.get(ConfigDatabaseServiceImpl.java:133)
at com.openexchange.database.internal.ConfigDatabaseServiceImpl.getReadOnly(ConfigDatabaseServiceImpl.java:173)
at com.openexchange.database.internal.DatabaseServiceImpl.getReadOnly(DatabaseServiceImpl.java:152)
at com.openexchange.push.impl.PushDbUtils.getContextsWithPushRegistrations(PushDbUtils.java:296)
at com.openexchange.push.impl.PushDbUtils.getPushRegistrations(PushDbUtils.java:256)
at com.openexchange.push.impl.PushManagerRegistry.getUsersWithPermanentListeners(PushManagerRegistry.java:834)
at com.openexchange.push.impl.balancing.reschedulerpolicy.PermanentListenerRescheduler.reschedule(PermanentListenerRescheduler.java:364)
at com.openexchange.push.impl.balancing.reschedulerpolicy.PermanentListenerRescheduler.doReschedule(PermanentListenerRescheduler.java:341)
at com.openexchange.push.impl.balancing.reschedulerpolicy.PermanentListenerRescheduler.checkReschedule(PermanentListenerRescheduler.java:327)
at com.openexchange.push.impl.balancing.reschedulerpolicy.PermanentListenerRescheduler$1.run(PermanentListenerRescheduler.java:284)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at com.openexchange.threadpool.internal.CustomThreadPoolExecutor$ScheduledFutureTask.runPeriodic(CustomThreadPoolExecutor.java:1016)
at com.openexchange.threadpool.internal.CustomThreadPoolExecutor$ScheduledFutureTask.run(CustomThreadPoolExecutor.java:1041)
at com.openexchange.threadpool.internal.CustomThreadPoolExecutor$Worker.runTask(CustomThreadPoolExecutor.java:834)
at com.openexchange.threadpool.internal.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:861)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.openexchange.pooling.PoolingException: Cannot create pooled object.
at com.openexchange.pooling.ReentrantLockPool.get(ReentrantLockPool.java:320)
at com.openexchange.database.internal.AbstractMetricAwarePool.get(AbstractMetricAwarePool.java:149)
at com.openexchange.database.internal.AbstractMetricAwarePool.get(AbstractMetricAwarePool.java:72)
at com.openexchange.database.internal.TimeoutFetchAndSchema.get(TimeoutFetchAndSchema.java:93)
at com.openexchange.database.internal.ReplicationMonitor.checkActualAndFallback(ReplicationMonitor.java:167)
... 19 common frames omitted
===>>> Caused by: java.sql.SQLException: Access denied for user 'openexchange'@'localhost' (using password: YES) <<<===
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
...
...
注意这一行:Caused by: java.sql.SQLException: Access denied for user 'openexchange'@'localhost' (using password: YES)
。这很有趣,因为openexchange@localhost
这不是我在命令期间提供的用户initconfigdb
,并且也与我在 MariaDB 中创建的数据库用户不对应。
我尝试使用与我创建的用户相同的密码创建此类用户并再次执行所有操作,但不幸的是这会导致相同的错误。我不知道 Open Xchange 从哪里获得这个用户...???
答案1
我发现错误中使用了默认用户名,如更新 1 中所述。这是因为命令--configdb-username=open_xchange_user
中缺少参数oxinstaller
。
这也让我想到可能--configdb-database=open_xchange
也是需要的。
我还将参数添加--configdb-writehost=localhost
到 oxinstaller 命令中,因为如果您只使用 1 个数据库服务器而不是集群,这似乎也是必需的。(见https://oxpedia.org/wiki/index.php?title=OXLoadBalancingClustering_Database#Configure_OX_to_use_with_a_standalone_database)
所以我更新的oxinstaller
命令如下所示:
/opt/open-xchange/sbin/oxinstaller --no-license --servername=oxserver --configdb-server=open_xchange --configdb-user=open_xchange_user --configdb-pass=ox_db_pass --configdb-writehost=localhost --master-pass=admin_master_password --network-listener-host=localhost --servermemory 1024
此后一切正常。