Open-Xchange

如何解決 Open Xchange /opt/open-xchange/sbin/registerserver 命令給出查找失敗。服務“OXUtil_V2”不可用。錯誤

  • January 7, 2021

我是 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

我剛剛發現還記錄了與我在控制台中收到的消息不同的內容。i 之後會彈出下面的日誌條目,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 中所述。這是因為命令--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

在此之後一切正常。

引用自:https://serverfault.com/questions/1048817