Project

General

Profile

Pubsub3 not compatible with PostgreSQL

Daniel Zhang
Added almost 4 years ago

I've install the Tigase Server 7.0.1 (all new install) and everything is ok with out when loading the Pubsub3 compoent

here is the message:

ERROR! Terminating the server process.

PubSub Component is not compatible with

database schema which exists in

jdbc:postgresql://localhost/jujuchat?user=tigase&password=tigaseatpostgresql

This component uses newer schema. To continue

use of currently deployed schema, please use

older version of PubSub Component.

To convert database to new schema please see:

https://projects.tigase.org/projects/tigase-pubsub/wiki/PubSub_database_schema_conversion

but when I follow the https://projects.tigase.org/projects/tigase-pubsub/wiki/PubSub_database_schema_conversion here is the message:

danniez@local$ psql -h localhost -q -U [tigase_db_user] -d [tigase_database_name] -f database/postgresql-pubsub-schema-3.0.0.sql

Password for user [tigase_db_user]:

psql:database/postgresql-pubsub-schema-3.0.0.sql:12: ERROR: relation "tig_pubsub_service_jids" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:16: ERROR: must be owner of relation tig_pubsub_service_jids

psql:database/postgresql-pubsub-schema-3.0.0.sql:26: ERROR: relation "tig_pubsub_jids" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:30: ERROR: must be owner of relation tig_pubsub_jids

psql:database/postgresql-pubsub-schema-3.0.0.sql:48: ERROR: relation "tig_pubsub_nodes" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:52: ERROR: must be owner of relation tig_pubsub_nodes

psql:database/postgresql-pubsub-schema-3.0.0.sql:56: ERROR: must be owner of relation tig_pubsub_nodes

psql:database/postgresql-pubsub-schema-3.0.0.sql:60: ERROR: must be owner of relation tig_pubsub_nodes

psql:database/postgresql-pubsub-schema-3.0.0.sql:64: ERROR: must be owner of relation tig_pubsub_nodes

psql:database/postgresql-pubsub-schema-3.0.0.sql:75: ERROR: relation "tig_pubsub_affiliations" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:79: ERROR: must be owner of relation tig_pubsub_affiliations

psql:database/postgresql-pubsub-schema-3.0.0.sql:83: ERROR: must be owner of relation tig_pubsub_affiliations

psql:database/postgresql-pubsub-schema-3.0.0.sql:95: ERROR: relation "tig_pubsub_subscriptions" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:99: ERROR: must be owner of relation tig_pubsub_subscriptions

psql:database/postgresql-pubsub-schema-3.0.0.sql:103: ERROR: must be owner of relation tig_pubsub_jids

psql:database/postgresql-pubsub-schema-3.0.0.sql:117: ERROR: relation "tig_pubsub_items" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:121: ERROR: must be owner of relation tig_pubsub_items

psql:database/postgresql-pubsub-schema-3.0.0.sql:125: ERROR: must be owner of relation tig_pubsub_items

psql:database/postgresql-pubsub-schema-3.0.0.sql:144: ERROR: must be owner of function tigpubsubensureservicejid

psql:database/postgresql-pubsub-schema-3.0.0.sql:160: ERROR: must be owner of function tigpubsubensurejid

psql:database/postgresql-pubsub-schema-3.0.0.sql:183: ERROR: must be owner of function tigpubsubcreatenode

psql:database/postgresql-pubsub-schema-3.0.0.sql:196: ERROR: must be owner of function tigpubsubremovenode

psql:database/postgresql-pubsub-schema-3.0.0.sql:207: ERROR: must be owner of function tigpubsubgetitem

psql:database/postgresql-pubsub-schema-3.0.0.sql:228: ERROR: must be owner of function tigpubsubwriteitem

psql:database/postgresql-pubsub-schema-3.0.0.sql:234: ERROR: must be owner of function tigpubsubdeleteitem

psql:database/postgresql-pubsub-schema-3.0.0.sql:242: ERROR: must be owner of function tigpubsubgetnodeid

psql:database/postgresql-pubsub-schema-3.0.0.sql:248: ERROR: must be owner of function tigpubsubgetnodeitemsids

psql:database/postgresql-pubsub-schema-3.0.0.sql:254: ERROR: must be owner of function tigpubsubgetnodeitemsidssince

