TokuMX 1.4 to 1.5 data migration - tokumx

I have copied over all TokuMX 1.4 data files to a fresh installed TokuMX 1.5 server, but launching the server fails with:
Fri Aug 1 09:51:04.633 [initandlisten] TokuMX starting : pid=42210 port=27017 dbpath=/data/db 64-bit host=beagle.massive-insights.com
Fri Aug 1 09:51:04.633 [initandlisten] TokuMX mongod server v1.5.0-mongodb-2.4.10, using TokuKV rev 479eed747982601fa52e4c4e4b9b4be18f58d3c1
Fri Aug 1 09:51:04.633 [initandlisten] git version: 3c686d0b09d6dfb9fd54da440247d3075fcfd0ac
Fri Aug 1 09:51:04.633 [initandlisten] build info: Linux a5f9a8a9a9af 3.11.0-20-generic #35-Ubuntu SMP Fri May 2 21:32:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux BOOST_LIB_VERSION=1_49
Fri Aug 1 09:51:04.633 [initandlisten] options: { config: "/etc/mongodb.conf", dbpath: "/data/db", logFlushPeriod: 300, logappend: "true", logpath: "/var/log/mongodb/mongodb.log", maxConns: 20000 }
Fri Aug 1 09:51:04.634 [initandlisten] [tokumx] startup
Cannot upgrade TokuDB version 25 database. Previous improper shutdown detected.
Fri Aug 1 09:51:04.661 [initandlisten] Assertion: 16767:Unhandled ydb error: -100011
0xb3b123 0x80c91b 0x8061f0 0x8069df 0x8071fc 0x749e7a 0x74a558 0x735caa 0x7f5a97b5ceed 0x746e79
/usr/local/bin/mongod(_ZN5mongo15printStackTraceERSo+0x23) [0xb3b123]
/usr/local/bin/mongod(_ZN5mongo7storage21MsgAssertionExceptionC2EiRKSs+0x9b) [0x80c91b]
/usr/local/bin/mongod(_ZN5mongo7storage16handle_ydb_errorEi+0x390) [0x8061f0]
/usr/local/bin/mongod(_ZN5mongo7storage22handle_ydb_error_fatalEi+0xf) [0x8069df]
/usr/local/bin/mongod(_ZN5mongo7storage7startupEPNS_16TxnCompleteHooksEPNS0_14UpdateCallbackE+0x5bc) [0x8071fc]
/usr/local/bin/mongod(_ZN5mongo14_initAndListenEi+0x34a) [0x749e7a]
/usr/local/bin/mongod(_ZN5mongo13initAndListenEi+0x18) [0x74a558]
/usr/local/bin/mongod(main+0x29a) [0x735caa]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f5a97b5ceed]
/usr/local/bin/mongod() [0x746e79]
Fri Aug 1 09:51:04.670 [initandlisten] fatal error 16767: Unhandled ydb error: -100011
Fri Aug 1 09:51:04.670 [initandlisten] 16767 Unhandled ydb error: -100011
Fri Aug 1 09:51:04.670 [initandlisten] Fatal Assertion 16767
0xb3b123 0x9e654c 0x806bc6 0x8071fc 0x749e7a 0x74a558 0x735caa 0x7f5a97b5ceed 0x746e79
/usr/local/bin/mongod(_ZN5mongo15printStackTraceERSo+0x23) [0xb3b123]
/usr/local/bin/mongod(_ZN5mongo13fassertFailedEi+0x4c) [0x9e654c]
/usr/local/bin/mongod(_ZN5mongo7storage22handle_ydb_error_fatalEi+0x1f6) [0x806bc6]
/usr/local/bin/mongod(_ZN5mongo7storage7startupEPNS_16TxnCompleteHooksEPNS0_14UpdateCallbackE+0x5bc) [0x8071fc]
/usr/local/bin/mongod(_ZN5mongo14_initAndListenEi+0x34a) [0x749e7a]
/usr/local/bin/mongod(_ZN5mongo13initAndListenEi+0x18) [0x74a558]
/usr/local/bin/mongod(main+0x29a) [0x735caa]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f5a97b5ceed]
/usr/local/bin/mongod() [0x746e79]
Fri Aug 1 09:51:04.677 [initandlisten]
How can I go about the migration path 1.4 to 1.5, and how to deal with that error above?

As the log file states, "Cannot upgrade TokuDB version 25 database. Previous improper shutdown detected."
TokuMX does not support upgrades (meaning the file format has changed) unless the files you are using from the prior version came from a cleanly shutdown TokuMX.
You need to cleanly shutdown your 1.4 server, then copy or re-use the data files with 1.5.

Related

Gluon Mobile not compiling on WSL2 Ubuntu 20.04

