"State Database error: Expected pruning mode: constrained" when running sync for RMRK - substrate

RMRK Syncing doc advises to start kusama node with
chmod +x polkadot && mv polkadot kusama
./kusama --pruning archive --db rocksdb
When i run this in Linux, it says "State Database error: Expected pruning mode: constrained". The same occurs when i run rust-compiled directly on Mac. any ideas about this errror message and how to get past it?

I was trying to run kusama from a snapshot. And got same error.
For me solution was to add this:
--unsafe-pruning --pruning=1000

This happens when you started your chain without archive pruning in the past, so dbs don't match. Purge chain and try again.
./kusama purge-chain

Related

Docker - Unsupported redo log format. The redo log was created with MariaDB x.x.x

While trying to spin up a server using docker-compose I have an issue when I try to downgrade or upgrade the mysql image. As I am just trying to identify the right mysql/maraidb version I'm not concerned about the data at the moment.
I've been getting the following error
"Unsupported redo log format. The redo log was created with MariaDB 10.6.5."
I am unable to delete the logs ib_logfile0 ib_logfile1. How do I successfully upgrade/downgrade mysql when it is giving such an error?
When the upgraded/downgraded version of the mysql/mariadb is spun up, you can't delete the ib_logfile0 ib_logfile1 log files because the new version won't start and therefore you can't even docker exec into it.
Since data retention is not a priority, the solution here is to remove the specific container or any stopped containers and all unused images (not just dangling images), add the -a flag to the command.
docker system prune -a
Also this issue may happen if you are moving between two different project folders. in that case, try to identify the volumes that may have used the same image and delete them where necessary
docker volume rm volume_name volume_name
More on how to remove stopped images:
https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes

Trouble getting started with AWS Lambda locally