psql:database/postgresql-pubsub-schema-3.0.0.sql:262: ERROR: must be owner of function tigpubsubgetallnodes

psql:database/postgresql-pubsub-schema-3.0.0.sql:270: ERROR: must be owner of function tigpubsubgetrootnodes

psql:database/postgresql-pubsub-schema-3.0.0.sql:279: ERROR: must be owner of function tigpubsubgetchildnodes

psql:database/postgresql-pubsub-schema-3.0.0.sql:300: ERROR: must be owner of function tigpubsubdeleteallnodes

psql:database/postgresql-pubsub-schema-3.0.0.sql:306: ERROR: must be owner of function tigpubsubsetnodeconfiguration

psql:database/postgresql-pubsub-schema-3.0.0.sql:338: ERROR: must be owner of function tigpubsubsetnodeaffiliation

psql:database/postgresql-pubsub-schema-3.0.0.sql:350: ERROR: must be owner of function tigpubsubgetnodeconfiguration

psql:database/postgresql-pubsub-schema-3.0.0.sql:358: ERROR: must be owner of function tigpubsubgetnodeaffiliations

psql:database/postgresql-pubsub-schema-3.0.0.sql:367: ERROR: must be owner of function tigpubsubgetnodesubscriptions

psql:database/postgresql-pubsub-schema-3.0.0.sql:390: ERROR: must be owner of function tigpubsubsetnodesubscription

psql:database/postgresql-pubsub-schema-3.0.0.sql:398: ERROR: must be owner of function tigpubsubdeletenodesubscription

psql:database/postgresql-pubsub-schema-3.0.0.sql:409: ERROR: must be owner of function tigpubsubgetuseraffiliations

psql:database/postgresql-pubsub-schema-3.0.0.sql:420: ERROR: must be owner of function tigpubsubgetusersubscriptions

psql:database/postgresql-pubsub-schema-3.0.0.sql:427: ERROR: must be owner of function tigpubsubgetnodeitemsmeta

psql:database/postgresql-pubsub-schema-3.0.0.sql:433: ERROR: must be owner of function tigpubsubfixnode

psql:database/postgresql-pubsub-schema-3.0.0.sql:439: ERROR: must be owner of function tigpubsubfixitem

and I use the super user here is the message:

psql:database/postgresql-pubsub-schema-3.0.0.sql:12: ERROR: relation "tig_pubsub_service_jids" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:16: ERROR: relation "tig_pubsub_service_jids_service_jid" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:26: ERROR: relation "tig_pubsub_jids" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:30: ERROR: relation "tig_pubsub_jids_jid" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:48: ERROR: relation "tig_pubsub_nodes" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:52: ERROR: relation "tig_pubsub_nodes_service_id" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:56: ERROR: relation "tig_pubsub_nodes_name" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:60: ERROR: relation "tig_pubsub_nodes_service_id_name" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:64: ERROR: relation "tig_pubsub_nodes_collection_id" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:75: ERROR: relation "tig_pubsub_affiliations" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:79: ERROR: relation "tig_pubsub_affiliations_node_id" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:83: ERROR: relation "tig_pubsub_affiliations_jid_id" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:95: ERROR: relation "tig_pubsub_subscriptions" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:99: ERROR: relation "tig_pubsub_subscriptions_node_id" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:103: ERROR: relation "tig_pubsub_subscriptions_jid_id" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:117: ERROR: relation "tig_pubsub_items" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:121: ERROR: relation "tig_pubsub_items_node_id" already exists

psql:database/postgresql-pubsub-schema-3.0.0.sql:125: ERROR: relation "tig_pubsub_items_id" already exists

and after I restart the Tigase, the problem still here.

so I switched to Pubsub2

after I start the server, there some error message shows when loading the Pubsub component:

Loading component: proxy :: componentInfo{Title=Tigase Socks5 Component, Version=1.1.0-b49/1ad95be9, Class=tigase.socks5.Socks5ProxyComponent}

2015-04-13 16:22:46.850 [main] BasicComponent.loadScripts() WARNING: Can't load the admin script file: scripts/admin/PublishItem.groovy

javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

Script30.groovy: 43: unable to resolve class tigase.pubsub.modules.PublishItemModule.ItemPublishedHandler

