Error on adding hot memory to TrueNAS VM
Got following error when changing memory size of TrueNAS VM dynamically.
Failed - Invalid virtual machine configuration.
Got following error when changing memory size of TrueNAS VM dynamically.
Failed - Invalid virtual machine configuration.
Table of Contents
Couldn't found install component feature in MacOS version.
Download component from following location
Install component using following steps
Tested on following formats
Test
Below error repeatly appears when run apt upgrade
.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Scanning processes...
Scanning candidates...
Scanning linux images...
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Check /etc/default/locale
file,
# File generated by update-locale
LANG=en_US.UTF-8
it doesn't contain following lines
LC_CTYPE="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
Tried to run following commands, the errors are still there.
locale-gen "en_US.UTF-8"
dpkg-reconfigure locales
Also added following lines in /etc/environment
and /etc/default/locale
, still failed
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
Table of Contents
Use music players in MacOS and output to DAC directly.
Website: https://colibri-lossless.com/
Note: If using Exclusive mode, need to change system default sound device to other device in order to use the device selected for music playing.
Forgot how to change them.
This is a library style player, but user interface isn't user friendly as iTune, and library isn't manging not well at all.
When self generated CA certificate has not been trusted by docker client, following error occurres
... x509: certificate signed by unknown authority
Docker can install registry CA as /etc/docker/certs.d/<registry[:port]>/ca.crt
. For example,
/etc/docker/certs.d/my-registry.example.com:5000/ca.crt
Note: If port is 443, it should be omitted. Otherwise, it won't work.
To install self generated CA certificate for operating system, follow the page below.
Install self generated CA certificate into Linux OS
The restart docker service after CA certificate installed.
systemctl restart docker
Table of Contents
j# Backup docker container using shell script
Using following shell script to backup docker container with date tag
#!/bin/bash
# backup-docker.sh <container_name> <registry_path>
container=$1 # <container_name>
repo_prefix=$2 # <registry>/<prefix>
registry=${repo_prefix//\/*/}
repo_name=$repo_prefix/`hostname`/$container
repo_path=$repo_name:`date +%Y%m%d`
docker commit $container $repo_path
docker login $registry
docker push $repo_path
Note: If following certification error occurred, follow the page below to install ceritficate.
Configure trust self generated ca certificate of docker registry
Using following shell command to list repo list in docker registry
curl https://bianxi:$PASSWORD@${registry}/v2/_catalog
Sample output
{"repositories":["bianxi/dnsmasq","bianxi/heart/dnsmasq"]}
Using follwing shell command to list tags for one repo in docker registry
echo curl https://bianxi:$PASSWORD@${registry}/v2/${repo}/tags/list
Sample output
{"name":"bianxi/heart/dnsmasq","tags":["20210620","20210621","20210622","20210623","20210624","20210625","20210626","20210627"]}
Get digest by pull image
docker pull registry.bx.net/bianxi/heart/dnsmasq:20210624
Sample output
20210624: Pulling from bianxi/heart/dnsmasq
...
22b5d63ad977: Already exists
8e2e66517d7e: Pull complete
Digest: sha256:7535af1f65524f9200b901fc31b9c779819e45c0502ef99605666842a319908f
curl https://bianxi:$PASSWORD@registry.bx.net/v2/bianxi/heart/dnsmasq/manifests/sha256:xxxxxxxxxxxxxxxx
curl -v --silent -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X GET https://bianxi:$PASSWORD@registry.bx.net/v2/bianxi/heart/dnsmasq/manifests/20210624 2>&1 | grep Docker-Content-Digest | awk '{print ($3)}'
docker rmi registry.bx.net/bianxi/heart/dnsmasq:<tag>
curl -X DELETE https://bianxi:$PASSWORD@registry.bx.net/v2/bianxi/heart/dnsmasq/manifests/sha256:xxxxxxxxxxxxxxxx
docker exec registry bin/registry garbage-collect --delete-untagged /etc/docker/registry/config.yml
docker restart registry
Error "413 Request Entity Too Large" occurred when push image to docker registry.
To fix this issue, add client_max_body_size
in NGINX configuration file for docker registry as below, then restart NGINX.
server {
listen 443;
server_name hub.bx.net docker.bx.net registry.bx.net dockerhub.bx.net;
location /v2/ {
proxy_pass https://registry.my_bridge/v2/;
proxy_set_header Authorization $http_authorization;
proxy_pass_header Authorization;
}
client_max_body_size 100M;
}
This is an example page from WordPress.
Block patterns are pre-designed groups of blocks. To add one, select the Add Block button [+] in the toolbar at the top of the editor. Switch to the Patterns tab underneath the search bar, and choose a pattern.
Twenty Twenty-One includes stylish borders for your content. With an Image block selected, open the "Styles" panel within the Editor sidebar. Select the "Frame" block style to activate it.
Twenty Twenty-One also includes an overlap style for column blocks. With a Columns block selected, open the "Styles" panel within the Editor sidebar. Choose the "Overlap" block style to try it out.
After change port in settings, also redeployed dockers, the website is unreachable.
Update in setting of wordpress
Update docker-compose.yml file
Destory and recreate dockers
docker-compose down
docker-compose up -d
Note: Failed
Change port back using by update option values database.
Access mariadb docker
docker exec -it wp_db_1 bash
Login to mariadb
mysql -u wordpress -p
Search option value
MariaDB [wordpress]> select * from wp_options where option_value like '%192.168.1.14%';
+-----------+-------------+------------------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+-------------+------------------------+----------+
| 1 | siteurl | http://192.168.1.14:80 | yes |
| 2 | home | http://192.168.1.14:80 | yes |
+-----------+-------------+------------------------+----------+
2 rows in set (0.058 sec)
Update value back
MariaDB [wordpress]> update wp_options set option_value='http://192.168.1.14:8080' where option_value='http://192.168.1.14:80';
Query OK, 2 rows affected (0.008 sec)
Rows matched: 2 Changed: 2 Warnings: 0
MariaDB [wordpress]> select * from wp_options where option_value like '%192.168.1.14%';
+-----------+-------------+--------------------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+-------------+--------------------------+----------+
| 1 | siteurl | http://192.168.1.14:8080 | yes |
| 2 | home | http://192.168.1.14:8080 | yes |
+-----------+-------------+--------------------------+----------+
2 rows in set (0.058 sec)
MariaDB [wordpress]> quit
Table of Contents
When accessing server via NGINX, it didn't translate URLs in page to the URL accessing.
For example, the URL is https://example.com/sample.html, the server behind is https://192.168.1.11/sample.html, the NGINX is still leaving it without translating.
I have done following, but not useful
siteurl
and home
in databaseupdate wp_options set option_value='http://newhost:8080' where option_name='siteurl';
update wp_options set option_value='http://newhost:8080' where option_name='home';
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
}
if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
$_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_PORT'];
}
Someone suggested following lines as well, but I didn't do it.
define('WP_HOME','https://test.com/blog/');
define('WP_SITEURL','https://test.com/blog/');
proxy_pass http://newhost
Configure https
server {
server_name blog.bianxi.com;
# SSL configuration
listen 443 ssl;
ssl_certificate conf.d/www.bianxi.com.crt;
ssl_certificate_key conf.d/www.bianxi.com.key;
location / {
proxy_pass 'http://192.168.1.14:8080';
proxy_http_version 1.1;
proxy_buffering off;
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header Proxy "";
}
}
Configure http redirect
server {
listen 80;
server_name blog.bianxi.com;
return 301 https://$host$request_uri;
}
wp-config.php
Add following lines in wp-config.php
//$_SERVER['REQUEST_URI'] = str_replace("/wp-admin/", "/blog/wp-admin/", $_SERVER['REQUEST_URI']);
if($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'){
$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = 443;
define('WP_HOME','https://blog.bianxi.com/');
define('WP_SITEURL','https://blog.bianxi.com/');
}
Change location in NGINX configuration file, and the URL replace were used if requires changing of URL as well in wp-config.php file.