Ive been trying to create an apk file for my gluon project. On windows and for windows, the prroject runs perfectly but when in Ubuntu, the commands mvn -Pandroid gluonfx:runagent will run the project but the project wont compile and build.
the error I get keep getting is:
[Wed Jan 04 15:32:35 IST 2023][INFO] We will now compile your code for aarch64-linux-android. This may take some time.[Wed Jan 04 15:33:01 IST 2023][INFO] Additional information: Objectfile should be called com.gluonapplication.mobiletrial1.o but we didn't find that under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm[Wed Jan 04 15:33:01 IST 2023][SEVERE] Compiling failed.Check the log files under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/logAnd please check https://docs.gluonhq.com/ for more information.[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 45.283 s[INFO] Finished at: 2023-01-04T15:33:01+05:30[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.15:compile (default-cli) on project mobiletrial1: Compiling failed -> [Help 1]
The log file
[Wed Jan 04 16:48:54 IST 2023][FINE] PB Command for compile: /mnt/c/Java/linux/graalvm-svm-java17-linux-gluon-22.1.0.1-Final/bin/native-image -Djdk.internal.lambda.eagerlyInitialize=false --no-server -H:+SharedLibrary -H:+AddAllCharsets -H:+ReportExceptionStackTraces -H:-DeadlockWatchdogExitOnTimeout -H:DeadlockWatchdogInterval=0 -H:+RemoveSaturatedTypeFlows -H:+ExitAfterRelocatableImageWrite --features=org.graalvm.home.HomeFinderFeature -H:TempDirectory=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/tmp -H:EnableURLProtocols=http,https --initialize-at-build-time=com.gluonhq.charm.glisten.visual.MaterialDesignIcon -H:ReflectionConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/reflectionconfig-aarch64-android.json -H:JNIConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/jniconfig-aarch64-android.json -H:ResourceConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/resourceconfig-aarch64-android.json -H:-SpawnIsolates -Dsvm.targetArch=aarch64 -H:+ForceNoROSectionRelocations --libc=bionic -H:+UseCAPCache -H:CAPCacheDir=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/capcache -H:CompilerBackend=lir -H:IncludeResourceBundles=com/sun/javafx/scene/control/skin/resources/controls,com/sun/javafx/scene/control/skin/resources/controls-nt,com.sun.javafx.tk.quantum.QuantumMessagesBundle -Dsvm.platform=org.graalvm.nativeimage.Platform$LINUX_AARCH64 -cp /home/vatsal/.m2/repository/com/gluonhq/substrate/0.0.55/substrate-0.0.55.jar:/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/tmp/classpathJar.jar com.gluonapplication.MobileTrial1
[Wed Jan 04 16:48:54 IST 2023][FINE] Start process compile...
[Wed Jan 04 16:48:54 IST 2023][FINE] Result for compile: 0
[Wed Jan 04 16:48:54 IST 2023][FINE] Logging process [compile] to file: /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/log/process-compile-1672831134641.log
[Wed Jan 04 16:48:54 IST 2023][INFO] Additional information: Objectfile should be called com.gluonapplication.mobiletrial1.o but we didn't find that under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm
[Wed Jan 04 16:48:54 IST 2023][SEVERE] Compiling failed.
Check the log files under /mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/aarch64-android/gvm/log
And please check https://docs.gluonhq.com/ for more information.
gluonfx log file
Process
=======
compile
Command Line
============
/mnt/c/Java/linux/graalvm-svm-java17-linux-gluon-22.1.0.1-Final/bin/native-image -Djdk.internal.lambda.eagerlyInitialize=false --no-server -H:+SharedLibrary -H:+AddAllCharsets -H:+ReportExceptionStackTraces -H:-DeadlockWatchdogExitOnTimeout -H:DeadlockWatchdogInterval=0 -H:+RemoveSaturatedTypeFlows -H:+ExitAfterRelocatableImageWrite --features=org.graalvm.home.HomeFinderFeature --features=com.gluonhq.substrate.feature.GluonFeature -H:TempDirectory=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/tmp -H:EnableURLProtocols=http,https -H:ReflectionConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/reflectionconfig-x86_64-linux.json -H:JNIConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/jniconfig-x86_64-linux.json -H:ResourceConfigurationFiles=/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/resourceconfig-x86_64-linux.json -H:IncludeResourceBundles=com/sun/javafx/scene/control/skin/resources/controls,com/sun/javafx/scene/control/skin/resources/controls-nt,com.sun.javafx.tk.quantum.QuantumMessagesBundle -Dsvm.platform=org.graalvm.nativeimage.Platform$LINUX_AMD64 -cp /home/vatsal/.m2/repository/com/gluonhq/substrate/0.0.55/substrate-0.0.55.jar:/mnt/g/Intellij_Projects/MobileTrial1/target/gluonfx/x86_64-linux/gvm/tmp/classpathJar.jar com.gluonapplication.MobileTrial1
Output
======
Result
======
result: 0
I have tried uninstalling and reinstalling ubuntu and wsl and I have tried the same process on Linux and have got the same error.

