Projects tigase _server server-core Issues #1353
SchemaManager should operate in non-cluster mode to avoid issues with licence-checking (#1353)
Wojciech Kapcia (Tigase) opened 3 years ago

It may happen that if the upgrade takes a long time, and in that case licence-checker may try to initialise itself causing the shutdown:

"[2023-04-18 13:47:18:234] [INFO    ] [                  main ] DBSchemaLoader.loadSchemaFile()  : Loading schema from file(s): mysql-issue #8.0.0.sql, URI: jdbc:mysql://tigase:3306/tigasedb_prod?user=user&password=password"
"Apr 18, 2023 1:51:10 PM tigase.licence.InstallationIdRetriever <init>"
WARNING: There was a problem adding user licence-library to the repository! Please make sure your database is configured correctly
"Apr 18, 2023 1:51:10 PM tigase.licence.InstallationIdRetriever c"
WARNING: There was a problem accessing repository to retrieve ID
"Apr 18, 2023 1:51:10 PM tigase.licence.InstallationIdRetriever c"
WARNING: There was a problem accessing repository to retrieve ID
java.lang.NullPointerException
at tigase.server.XMPPServer.getComponent(XMPPServer.java:90)
at tigase.licence.InstallationIdRetriever.c(SourceFile:258)
at tigase.licence.InstallationIdRetriever.b(SourceFile:171)
at tigase.licence.LicenceCheckDailyTask$1.run(SourceFile:105)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
  • Wojciech Kapcia (Tigase) batch edited 2 years ago
    Name Previous Value Current Value
    Iterations
    empty
    tigase-server-8.4.0
  • Wojciech Kapcia (Tigase) batch edited 2 years ago
    Name Previous Value Current Value
    Iterations
    tigase-server-8.4.0
    tigase-server-8.5.0
    Version
    tigase-server-8.4.0
    tigase-server-8.5.0
  • Wojciech Kapcia (Tigase) batch edited 7 months ago
    Name Previous Value Current Value
    Version
    tigase-server-8.5.0
    8.5.0
  • Andrzej Wójcik (Tigase) commented 2 days ago
  • Wojciech Kapcia (Tigase) commented 2 days ago

    The "NPE in LicenceCheck" issue should be fixed but I do wonder if we should still address this one explicitly, i.e. when running SchemaManager, after loading the config, explicitly disable clustering to avoid any issues. Even if the whole cluster is updating the "only single node runs the update" is handle via the database-level locking to prevent concurrent run…

  • Wojciech Kapcia (Tigase) changed state to 'In Progress' 2 days ago
    Previous Value Current Value
    Open
    In Progress
  • Andrzej Wójcik (Tigase) commented 2 days ago

    This could be done, but it would be more complex. The current issue that we experienced was caused by instantiation of the instance of a class that started LicenceChecker. This is now solved, so schema upgrade should just work out of the box now correctly.

    running SchemaManager, after loading the config, explicitly disable clustering to avoid any issues

    Running SchemaManager doesn't start clustering, it needed to find bean configuration (needed repository implementations) and to achieve that it created bean instances, but no actual clustering would be started. As now we moved that to initialization step, licence will not be checked as SchemaManager will not initialize bean nor it will start clustering.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
8.5.0
Iterations
Issue Votes (0)
Watchers (3)
Reference
tigase/_server/server-core#1353
Please wait...
Page is in error, reload to recover