@ line 43, column 1.

import tigase.pubsub.modules.PublishItemModule.ItemPublishedHandler

^

Script30.groovy: 151: unable to resolve class ItemPublishedHandler.ItemPublishedEvent

@ line 151, column 5.

            new ItemPublishedHandler.ItemPublishedEvent(packet.getStanzaTo().getBareJID(), node, itemsToSend));

   ^

2 errors

at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.compile(GroovyScriptEngineImpl.java:182)

at tigase.server.script.Script.init(Script.java:121)

at tigase.server.script.AddScriptCommand.addAdminScript(AddScriptCommand.java:83)

at tigase.server.BasicComponent.loadScripts(BasicComponent.java:1101)

at tigase.server.BasicComponent.setProperties(BasicComponent.java:838)

at tigase.server.AbstractMessageReceiver.setProperties(AbstractMessageReceiver.java:984)

at tigase.component2.AbstractComponent.setProperties(AbstractComponent.java:277)

at tigase.pubsub.PubSubComponent.setProperties(PubSubComponent.java:633)

at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)

at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)

at tigase.conf.Configurator.componentAdded(Configurator.java:50)

at tigase.conf.Configurator.componentAdded(Configurator.java:33)

at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)

at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)

at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)

at tigase.server.MessageRouter.setProperties(MessageRouter.java:704)

at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)

at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)

at tigase.conf.Configurator.componentAdded(Configurator.java:50)

at tigase.conf.Configurator.componentAdded(Configurator.java:33)

at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)

at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)

I really have no idea, anybody can help me? thanks


Replies (6)

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

Daniel Zhang wrote:

I've install the Tigase Server 7.0.1 (all new install) and everything is ok with out when loading the Pubsub3 compoent

but when I follow the https://projects.tigase.org/projects/tigase-pubsub/wiki/PubSub_database_schema_conversion here is the message:

danniez@local$ psql -h localhost -q -U [tigase_db_user] -d [tigase_database_name] -f database/postgresql-pubsub-schema-3.0.0.sql

and after I restart the Tigase, the problem still here.

You should first run the @-pubsub-schema-3.0.0-pre-upgrade.sql@.

so I switched to Pubsub2

after I start the server, there some error message shows when loading the Pubsub component:

Loading component: proxy :: componentInfo{Title=Tigase Socks5 Component, Version=1.1.0-b49/1ad95be9, Class=tigase.socks5.Socks5ProxyComponent}

2015-04-13 16:22:46.850 [main] BasicComponent.loadScripts() WARNING: Can't load the admin script file: scripts/admin/PublishItem.groovy

javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

Script30.groovy: 43: unable to resolve class tigase.pubsub.modules.PublishItemModule.ItemPublishedHandler

I really have no idea, anybody can help me? thanks

Those exceptions are only related to the ad-hoc scripts which are only compatible with newer PubSub3. They won't be loaded for PubSub2 but the component itself will work just fine.

(1)

Added by Daniel Zhang almost 4 years ago

thanks for reply,

but there's no a .sql file named postgresql-pubsub-schema-3.0.0-pre-upgrade.sql :(

(1)

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

Ah, sorry - I've missed bit that you're using Postgresql. Previously there wasn't specific schema for PostgreSQL hence missing '-pre-upgrade' script.

You should run the upgrade script without providing the -in-repo-class parameter and it will use the old, default repository implementation to retrieve data and migrate it to new version.

(1)

Added by Aejaz Muslim over 3 years ago

I did a clean install of 7.0.1 server with ui installer with no problems. At

startup it complained about older pubsub schema aborting the server.

I tried to upgrade following the instructions in wiki without providing -in-repo-class

There was no change any change in behavior i.e. server shuts down complaining about old schema

existing in the database as before.

If I try to use the older pubsub jar, I get a bunch of NullPointerExceptions & groovy problems in

the logs(attached).

Please suggest if it is still safe to continue with the older jar.

(1)

Added by Aejaz Muslim over 3 years ago

Please let me know if MySQL is better to try with

version 7.0.1.

(1)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

MySQL is well more tested and we are using it by default. I've re-opened issue #1700 which relates to the schema problems in new PubSub3.

    (1-6/6)