I'm trying to get a simple dotnet lambda up and running using the Rider AWS toolkit - starting with the SAM HelloWorld sample project, but in creating, I run into this error
java.util.concurrent.CompletionException: java.lang.RuntimeException: Could not execute `sam init`!: [Cloning from https://github.com/aws/aws-sam-cli-app-templates, Error: Unstable state when updating repo. Check that you have permissions to create/delete files in C:\Users\user_name\AppData\Roaming\AWS SAM directory or file an issue at https://github.com/aws/aws-sam-cli/issues]
I checked the permissions on that directory, and I should have full read/write. I'm not seeing anyone else running into this particular problem online. Is this indicative of any other steps I missed along the way?
The root cause is apparently a long filename issue. There is a workaround here: https://github.com/aws/aws-sam-cli/issues/3781#issuecomment-1081263942
What I did was:
Using regedit set HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled" to 1
With admin permissions, run git config --system core.longpaths true

How can I get the Laravel 7 Homestead database snapshots working?

I've enjoyed Homestead for years and today noticed a very appealing feature that I've never used before.
https://laravel.com/docs/7.x/homestead#database-snapshots says:
Homestead supports freezing the state of MySQL and MariaDB databases
and branching between them using Logical MySQL Manager. For example,
imagine working on a site with a multi-gigabyte database. You can
import the database and take a snapshot. After doing some work and
creating some test content locally, you may quickly restore back to
the original state.
...
A common workflow looks like the following:
Import a database into the default master lmm branch.
Save a snapshot
of the unchanged database using sudo lmm branch prod-YYYY-MM-DD.
Modify the database.
Run sudo lmm merge prod-YYYY-MM-DD to undo all
changes.
Run sudo lmm delete <branch> to delete unneeded branches.
This tool sounds really useful, but I'm having trouble following those instructions. Here is what I've tried and the results:
sudo lmm status
Active snapshot:
Database snapshots:
master
2.70% used by MySQL databases.
sudo lmm branch beforeImports
df: '': No such file or directory
Logical volume name "" is invalid.
Run `lvcreate --help' for more information.
mount: /homestead-vg/beforeImports: special device /dev/homestead-vg/mysql-beforeImports does not exist.
mount: /homestead-vg/beforeImports: special device /dev/homestead-vg/mysql-beforeImports does not exist.
mount: /homestead-vg/prod-YYYY-MM-DD: special device /dev/homestead-vg/mysql-prod-YYYY-MM-DD does not exist.
mount: /homestead-vg/beforeImports: special device /dev/homestead-vg/mysql-beforeImports does not exist.
sudo lmm checkout master
is the currently active database.
Setting /homestead-vg/master as the active database.
rm: cannot remove '/var/lib/mysql': Is a directory
ln: failed to create symbolic link '/var/lib/mysql/master': File exists
I'm using: Windows 10, Vagrant 2.2.7, Virtualbox 6.1.2, Homestead v10.2.0.
What am I doing wrong?
P.S. I looked at https://github.com/Lullabot/lmm/blob/ubuntu-18.04/functions.sh#L5 (which I think is what Homestead is using), and then I ran sudo echo `readlink /var/lib/mysql`, and it printed a blank line. But sudo ls -lah /var/lib/mysql shows lots of files. I clearly don't know what I'm doing and would appreciate any help.
P.P.S. I also see https://github.com/laravel/homestead/issues/1112 but do not understand.
There was a bug that prevented LMM from working with MySQL 8: https://github.com/laravel/homestead/issues/1383

Failed to initialize central HHBC repository: Failed to initialize schema

The complete error is:
Failed to initialize central HHBC repository:
Failed to initialize schema in /home/shreeram/.hhvm.hhbc:
I am trying to configure hhvm ana apache2.
For that i am following this link how-to-setup-hhvm-on-ubuntu-14-04-server-with-apache-2-4-part-1/
In above link i am stuck in the step when i put this command in the terminal:
curl -sS https://getcomposer.org/installer | php
The result of that command is the error mentioned above.
The shreeram directory has both read and write permission.
Could anyone help me to understand what i am missing there?
Are you sure permissions are correct on /home/shreeram, and that /home/shreeram/.hhvm.hhbc is readable and writable by the user running php? This issue really does sound like a permissions problem.
As the same user that was running php, does touch /home/shreeram/.hhvm.hhbc work? What about echo > /home/shreeram/.hhvm.hhbc?
If that's all fine, try rm /home/shreeram/.hhvm.hhbc and then try to install Composer again. Although it's typically a permission error, there are cases when the repo can become corrupt (particularly if the enclosing directory is on NFS or some other network filesystem) and you can just remove it and start over.

biicode "ERROR: Unable to properly clean project DB:" or "ERROR: Unexpected Exception database is locked"

I was playing with biicode, but I am facing this issue. I don't exactly know how I obtained that (I probably called the bii cpp:build command several time in parallel), but I want to fix my project :
bii cpp:build
INFO: Processing changes...
ERROR: Unexpected Exception
database is locked
ERROR: Error executing command.
Check the documentation in http://docs.biicode.com
or ask in the forum http://forum.biicode.com
and when I try to clean stuffs I am obtaining that :
bii clean
ERROR: Unable to properly clean project DB:
database is locked
The project is really simple, nothing really tricky so I think it's not relevant to explain it.
I did not find any relevant information on the doc neither in the forum. I did not find any process still building it (my ide, nor my terminal)
Any idea to get it works ?
Many thanks for your answers !
PS : whouhou a biicode is now available :)
The problem is not the cache "bii.db" database located in .biicode, but your project one, which is located in:
yourproject/bii/.hive.db
You can safely delete it. After that, inside your project folder, do a init again:
yourproject$ bii init
That will restore a clean database. I suggest running a clean build:
$ bii clean
$ bii cpp:build
Those databases are only caches to store temporary information. All the information required is in your block files: biicode.conf, CMakeLists.txt, so deleting those caches is not dangerous.
Sqlite database seems to be locked, try rebooting computer.
If it doesn't work try to remove database file manually.
The file is in your home directory in the folder .biicode and its named bii.db
If you are using linux/osx its on ~/.biicode/bii.bd
Hope it works!

Resources