Db2

Db2

Where DBAs and data experts come together to stop operating and start innovating. Connect, share, and shape the AI era with us.


#Data


#Data
#Databases
#Operatingsystems
#Db2
#Databasesolutions
 View Only
Expand all | Collapse all

port and hadr

  • 1.  port and hadr

    Posted 12/15/23 02:00 AM

    using db2 and hadr on linux 11.5.5

    db2 cfg has been set for hadr : local svc 50100

    when starting hadr as standby we get

    2023-12-15-07.33.37.569638+060 E21815023E616         LEVEL: Error (OS)
    PID     : 10565                TID : 140583356065536 PROC : db2sysc 0
    INSTANCE: dbadma               NODE : 000            DB   : ACC1
    HOSTNAME: uhdb2accdr.uhasselt.be
    EDUID   : 60                   EDUNAME: db2hadrs.0.0 (ACC1) 0
    FUNCTION: DB2 UDB, oper system services, sqloPdbQuerySocketErrorStatus, probe:15
    MESSAGE : ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied"
              DIA8701C Access denied for resource "", operating system return code
              was "".
    CALLED  : OS, -, getsockopt                       OSERR: EACCES (13)

    it seems to be an O/S error, but system people claim all machines have same setup and it is working in other machines

    the firewall has been disabled

    the start hadr does not give any errors, just these msg in diaglog en primary can not connect : complaining server/port of target does not exist

    i have been looking around bu not idea what it is.  I opened a pmr, but it is handled by a new engineer and he has no clue either

    any help ?



    ------------------------------
    Thanks for all answers
    Best Regards,
    Guy Przytula
    ------------------------------


  • 2.  RE: port and hadr

    Posted 12/15/23 02:12 AM

    It looks like you are encountering an error related to DB2 UDB (Universal Database) and operating system services. The error message indicates an "Access Denied" issue with a specific resource. Here's a breakdown of the key information:

    • Function: sqloPdbQuerySocketErrorStatus is a function related to querying the error status of a socket in a database environment.

    • Message: The error message ZRC=0x840F0001=-2079391743=SQLO_ACCD "Access Denied" indicates that an access denied error (SQLO_ACCD) occurred.

    • DIA8701C Message: This is a specific message from DB2 indicating that access was denied for a particular resource. The resource information and the operating system return code are not provided in the snippet.

    • CALLED: The error occurred during a call to the operating system function getsockopt.

    • OSERR: The operating system error code is EACCES (13), which corresponds to "Permission denied." This suggests that the process attempting the operation does not have the necessary permissions to perform the specified action.

    To troubleshoot and resolve this issue, you may want to consider the following steps:

    1. Check Permissions: Ensure that the process running DB2 has the necessary permissions to access the resource in question. This could include file system permissions, network permissions, or other resource-specific permissions.

    2. Resource Information: Identify the specific resource mentioned in the error message (if available) and review its permissions and configuration.

    3. Operating System Logs: Check the operating system logs for more details on the "Access Denied" error. This may provide additional information about the resource or action that is being denied.

    4. DB2 Diagnostics: Use DB2 diagnostic tools or logs to gather more information about the context of the error and the specific resource involved.

    5. Review Configuration: Ensure that the DB2 configuration is correct and matches the requirements for the operation being performed.

    6. Review Security Policies: Check if there are any security policies in place at the operating system level that may be affecting the access permissions.



    ------------------------------
    Sarwar Javaid
    Sr. Systems Engineer | Information Technology
    Dollar Industries Pvt. Ltd. | D-85, S.I.T.E Area, Karachi
    Cell: (+92) 346 2595970
    ------------------------------



  • 3.  RE: port and hadr

    Posted 12/15/23 02:25 AM

    Just follow link and watch linked video [ complete advance level hadr setup step by step]. Hope it will resolve your issues after watch described link video

    https://community.ibm.com/community/user/datamanagement/discussion/port-and-hadr#bme1080b6b-5e8d-43cd-9c92-ba1787628d1a



    ------------------------------
    Sarwar Javaid
    Sr. Systems Engineer | Information Technology
    Dollar Industries Pvt. Ltd. | D-85, S.I.T.E Area, Karachi
    Cell: (+92) 346 2595970
    ------------------------------



  • 4.  RE: port and hadr

    Posted 12/19/23 02:27 AM

    thanks for the comment

    but the problem has nothing todo with db2 cfg/setup.  this was done correctly

    db2 is complaining about O/S error and get socket....

    as the system person does not know what is wrong, I posted this question. maybe someone has seen this before and a hint could help to resolve

    small remark : Just follow link ....     the link is pointing to this entry and not to the video.



    ------------------------------
    Thanks for all answers
    Best Regards,
    Guy Przytula
    ------------------------------



  • 5.  RE: port and hadr

    Posted 12/19/23 03:00 AM

    t looks like there's an error in your DB2 database system. The error message indicates an access denied issue when trying to perform a socket-related operation (getsockopt). Here's a breakdown of the information provided:

    • Error Code (ZRC): 0x840F0001=-2079391743=SQLO_ACCD

      • This code corresponds to an access denied error in the DB2 system.
    • Message: DIA8701C Access denied for resource "", operating system return code was "".

      • The system is reporting an access denied situation. It seems that the resource is not specified in the error message ("").
    • Operating System Error (OSERR): EACCES (13)

      • The operating system returned an error code indicating permission denied. In this case, the permission issue is denoted by the error code 13, which is EACCES.
    • Context Information:

      • PID: Process ID of the application encountering the error (db2sysc with PID 10565).
      • INSTANCE: Database instance (dbadma).
      • NODE: Node number (000).
      • DB: Database name (ACC1).
      • HOSTNAME: Hostname of the machine (uhdb2accdr.uhasselt.be).
      • EDUID: Execution Unit ID.
      • EDUNAME: Execution Unit Name (db2hadrs.0.0 (ACC1) 0).
      • FUNCTION: The function in the DB2 UDB code where the error occurred (sqloPdbQuerySocketErrorStatus).
      • PROBE: A specific point in the code where the error was detected (probe:15).

    Action Steps:

    1. Review the access permissions for the resource mentioned in the error message.
    2. Check the operating system logs for additional information on why the access is denied.
    3. Verify the configuration settings related to the DB2 instance and ensure they are set correctly.
    4. Consider checking if there are any recent changes in the system, such as security policy updates or changes in permissions.


    ------------------------------
    Sarwar Javaid
    Sr. Systems Engineer | Information Technology
    Dollar Industries Pvt. Ltd. | D-85, S.I.T.E Area, Karachi
    Cell: (+92) 346 2595970
    ------------------------------



  • 6.  RE: port and hadr

    Posted 12/20/23 12:40 AM

    Hi,

    A bit of an aside that probably will help ease the setup an eliminate an error point.  Set the hadr ports for send and receive to the same value.  There is no performance benefit in having different ports.  



    ------------------------------
    Robert Clow
    ------------------------------



  • 7.  RE: port and hadr

    Posted 12/20/23 01:15 AM

    Hi all,

    Cannot suggest or recommend anything further until and unless receive db2diag.log file from Mr. Guy.

    @Guy Przytula Please upload db2diag.log file to Google Drive and share the link with us.

    Regards,



    ------------------------------
    Sarwar Javaid
    Sr. Systems Engineer | Information Technology
    Dollar Industries Pvt. Ltd. | D-85, S.I.T.E Area, Karachi
    Cell: (+92) 346 2595970
    ------------------------------



  • 8.  RE: port and hadr

    Posted 12/19/23 03:31 AM

    I understand that you are facing problem. Now do the following steps:

    1. stop firewall and disable it.

    [root@~] iptables-save -F

    [root@~] iptables-save -X

    [root@~] iptables-save -t nat -X

    [root@~] systemctl stop iptables ................. or [root@~] systemctl stop firewalld

    [root@~] systemctl disable iptables .............. or [root@~] systemctl disable firewalld

    2. update /etc/services in both nodes [ primary and secondary]

    For example: 

    db2_hadr_primises       50064/tcp
    db2_hadr_drsite            50070/tcp

    ----------------------------------------------------------------------------------------------------------------------------------------

    primary node: db2_hadr_primises

    secondary node: db2_hadr_drsite

    # sudo su - db2inst1

    [db2inst1@~] db2 update db cfg for acc1 using HADR_LOCAL_SVC db2_hadr_primises

    [db2inst1@~] db2 update db cfg for acc1 using HADR_REMOTE_SVC db2_hadr_drsite

    ..........................

    Restart db2

    Take new session for monitoring via putty., if you are familiar if windows desktop

    [root@~] updatedb; locate db2diag.log

    [root@~] sudo su - db2inst

    [db2inst1@~] tail -f  /home/db2inst1/sqllib/db2dump/db2diag.log

    Do aforesaid mentioned steps and update us asp.



    ------------------------------
    Sarwar Javaid
    Sr. Systems Engineer | Information Technology
    Dollar Industries Pvt. Ltd. | D-85, S.I.T.E Area, Karachi
    Cell: (+92) 346 2595970
    ------------------------------



  • 9.  RE: port and hadr

    Posted 12/19/23 04:03 AM

    i do not see why adding an additional translation, by using /etc/services instead of hardcoded hadr svc would resolve the problem

    I anyhow tested it and the problem remains the same as expected



    ------------------------------
    Thanks for all answers
    Best Regards,
    Guy Przytula
    ------------------------------



  • 10.  RE: port and hadr

    Posted 12/19/23 06:37 AM

    Hi Guy,

    Please share db2diag.log so that I trace thoroughly.

    Thnx



    ------------------------------
    Sarwar Javaid
    Sr. Systems Engineer | Information Technology
    Dollar Industries Pvt. Ltd. | D-85, S.I.T.E Area, Karachi
    Cell: (+92) 346 2595970
    ------------------------------



  • 11.  RE: port and hadr

    Posted 01/10/24 02:01 AM

    Hello Guy,

    Sorry if you already solved the issue, but what about Selinux? What mode is it in? Permissive? Enforcing?



    ------------------------------
    Ondřej Žižka
    ------------------------------



  • 12.  RE: port and hadr

    Posted 01/10/24 03:28 AM

    no problem, any answer is welcome

    I also tried hadr simulator and we get msg : no route to host, although we can ping both servers

    I informed system people about it, they say : we did not change anything..   but now the problem is resolved. I do not know the cause

    now also started hadr and all worked.

    many thanks for all comments/help



    ------------------------------
    Thanks for all answers
    Best Regards,
    Guy Przytula
    ------------------------------



  • 13.  RE: port and hadr

    Posted 01/10/24 03:48 AM
    Edited by Jan Nelken 01/10/24 03:48 AM

    "they say : we did not change anything..."

    This should trigger all alarms.



    ------------------------------
    Jan Nelken
    ------------------------------



  • 14.  RE: port and hadr

    Posted 01/10/24 04:19 AM

    yes of course..

    but it would be nice to know the reason, if it would ever happen again at same or different customer



    ------------------------------
    Thanks for all answers
    Best Regards,
    Guy Przytula
    ------------------------------