DisplayAdd1

TechnoTechDB is a platform, which will help to grow your carrier in Information sector. Having 15 years of Experience in Oracle/MongoDB/Postgres/Mysql databases, along with having good expertise level of knowledge in Scripting to automate database task. Our goal to start with zero to hero level expertise in Database. You can access/refer my some blogs on https://mrorcldba.blogspot.com link and post your comments and your suggestion to motive us.

Saturday, 6 August 2022

Restarting (1) 9 seconds ago while running docker-compose up -d for bitnami/postgresql-repmgr:12.11.0 image.

 Hello Guys, 


This is blog is related to issue of bitnami/postgresql-repmgr:12.11.0  docker image setup. While I was performing setup of bitnami/postgresql-repmgr image, I was facing below error and docker was running Restarting mode.





INFO  ==> ** Starting PostgreSQL with Replication Manager setup **
INFO  ==> Validating settings in REPMGR_* env vars...
ERROR ==> The node name does not follow the required format. Valid format: ^.*+-[0-9]+$

$ docker ps 
CONTAINER ID   IMAGE                               COMMAND                  CREATED         STATUS                          PORTS     NAMES
f9be9b16b283   bitnami/postgresql-repmgr:12.11.0   "/opt/bitnami/script…"   5 minutes ago   Restarting (1) 42 seconds ago             instance-1-a1

Solution : In my case below docker-compose.yml was used and  found recommendation was do not use  container/service/rep name like instance-1-a1, mean don't use double (-). 
Same updated and fixed my issue.

Original Creating problem:
------------------------------------
version: "3.0"
services:
  instance-1-a1:
    image: bitnami/postgresql-repmgr:12.11.0
    container_name: instance-1-a1
    restart: always
    networks:
      - database
    ports:
      - 5432:5432
    volumes:
      - ./instance-1-a1/conf/:/bitnami/repmgr/conf/
      - ./instance-1-a1/logs/:/opt/bitnami/postgresql/logs/
    environment:
      - POSTGRESQL_PASSWORD=XXXXXXXXXX
      - POSTGRESQL_POSTGRES_PASSWORD=XXXXXXXXX
      - POSTGRESQL_USERNAME=postgres
      - POSTGRESQL_DATABASE=pg-db
      - REPMGR_NODE_NETWORK_NAME=host1
      - REPMGR_NODE_ID=1
      - REPMGR_PASSWORD=xxxxxxxxx
      - REPMGR_PRIMARY_HOST=host1
      - REPMGR_PRIMARY_PORT=5432
      - REPMGR_PARTNER_NODES=host1,host2:5432,host3:5432
      - REPMGR_NODE_NAME=instance-1-a1
      - REPMGR_LOG_LEVEL=DEBUG
      - REPMGR_PORT_NUMBER=5432
networks:
  database:
    external: true


Updated docker-compose.yml which fixed the problem:
--------------------------------------------------------------------

version: "3.0"
services:
  instance-1:
    image: bitnami/postgresql-repmgr:12.11.0
    container_name: instance-1
    restart: always
    networks:
      - database
    ports:
      - 5432:5432
    volumes:
      - ./instance-1-a1/conf/:/bitnami/repmgr/conf/
      - ./instance-1-a1/logs/:/opt/bitnami/postgresql/logs/
    environment:
      - POSTGRESQL_PASSWORD=XXXXXXXXXX
      - POSTGRESQL_POSTGRES_PASSWORD=XXXXXXXXX
      - POSTGRESQL_USERNAME=postgres
      - POSTGRESQL_DATABASE=pg-db
      - REPMGR_NODE_NETWORK_NAME=host1
      - REPMGR_NODE_ID=1
      - REPMGR_PASSWORD=xxxxxxxxx
      - REPMGR_PRIMARY_HOST=host1
      - REPMGR_PRIMARY_PORT=5432
      - REPMGR_PARTNER_NODES=host1,host2:5432,host3:5432
      - REPMGR_NODE_NAME=instance-1
      - REPMGR_LOG_LEVEL=DEBUG
      - REPMGR_PORT_NUMBER=5432

networks:
  database:

    external: true


Note: Updated parameter marked in bold above, do not change hostname or any folder name.

$docker-compose down -v 

$docker-compose up -d 

$  docker ps

CONTAINER ID   IMAGE                               COMMAND                  CREATED          STATUS          PORTS                                       NAMES

c5ad890ff90b   bitnami/postgresql-repmgr:12.11.0   "/opt/bitnami/script…"   37 minutes ago   Up 37 minutes   0.0.0.0:5432->5432/tcp, :::5432->5432/tcp   instance-1


Thanks !!!

Monday, 1 August 2022

How to enable or disable Hyper-v in 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz[Cores 4] [Logical processors 8]

 Hello Guy's

Last 6 months back I purchased new DELL Inspiron 3501 laptop with below configuration.


Memory: 32 GB

Processor: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz[Cores 4] [Logical processors 8]

Operating System: Microsoft Windows 10 Home Single Language



Due to some project related testing I need to test about hyper-v  enable and disable, but I was surprised because I can't see hyper-v option in "Windows Features" also checked in BIOS unfortunately it was enabled by default and not allowing me to disable it. 


Tried to communicate with Dell they told it is fee-paid services and not ready to tell anything about how to enable or disable this hyper-v option. 


Please refer my snapshot of "Windows Features" box take before perform R&D on my laptop.





















I asked with help of some colleague found below code which fixed my problem and I did my testing successfully. 


--> Please copy below lines between # into a .bat file and run. It would take approx 20 minutes to complete download and setup hyper-v, at last it will ask to reboot take a reboot it will show you hyper-v option along with hyper-v console.


#------------------------------------------------------

pushd "%~dp0"

dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v_install.txt

for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"

del hyper-v_install.txt

Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL

pause

#------------------------------------------------------


Note: Pleas perform above steps at your own risk.















Thanks a lot Team. 


How To Set new hostname or Rename or Change HostName in Linux

 Hello Friends, 

Most of the time when we are working VM or preparing Lab to work on any issue , we can setup one VM machine and don't want to create any new machine so we decided to copy the VM. but Most of us face problem or challenges to change hostname. Like rename node1 to node2 etc.


 We have few steps to change hostname as below.

Note: I have testing these steps on  "3.10.0-1160.el7.x86_64"  OS kernel.
















Command list which has been perform for above demo.


1. uname -a

2. hostname 

3. hostname -I

4. hostnamectl status

5. hostnamectl set-hostname node2

6. hostnamectl status

7. ssh 192.168.3.4 (take IP from step 3)

8. hostname # It will show new hostname as "node2"


Steps to Rename Host in Oracle RESTART (ASM) in Linux

  oracle@localhost ] asmcmd ASMCMD> lsdg State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_...