Projects tigase _server server-core Issues #993
[MySQL] Sometimes setting version via property doesn't work (without error) (#993)
Closed
felix liang opened 6 years ago

Hi Tigase team

We are Sytac Limted and we are testing tigase to put this to production in very future. We are using "java -jar tigase-issue #7.1.5-b4512.jar" to install tigase 7.1.5 . And following the guide step by step. No error occurs during the installation.
While i run "./scripts/tigase.sh start etc/tigase.conf " From logs/tigase-console.log

=====================tigase-console.log=========================
Please upgrade database schema now.
Current scheme version is: null, expected: 7.1
Check the schema upgrade guide at the address:
Administration Guide > Tigase Server Schema v7.1 Updates (available locally in docs directory and online http://docs.tigase.org)
----
If you have upgraded your schema and you are still
experiencing this problem please contact support at
e-mail address: support@tigase.org
=====================tigase-console.log=========================

I searched the forum and found the following bug very similar to my case.

https://tigase.tech/issues/6753

This bug provide a workaround for this kind of issue ,execute following command should be work. mysql_upgrade -u root -p --force

After i execute the upper command . It still gives following error.

Here is the init.properties i am using now:

=========================init.properties==============================
--comp-class-1 = tigase.muc.MUCComponent
--virt-hosts = tig-cet.testpurpose.com
--auth-db-uri = jdbc:mysql://127.0.0.1/tigasecetdb?user=tigasecet&password=Syntac%40019
--user-db-uri = jdbc:mysql://127.0.0.1/tigasecetdb?user=tigasecet&password=Syntac%40019
--user-db = mysql
--admins = admin@tig-cet.testpurpose.com
--comp-name-6 = message-archive
--comp-name-5 = http
--comp-name-4 = stun
--auth-db = tigase-auth
--comp-name-3 = proxy
config-type = --gen-config-def
--comp-name-2 = pubsub
--comp-name-1 = muc
--cluster-mode = false
--sm-plugins = +message-archive-xep-0136,+jabber:iq:auth,+urn:ietf:params:xml:ns:xmpp-sasl,+urn:ietf:params:xml:ns:xmpp-bind,+urn:ietf:params:xml:ns:xmpp-session,+jabber:iq:register,+jabber:iq:roster,+presence,+jabber:iq:privacy,+jabber:iq:version,+http://jabber.org/protocol/stats,+starttls,+msgoffline,+vcard-temp,+http://jabber.org/protocol/commands,+jabber:iq:private,+urn:xmpp:ping,+basic-filter,+domain-filter,+pep,+zlib
--comp-class-6 = tigase.archive.MessageArchiveComponent
--debug = server,xmpp.impl,db
--comp-class-5 = tigase.http.HttpMessageReceiver
--comp-class-4 = tigase.stun.StunComponent
--comp-class-3 = tigase.socks5.Socks5ProxyComponent
--comp-class-2 = tigase.pubsub.PubSubComponent
======================init.properties=============================

Here is the tigase.conf

=======================tigase.conf============================
#osgiEnabled=(true|false)
#osgiEnabled=false
OSGI=false
ENC="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8"
DRV="-Djdbc.drivers=com.mysql.jdbc.Driver"
#DRV="-Djdbc.drivers=com.mysql.jdbc.Driver:org.postgresql.Driver:org.apache.derby.jdbc.EmbeddedDriver"
#GC="-XX:+UseBiasedLocking -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewRatio=2 -XX:+CMSIncrementalMode -XX:ParallelCMSThreads=2 -XX:-ReduceInitialCardMarks -XX:CMSInitiatingOccupancyFraction=70  -XX:+UseCMSInitiatingOccupancyOnly"
#EX="-XX:+OptimizeStringConcat -XX:+DoEscapeAnalysis -XX:+UseNUMA"

#GC_DEBUG=" -XX:+PrintTenuringDistribution -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -Xloggc:logs/jvm.log -verbose:gc "

#JMX_REMOTE_IP="-Djava.rmi.server.hostname=0.0.0.0"

#DNS_RESOLVER=" -Dresolver-class=tigase.util.DNSResolverDefault "
#INTERNAL_IP=" -Dtigase-primary-address=hostname.local "
#EXTERNAL_IP=" -Dtigase-secondary-address=hostname "

JAVA_HOME="/usr/jdk"
CLASSPATH=""
#PRODUCTION_HEAP_SETTINGS=" -Xms5G -Xmx5G " # heap memory settings must be adjusted on per deployment-base!
JAVA_OPTIONS="${GC} ${GC_DEBUG} ${EX} ${ENC} ${DRV} ${JMX_REMOTE_IP} -server ${PRODUCTION_HEAP_SETTINGS} ${DNS_RESOLVER} ${INTERNAL_IP} ${EXTERNAL_IP}  -XX:MaxDirectMemorySize=128m "
TIGASE_OPTIONS=" --property-file etc/init.properties "
========================tigase.conf===================================

Very appreciate if you provide support for this case.

Felix Leung Business Development Manager felix@syntac.com.hk (00)852-6852-0855 (00)86-1381-140-3523

15255_SynTac-Logo2B-B-small.jpg tigase.log.0 tigase-console.log

wojciech.kapcia@tigase.net commented 6 years ago

Hi, which MySQL version do you use?

Could you try to execute following queries in your database:

select TigGetDBProperty('schema-version');

select * from tig_pairs, tig_users where (user_id = 'db-properties') AND (tig_pairs.uid = tig_users.uid);
wojciech.kapcia@tigase.net commented 6 years ago

I reproduced the issue locally - I'm continuing investigation.

wojciech.kapcia@tigase.net commented 6 years ago

DBSchemaLoader was setting character encoding in example configuration string but not in the actual jdbc urls.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
8554
Version
tigase-server-7.1.6
Spent time
21h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#993
Please wait...
Page is in error, reload to recover