question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when updating from v2.3.1 to v2.4.0

See original GitHub issue

I had a previously working version of Thingsboard v2.3.1.

Today I decided to update my instance to v2.4.0. I followed the instructions, updated the package, I checked that the configuration file is correct, but the update script fails.

I am using Centos 7, with Postgres DB.

Here is the error output:

 ===================================================
 :: ThingsBoard ::       (v2.4.0)
 ===================================================

Starting ThingsBoard Upgrade from version 2.3.1 ...
Upgrading ThingsBoard from version 2.3.1 to 2.4.0 ...
Updating schema ...
Unexpected error during ThingsBoard installation!
org.postgresql.util.PSQLException: ERROR: syntax error at or near "NOT"
  Position: 631
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2458)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2158)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:291)
	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:305)
	at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:291)
	at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:269)
	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:265)
	at org.thingsboard.server.service.install.SqlDatabaseUpgradeService.loadSql(SqlDatabaseUpgradeService.java:186)
	at org.thingsboard.server.service.install.SqlDatabaseUpgradeService.upgradeDatabase(SqlDatabaseUpgradeService.java:172)
	at org.thingsboard.server.install.ThingsboardInstallService.performInstall(ThingsboardInstallService.java:117)
	at org.thingsboard.server.ThingsboardInstallApplication.main(ThingsboardInstallApplication.java:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
	at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:593)
Unexpected error during ThingsBoard installation!
ThingsBoard upgrade failed!

Any ideas on how to fix that?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fjpanagcommented, Sep 16, 2019

I just updated Postgres to version 9.6, as per Thingsboard installation documentation, and the update succeeded.

Everything seems fine now. Thank you.

0reactions
Backdraft007commented, Sep 16, 2019

I don’t know. I’m using Debian and there is 11.5 installed.

I think, you can modify /usr/share/thingsboard/data/upgrade/2.4.0/schema_update.sql and remove the “IF NOT EXISTS” and rerun the upgrade-script.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows Installer 3.1 v2 (3.1.4000.2435) is available
Issue that is addressed in Windows Installer 3.1 (v2)​​ Windows Installer no longer fails silently when the installer tries to update a file...
Read more >
Solution Release Notes - Amazon AWS
Updated AWS Config managed policy name to use the new managed policy name that removes the “S3:GetObject†permission. v2.4.0(2020-05-01). Added. Enable ...
Read more >
Yamaha Expansion Manager V2.8.1 for Windows 11 / 10 / 8.1
Uninstall old version of Yamaha Expansion Manager prior to V2.4.0 before ... Fixed a problem in which the Super Articulation Voice could not...
Read more >
Unity Hub Release Notes - Unity
3.1.2. Apr. 25, 2022. Bug Fixes & Improvements. This patch corrects an issue ... Additionally, some users reported that the Hub crashed while...
Read more >
geoip2/geoip2 v2.3.1 requires maxmind/web-service-common ...
json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found