Db2

 View Only
  • 1.  db2cm HADR Environment - Error: Unsupported flag or entry: –host

    Posted Tue April 16, 2024 06:00 PM

    Hello Community,

    I am likely missing something simple, so if you quickly see it in what I have posted here please let me know.  The names have been changed to protect the innocent.  I'll start following the trail and update with what I find.

    Thanks in advance for any assistance!

    Example from the Redbook:
    $ home/db2inst1/sqllib/bin/db2cm -create -cluster -domain yslhadomain -host
    ip-192.168.1.100 -publicEthernet eth0 -host ip-192.168.1.200 -publicEthernet eth0
    Created db2_ip-192.168.1.100_eth0 resource.
    Created db2_ip-192.168.1.200_eth0 resource.
    Cluster created successfully.
    $/home/db2inst1/sqllib/bin/db2cm -create -instance db2inst1 –host ip-192.168.1.100
    Created db2_ip-192.168.1.100_db2inst1_0 resource.
    Instance resource for db2inst1 on ip-192.168.1.100 created successfully.
     
    Me:
    [root@server01 bin]# db2level
    DB21085I  This instance or install (instance name, where applicable:
    "db2inst1") uses "64" bits and DB2 code release "SQL11059" with level
    identifier "060A010F".
    Informational tokens are "DB2 v11.5.9.0", "special_39340",
    "DYN2402200859AMD64_39340", and Fix Pack "0".
    Product is installed at "/opt/ibm/db2/V11.5".
    [root@server01 bin]# db2level
    [root@server01 ~]# date; db2cm -create -cluster -domain devhadom01 -host server01 -publicEthernet ethXX -host server02 -publicEthernet ethXX; date
    Tue Apr 16 02:14:27 PM EDT 2024
    Created db2_server01_ethXX resource.
    Created db2_server02_ethXX resource.
    Cluster created successfully.
    Tue Apr 16 02:14:58 PM EDT 2024
    [root@server01 ~]#
     
    [root@server01 bin]# date ; pwd ; db2cm -create -instance db2inst1 –host server01 ; date
    Tue Apr 16 02:56:52 PM EDT 2024
    /home/db2inst1/sqllib/bin
    Error: Unsupported flag or entry: –host
     
    |-------------------------------------------------------------------|
    | Below is the list of command options of db2cm available           |
    |   in different HA configurations.                                 |
    | Search "db2cm - Db2 cluster manager utility" in IBM Documentation |
    |   for detailed command option specifications.                     |
    |-------------------------------------------------------------------|
    ...
     
    Tue Apr 16 03:01:35 PM EDT 2024
    [root@server01 bin]#
     
    [root@server01 bin]# cat /tmp/db2cm.run.log.2024-04-16_15-01-35
    2024-04-16-15.01.35.518613 [execCmd][2602] Start rpm -q corosync | grep db2pcmk
    corosync-3.1.7-2.db2pcmk.el9.x86_64
    2024-04-16-15.01.35.528735 [execCmd][2602] End
    2024-04-16-15.01.35.529917 [execCmd][2602] Start rpm -q pacemaker | grep db2pcmk
    pacemaker-2.1.6-4.db2pcmk.el9.x86_64
    2024-04-16-15.01.35.538390 [execCmd][2602] End
    2024-04-16-15.01.35.539699 [db2cm] Start db2cm -create -instance db2inst1 –host server01
    ---
    DB2CM_DELETE_FAILOVER_CONSTRAINTS=
    DB2CM_CREATE_FAILOVER_CONSTRAINTS=
    DB2CM_CHECK_FAILOVER_CONSTRAINTS=
    DB2CM_FAILOVER_MOUNT_PATH=
    DB2CM_DBNAME=
    ---
    2024-04-16-15.01.35.542917 [db2cm] End execution with exit code 1 on line 7614
    [root@server01 bin]#


    ------------------------------
    Jim Pearon
    Contractor
    Winsupply
    Kettering OH
    ------------------------------


  • 2.  RE: db2cm HADR Environment - Error: Unsupported flag or entry: –host

    IBM Champion
    Posted Wed April 17, 2024 03:42 AM

    Hi Jim,

    Check if the "minus" (or "dash") sign in your command was changed into something that looks similar but is a completely different character:

    Your command:

    date ; pwd ; db2cm -create -instance db2inst1 –host server01 ; date

    How (I think) it should look:

    date ; pwd ; db2cm -create -instance db2inst1 -host server01 ; date

    Hope this helps!

    Regards, Damir



    ------------------------------
    Damir Wilder
    ------------------------------



  • 3.  RE: db2cm HADR Environment - Error: Unsupported flag or entry: –host

    Posted Wed April 17, 2024 07:11 AM

    Thanks Damir!

    I was able to sort that out, however could not get back to this post yesterday to confess.  You are spot on, that was the issue.

    Best!
    Jim



    ------------------------------
    Jim Pearon
    Contractor
    Winsupply
    Kettering OH
    ------------------------------