Posts

Docker network not found

 Docker network not found   Failed to remove network <id>: Error response from daemon: network <id> not foundFailed to remove some resources from stack: <name> When using docker network ls, the network is indeed not removed, however, docker network rm <id> always results in the following: Error response from daemon: network <id> not found 1. If you are attempting to add a container to an existing network that no longer exists, then you can use docker-compose up --force-recreate.  2. Inspect the network which we are unable to delete docker network inspect <id> or <name> Disconnect the network docker network disconnect -f <networkID> <endpointName> or <endpointId> Delete unused networks docker network prune docker system prune will remove 'all networks not used by at least one container' allowing them to be recreated next docker-compose up

Postfix/sendmail fatal: User nginx is not allowed to submit mail

Postfix/sendmail fatal: User nginx is not allowed to submit mail   You need to edit /etc/postfix/main.cf    and find   authorized_submit_users = root,www-data   and add nginx.   After that reload postfix and now you can send emails from web php forms.

Installing megacli and megaclisas-status on Proxmox PVE 7.4 and Proxmox Backup Server 2.4-3

 Installing megacli and megaclisas-status on Proxmox PVE 7.4 and Proxmox Backup Server 2.4-3   1. Edit sources   vi /etc/apt/sources.list # LSI MegaRaid Tools deb http://hwraid.le-vert.net/debian bullseye main 2. Import key wget https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key apt-key add hwraid.le-vert.net.gpg.key 3. Install megaraid tools apt update apt install megacli apt install megaclisas-status     4. Check status megacli -AdpAllInfo -aAll or  megaclisas-status or smartctl -a -d megaraid,6 /dev/sdb  

Proxmox LXC cannot mount squashfs image using "squashfs" mount

 Proxmox LXC cannot mount squashfs image using "squashfs" mount   error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount: /tmp/sanity-mountpoint-015619550: mount failed: Operation not permitted.   1. Enable FUSE  go to CT ->  Options -> Features and click the FUSE checkbox. 2. Install squashfs tools and others dnf install squashfs-tools squashfuse fuse 3. reboot LXC container You can install now ex certbot snap install --classic certbot

Send emails from postfix using mandrill or sendgrid

 Send emails from postfix using mandrill or sendgrid After installing and configuring postfix, add this to the /etc/postfix/main.cf relayhost = [smtp.sendgrid.net]:2525 smtp_tls_security_level = encrypt smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd header_size_limit = 4096000 smtp_sasl_security_options = noanonymous or relayhost = [smtp.mandrillapp.com]:587 smtp_tls_security_level = encrypt smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd header_size_limit = 4096000 smtp_sasl_security_options = noanonymous   Create file /etc/postfix/sasl_passwd   and add inside     [ smtp.sendgrid.net ] :587 USERNAME:PASSWORD   or [ smtp.mandrillapp.com ] :587 USERNAME:API_KEY   Protect the files changing to DB: postmap /etc/postfix/sasl_passwd     now you can delete sasl_passwd because there is sasl_passwd.db file   If there is error: postfix/smtp[8513]: warning: SASL authentication failure: No worthy mechs found postfix/smtp[85

Reduce (shrink) and resize raw disk at Proxmox

 Reduce (shrink) and resize raw disk at Proxmox 1. Check the status of raw disk:   #e2fsck -fy /hdd-img/images/111/vm-111-disk-1.raw e2fsck 1.46.5 (30-Dec-2021) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /hdd-img/images/111/vm-111-disk-1.raw: 135279/327680000 files (1.8% non-contiguous), 857599886/1310720000 blocks  2. At first, check raw disk size:   #qemu-img info /hdd-img/images/111/vm-111-disk-1.raw image: /hdd-img/images/111/vm-111-disk-1.raw file format: raw virtual size: 4.88 TiB (5368709120000 bytes) disk size: 3.59 TiB  3. Resize filesystem: -M - will resize to the minimum size based on saved files -p - will display progress bar #resize2fs -M -p /hdd-img/images/111/vm-111-disk-1.raw resize2fs 1.46.5 (30-Dec-2021) Resizing the filesystem on /hdd-img/images/111/vm-111-disk-1.raw to 852166716 (4k) blocks. Begin pass 2 (max = 196

JDK, JRE java enable TLS10

JDK, JRE java enable TLS10 If some old software requires TLSv1 or TLSv1.1, you have to edit java.security file and remove from this entry required algorithms.   jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \     DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \     include jdk.disabled.namedCurves