Docker install on armv7

I am having trouble with my docker installation.
I rent a arm storage server for my setup.
The kernel is
4.5.2-armada375 #1 SMP Tue Oct 25 11:52:56 CEST 2016 armv7l
But when i try to insall docker-ce and the other packages ive got the following error:
Jul 09 20:54:50 storage-fr systemd[1]: Failed to start Docker Application Container Engine.
Jul 09 20:54:50 storage-fr systemd[1]: docker.service: Unit entered failed state.
Jul 09 20:54:50 storage-fr systemd[1]: docker.service: Failed with result 'exit-code'.
dpkg: error processing package docker-ce (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up liberror-perl (0.17024-1) ...
Setting up rename (0.20-4) ...
update-alternatives: using /usr/bin/file-rename to provide /usr/bin/rename (rename) in auto mode
Setting up aufs-dkms (4.9+20161219-1) ...
Loading new aufs-4.9+20161219 DKMS files...
It is likely that 4.5.2-armada375 belongs to a chroot's host
I think the kernel is not compatible.
IS it possible to install docker on it?
I tried this guide https://docs.docker.com/install/linux/docker-ce/debian/
But it doesnt work.
Any idea ?

NodeMCU traceback on reboot

I have an embedded application running NodeMCU that is not connected to a console as the UART has been repurposed to obtain serial data from an attached device.
During testing the application ran for about 15 hours then rebooted 5 times in a row before "settling" and continuing to run correctly.
Is it possible to log to a file a traceback of what caused the reboots? I am assuming some kind of PANIC error caused the reboot. I don't think it is a memory issue as the application reports the heap size (via http to a local server) every 30 seconds. Here is a log extract:
Wed May 18 00:46:37 2016 -> '{"s":"1782","i":"1afe34d26348", "d":"heap=12408
Wed May 18 00:47:08 2016 -> '{"s":"1783","i":"1afe34d26348", "d":"heap=12408
Wed May 18 00:47:39 2016 -> '{"s":"1784","i":"1afe34d26348", "d":"heap=12408
Wed May 18 00:48:19 2016 -> '{"s":"1785","i":"1afe34d26348", "d":"heap=11432
Wed May 18 00:50:06 2016 -> '{"s":"0","i":"1afe34d26348", "d":"heap=14560
Wed May 18 00:51:25 2016 -> '{"s":"0","i":"1afe34d26348", "d":"heap=14584
Wed May 18 00:52:45 2016 -> '{"s":"0","i":"1afe34d26348", "d":"heap=14560
Wed May 18 00:54:04 2016 -> '{"s":"0","i":"1afe34d26348", "d":"heap=14584
Wed May 18 00:55:24 2016 -> '{"s":"0","i":"1afe34d26348", "d":"heap=14608
Wed May 18 00:55:55 2016 -> '{"s":"1","i":"1afe34d26348", "d":"heap=12608
Wed May 18 00:56:26 2016 -> '{"s":"2","i":"1afe34d26348", "d":"heap=12600
Wed May 18 00:56:56 2016 -> '{"s":"3","i":"1afe34d26348", "d":"heap=12624
Wed May 18 00:57:27 2016 -> '{"s":"4","i":"1afe34d26348", "d":"heap=12600
I the above log "s" is a sequential counter that is reset to 0 when the device reboots, and "d" is the heap size (you can ignore the "i" entry, it is just the MAC address of the device that is sending the data).
xpcall won't work in the case of a PANIC device reset.
I tried logging node.bootreason() to a file on reboot, but it doesn't contain a traceback to where the error occurred.
Is there some method for troubleshooting nodemcu applications that aren't connected to a console?

ConnectionFailure using mongo in rails 3.1

I have an app setup with Rails 3.1, Mongo 1.4.0, Mongoid 2.2.4.
What I am experiencing is this:
Mongo::ConnectionFailure: Failed to connect to a master node at localhost:27017
I've had this problem before, but it went away on a computer restart... this time it does not.
I don't understand, I didn't do anything. I just put my computer in sleep mode, went home and woke it up, then there it was.
Here is the output of sudo mongod
Fri Nov 25 21:47:14 [initandlisten] MongoDB starting : pid=1963 port=27017 dbpath=/data/db/ 64-bit host=xxx.local
Fri Nov 25 21:47:14 [initandlisten] db version v2.0.0, pdfile version 4.5
Fri Nov 25 21:47:14 [initandlisten] git version: 695c67dff0ffc361b8568a13366f027caa406222
Fri Nov 25 21:47:14 [initandlisten] build info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
Fri Nov 25 21:47:14 [initandlisten] options: {}
Fri Nov 25 21:47:14 [initandlisten] journal dir=/data/db/journal
Fri Nov 25 21:47:14 [initandlisten] recover : no journal files present, no recovery needed
Fri Nov 25 21:47:15 [websvr] admin web console waiting for connections on port 28017
Fri Nov 25 21:47:15 [initandlisten] waiting for connections on port 27017
And I am able to connect with mongoin terminal.
After 2 hours of Googling I hope the competence of SOs community are able to figure this out.
Please, if you need more information about my app-setup just ask.
Thanks!
What you see is that the connection times out... that happens either after a long period of inactivity, or if you put your computer to sleep.
You can change / increase the timeout value, but this way you can't get rid of the connection timing out eventually.
Some MongoDB drivers allow to set :timeout => false , but Mongoid seems to still have problems with that
(see last 3 links in the list)
Hope this helps.
See also:
Mongodb server goes down, how to prevent Rails app from timing out?
MongoDB: What is connection pooling and timeout?
https://github.com/mongodb/mongo-ruby-driver
How can I query mongodb using mongoid/rails without timing out?
http://groups.google.com/group/mongoid/browse_thread/thread/b5c94e7047b42f8a
https://github.com/mongoid/mongoid/issues/455
Try to change localhost to 127.0.0.1!

Connection error using Rails 3.0 and Mongo 1.4.0

I created a library that would record events to MongoDB from my Rails application. I'm using version 1.4.0 of the mongo gem and Rails 3.0 w/Ruby 1.8.7. The relevant code is:
def new_event(collection, event)
#conn = Mongo::Connection.new("localhost", 27017, :pool_size => 5, :pool_timeout => 5)
#conn.db("event").collection(collection).insert(event)
#conn.close
end
This has worked fine for recording new events as they happen on the site. However, I also need to backfill the db with old events. So I'm doing running a script that basically does this:
SomeModel.find_each do |model|
Tracker.new.new_event("model_event", { ... info from model ... })
end
I'm trying to backfill something on the order of 50k events. As the script runs, I see this:
Tue Sep 27 23:45:20 [initandlisten] waiting for connections on port 27017
Tue Sep 27 23:46:20 [clientcursormon] mem (MB) res:12 virt:78 mapped:0
Tue Sep 27 23:48:49 [initandlisten] connection accepted from 127.0.0.1:51006 #1
Tue Sep 27 23:49:03 [conn1] remove event.application 103ms
Tue Sep 27 23:49:12 [conn1] remove event.listing 127ms
Tue Sep 27 23:49:20 [clientcursormon] mem (MB) res:37 virt:207 mapped:128
Tue Sep 27 23:51:44 [initandlisten] connection accepted from 127.0.0.1:48103 #2
Tue Sep 27 23:51:44 [conn2] end connection 127.0.0.1:48103
Tue Sep 27 23:51:44 [initandlisten] connection accepted from 127.0.0.1:48104 #3
Tue Sep 27 23:51:44 [conn3] end connection 127.0.0.1:48104
Tue Sep 27 23:51:44 [initandlisten] connection accepted from 127.0.0.1:48105 #4
Tue Sep 27 23:51:44 [conn4] end connection 127.0.0.1:48105
Tue Sep 27 23:51:44 [initandlisten] connection accepted from 127.0.0.1:48106 #5
Tue Sep 27 23:51:44 [conn5] end connection 127.0.0.1:48106
The ports (127.0.0.1:XXXXX) and (what I assume are) the Connection Pool #s keep incrementing, until eventually I get this exception from the ruby script:
Failed to connect to a master node at localhost:27017
/var/bundler/turtle/ruby/1.8/gems/mongo-1.4.0/lib/../lib/mongo/connection.rb:526:in `connect'
/var/bundler/turtle/ruby/1.8/gems/mongo-1.4.0/lib/../lib/mongo/connection.rb:688:in `setup'
/var/bundler/turtle/ruby/1.8/gems/mongo-1.4.0/lib/../lib/mongo/connection.rb:104:in `initialize'
Just found the solution. I needed to make the connection object a class variable so it was shared across all instances of the Tracker class.
##conn = Mongo::Connection.new("localhost", 27017, :pool_size => 5, :pool_timeout => 5)
def self.new_event(collection, event)
##conn.db("event").collection(collection).insert(event)
end

Resources