NoSQL requires license?
-
@evranch contact radix, they will be able to arrange a licence for you to purchase.
Alternatively, if you're not on an ES or gt model, you could try leveraging a sql server instead... But note it's more performant than H2 but still less than nosql..Fox
-
Hello,
Yes, the NoSQL license (General license not the Enterprise license) would be required to eliminate the restarts. In the ma.log file, when Mango starts, it mentions that it is running NoSQL in free mode and that it will restart in 8 hours. The documentation to convert an H2 database to MySQL is found here: Database Conversions. If you need further assistance, please let us know. Thanks!
Joe Miraglia
Service Application Engineer
Radix IoT -
Thanks, I saw this in the log but it would be nice if it was better documented that it would switch to this mode before I had migrated my database. It's not apparent if I can now migrate back from NoSQL to MySQL.
Licensing appears to have changed quite a bit under Radix with licensing and pricing completely obscured, even for hardware, personally I liked the old model where you knew what you were buying.
So I'll give MySQL a shot first for this application. For MySQL just set db.type=mysql in mango.properties and fill in the credentials?
I was interested in trying out Mango under Docker anyways, so I will try to spin up a test container using MySQL before I trash my instance by accident.
Do you happen to have a docker-compose.yml file ready for deployment with the appropriate bind mounts identified? All I could find was
docker pull ghcr.io/radixiot/mango:latest
-
@evranch The nosql module has always been a paid add on, all the way back to version 3, when it was infinite automation. If you were buying mangoES units, you would not have noticed because they came with an enterprise license.
You can always do database migrations to move point data which mango does via the database migration option in the dashboard.
I don't use docker compose and use actual hardware plus one virtual cloud instance.
I believe there may have been someone on the forum who got help with it, I am not 100% certain though.
Good luck with your tinkeringFox
-
@MattFox Makes sense. This instance I run at home has been migrated since v3 and never had the NoSQL module installed until recently, when I realized "Hey, this thing is still running on H2"
In any case Mango was incredibly easy to set up in Docker, and I have it working with PostgreSQL in another container. I pulled all the data off the slow PC onto my workstation, exported my configuration and my historical data into a massive CSV, and reimported it into another container. Tested it and then dropped it back onto the box. Docker is great at this sort of job and will make migrating instances between hardware effortless.
Here is a docker-compose.yml for reference if anyone wants to set up a containerized system quickly using SQL. mangoNoSqlDatabase is mounted to an empty directory, as that's the simplest way to remove a module from a Docker image.
version: "3" services: mango: image: ghcr.io/radixiot/mango:latest container_name: mango environment: - TZ=America/Regina volumes: - ./mango-data:/opt/mango-data - ./empty:/opt/mango/web/modules/mangoNoSqlDatabase ports: - 8080:8080 - 8443:8443 restart: unless-stopped depends_on: - postgres postgres: image: postgres user: 1000:1001 environment: POSTGRES_USER: mango POSTGRES_PASSWORD: password volumes: - ./pg-data:/var/lib/postgresql/data restart: unless-stopped
then just connect to the database container with
db.type=postgres db.url=jdbc:postgresql://postgres/mango db.username=mango db.password=password
in your mango.properties
Performance seems similar enough to NoSQL, at least for this ~100 point system. The Postgres container is barely consuming any resources, I'm surprised that H2 was so hungry for memory.
-
@evranch thanks for sharing your config. I am certain many others will find it useful
Fox
-
Hi @evranch,
I too am trying to migrate to docker but I can't export and then import my old data into the docker instance.
Could you explain the procedure to me please?
Thank you.
-
@Faucon-Ngando he's using a docker-compose file to run both a postgres sql container and mango container inside a single network.
The volume property maps the directories inside the docker images to real directories on the host system.For exporting you'll need to do a sql backup and a complete nosql backup (if applicable)
These outputs should appear inside you /opt/mango-data/backups directory.
If you're not using an external sql you should still be able to run using the same configs in that docker-compose file, minus the postgres related entry as all of your data and backups should exist in the mango-data directory...Fox
-
@MattFox Thank you for your reply. I have installed a mariadb container that connects to mango.
How can I now convert my H2 data to SQL. I have added this codedb.type=mysql
db.url=jdbc:mysql://192.168.1.17/mango
db.username=mango
db.password=passwordconvert.db.type=h2
convert.db.url=jdbc:h2:/opt/mango-data/databases/mah2
#convert.db.username=${db.username}
#convert.db.password=${db.password}in mango.properties but it is not working.
-
@Faucon-Ngando what version of mango?
Fox
-
@MattFox I have Mango V5.2 with enterprise license.
-
@Faucon-Ngando sounds like a bug, raise it with radix. Your property settings are correct.
Assuming you can log in to your MySQL db locally via the mango credentialsFox