2.7.8 Upgrade
-
Hello Joel,
I have expanded the 2.7.6 files over the existing files on the linux server. And restarted the service. I have also put the 5 module zip files for ver 2.7.6 into the home folder.After restarting the Mango service, it tries to start 2.7.8:
[root@M-2-M ~]# ma-start: MA started with Process ID: 3547
INFO 2016-03-16 16:04:11,233 (com.serotonin.m2m2.Main.main:82) -** Starting Mango 2.7.8** with Schema Version: 12And I can see the updated modules getting loaded as well.
After the modules get loaded it looks like the same lines get put in.
I take you point that it looks like a Mysql error but I did not specifically set up any MySQL tables. These must tables that Mango use natively and used without error in 2.7.6 or are new tables in ver 2.7.8
bad SQL grammar [CREATE TABLE jsonData (id int not null auto_increment,xid varchar(50) not null, name varchar(255) not null, readPermission varchar(255), editPermission varchar(255), data clob, primary key (id))engine=InnoDB; ]
I don't know what table is 'jsonData'
It also looks like it is terminating something called Mango Lifecycle:INFO 2016-03-16 16:04:14,263 (com.serotonin.m2m2.Lifecycle.terminate:344) - Mango Lifecycle terminating...
INFO 2016-03-16 16:04:14,279 (com.serotonin.m2m2.db.BasePooledProxy.terminateImpl:110) - Stopping databaseNow I cannot get back into my mango to check any settings in any event.
Any advice would be greatly appreciated.
Brian
-
Hi Brian,
I put a new Core version, 2.7.10, out to fix this issue.
-
So do I now need to do a full re-install?
I can't get back to our mango site to do an upgrade the normal way.
Brian
-
Brian,
Please check your env.properties for your database setting. It would appear to me Mango is trying to create a new database on MySQL.
Yeah, you will need to drop the m2m2-core-2.7.10.zip into your Mango/ directory, then relaunch.
-
Should that not be sufficient to resolve it, you can manually set the database back to the 2.7.6 schema and let .10 do the upgrade again, properly.
Step 1) Gain contact with the database...
H2:- Navigate to Mango/bin/h2-web-console.sh
- Edit the script and add -webAllowOthers if you are not browsing from the same machine Mango runs on, and remember the port at the top (8081 by default).
- Launch the script. Navigate to http://[ip]:h2-port/ in your browser
- Fill in the credentials, and /path/to/Mango/databases/mah2 then connect
MySQL:
- command line, mysql --user=[env's db.user] --password=[env's db.password] [databaseName]
Run the commands...
- select * from systemSettings where settingname='databaseSchemaVersion'; is 11, is 12?
if 11,
Please post error from trying to start 2.7.10
if 12, - update systemSettings set settingvalue='11' where settingname='databaseSchemaVersion'; drop table jsonData;
Disconnect from the database, and finally, start up with 2.7.10 in your Mango/ directory.
-
Hello Phil,
My env.properties in in the overrides folder and i have the following lines for the MySQL:#MySQL database settings. Your MySQL instance must already be running and configured before this can be used.
db.type=mysql
db.url=jdbc:mysql://localhost/Mango_M2M
db.username=[valid username]
db.password=[valid password]username and password removed but the ones listed are valid.
Again though the MySQL tables that are in that database are the ones created and used by Mango.
dataPointHierarchy, dataPoints, dataSources, eventHandlers, events, excelReportTemplates, excelReports, globalScripts, graphicalViews, mailingListInactive, mailingListMembers, mailingLists, maintenanceEvents, pointEventDetectors, pointLinks, pointValueAnnotations, pointValues, publishers, reportInstanceData, reportInstanceDataAnnotations, reportInstanceEvents, reportInstancePoints, reportInstanceUserComments, reportInstances, reports, scheduledEvents, selectedWatchList, systemSettings, templates, userComments, userEvents, users, watchListPoints, watchLists.
All of the data points are being kept in the NoSQL database.
#Database settings for conversion. If the db.* settings point to a new database instance, and the convert type setting
#is set, Mango Automation will attempt to convert from the convert.db.* settings to the db.* settings
#Note that database conversions should not be performed in the same step as an upgrade. First upgrade, then convert.
convert.db.type=
convert.db.url=${convert.db.url}
convert.db.username=${convert.db.username}
convert.db.password=${convert.db.password}#Set the base path for where the NoSQL data will be stored
db.nosql.location=${ma.home}/databases/
#Set the folder name of the point value store
db.nosql.pointValueStoreName=mangoTSDBThese are the same settings I have been using for a while now with no problem.
I will try to force my service on to 2.7.10 as you suggest
Brian
-
Ah. I am sure you have it configured rightly. We would phrase that situation as using MySQL and the NoSQL module, since your system's configuration and even events will be in the MySQL database. Simply a misunderstanding.
-
Hello Phil,
Due to our excrutiatingly slow broadband at times... I finally have 2.7.10 put into the mango home folder.I have started your steps to correct this:
Step 1) Gain contact with the database...
H2:Navigate to Mango/bin/h2-web-console.sh
- DONE
Edit the script and add -webAllowOthers if you are not browsing from the same machine Mango runs on, and remember the port at the top (8081 by default). - DONE
Launch the script. Navigate to http://[ip]:h2-port/ in your browser - DONE
Fill in the credentials, and /path/to/Mango/databases/mah2 then connect - ?? the path says it should be "mango/databases/mah2 but there is no mah2 folder or file in my databases folder
What do you want me to do from here?
Thanks
Brian
- DONE
-
Use the MySQL instructions. You are on MySQL
-
oops, yeah sorry, its been a long day.
-
How much longer will you be available today?
-
I will be available for many more hours, and I am happy to work directly with you to fix this. I will send you a message with some contact options.
-
Hopefully we will have this finished soon. Thanks for your help.
-
I have sent you an email, let's conduct the rest there and I'll post anything insightful at the end if there is something to share.