Db2

Db2

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  dmctop in AIX "panic: character set not supported"

    Posted Fri April 05, 2024 11:02 AM

    Hi DB2 folks,

    currently, I'm trying to get deeper into DB2, so I installed dmctop 1.0.4.1.

    First in RHEL 8 - it worked well, now in AIX 7.2.5 TL7 with a DB2 v11.5.4.0 (db2level) - it doesn't work at all.

    Running /.../dmctop-aix -d detl0001 leads to
    Connecting to DB DETL0001
    panic: character set not supported
    goroutine 1 [running]:
    dmctop/src/view.(*LayoutElements).Run(0xa000100002b67e0)
            /dmctop_jenkins/workspace/dmctop_master/go/src/dmctop/src/view/layout_object_init.go:173 +0xd4
    dmctop/src/view.Init(0xa)
            /dmctop_jenkins/workspace/dmctop_master/go/src/dmctop/src/view/view_init.go:29 +0xe0
    main.main()
            /dmctop_jenkins/workspace/dmctop_master/go/src/dmctop/src/cmd/dmctop/main.go:57 +0x490

    Default language in this system is LANG=en_US.8859-15 (for historical purposes, unsure if I may change it).

    So I installed language translation files (smitty mle_add_lang) for en_US.ISO8859-1 and even en_US.UTF-8.

    Running with command prefix LC_ALL="en_US.ISO8859-1" doesn't resolve the issue,
    running with command prefix LC_ALL="en_US.UTF-8" leads to "hangup" and kicks me out of su and sudo back to my login session.

    I've seen a thread here about AIX and en_US.ISO8859-1 not supported by dmctop 1.0.3.
    Is this still true for dmctop 1.0.4.1 ?
    Or has anybody got it working in AIX (7.2) ?


    Regards, Achim



    ------------------------------
    Achim Haag
    ------------------------------


  • 2.  RE: dmctop in AIX "panic: character set not supported"

    Posted Sun April 07, 2024 01:19 AM

    I have no access to AIX for testing, and I don't know if any of
    this will help, but some things to try:

    * Try with LANG=C or LC_ALL=C?

    * Try just unsetting all LANG and any LC_* variables all together?

    * Assuming DB2 is installed on the AIX system and you are trying to
      connect locally with dmctop, run as db2inst1 user.
      Notes in the dmctop README:
     
           - Setup the following environment variables:

            For Linux/AIX:

            - LD_LIBRARY_PATH=<DRIVER_INSTALL_PATH>/lib
           ...
        (If db2inst1 account is used then setting the
        environment variable is not required).

    * On my Linux system, dmctop is a static binary, and from the looks
      of your panic message it's written in go language.  I think go uses
      UTF-8, but when building go itself from source, you have to set
      LC_ALL="C", hence my first suggestion.

    scot




  • 3.  RE: dmctop in AIX "panic: character set not supported"

    Posted Mon April 08, 2024 07:31 AM

    Thanks for your hints.

    Tried different codesets (LANG+LC_ALL on C , POSIX , EN_US.UTF-8 , en_US.ISO8859-1).
    Some of them lead to the mentioned error msg, some other simply state "hangup" and kick my sudo/su session back to my native login session (strange ?!?).

    As there's no problem with db2top and dsmtop , I will continue to use them.



    ------------------------------
    Achim Haag
    ------------------------------



  • 4.  RE: dmctop in AIX "panic: character set not supported"

    Posted Fri January 03, 2025 09:21 AM

    For anyone who comes across this post as I did,  researching this same issue.

    The issue is that dmctop doesn't work with pseudo-terminal(pty).  Sudo,  by default,  as of 1.9.14 version of sudo enables a pty session.  Therefore,  if you are using sudo su - <instance> on this version(or later) to get into the database instance user,  you are in a pty session,   and therefore dmctop will not work.    There is an article on this:  https://ibm-data-and-ai.ideas.ibm.com/ideas/DB24LUW-I-2029

    I assume they(IBM) won't work on it until they have a number of upvotes.

    The temporary workaround is to put Defaults !use_pty  in the /etc/sudoers file.  However,  that has security risks in itself,  so make sure your system admin/security team are ok with this.    There may be another "fix" to limit the security risk that involves limiting just that command to not use pty.  I am exploring/experimenting with that.



    ------------------------------
    UNIX Admin
    ------------------------------



  • 5.  RE: dmctop in AIX "panic: character set not supported"

    Posted Mon January 06, 2025 02:14 AM

    I am following up with PM and dev to evaluate the fix plan for this issue. 



    ------------------------------
    Su Li Hou
    ------------------------------



  • 6.  RE: dmctop in AIX "panic: character set not supported"

    Posted Mon January 06, 2025 06:31 AM

    Hi UA!

    Is this specific to Aix environment? In Linux sudo su - opens xterm sessions and dmctop works just fine ...



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



  • 7.  RE: dmctop in AIX "panic: character set not supported"

    Posted Mon January 06, 2025 08:49 AM

    It really depends on what sudo version is running.  Anything 1.9.14 and later will enable pty by default.    I am not sure about other Linux distributions,  but RHEL sends 1.9.5p2,  so it does not have the issue.



    ------------------------------
    UNIX Admin
    ------------------------------



  • 8.  RE: dmctop in AIX "panic: character set not supported"

    Posted Mon January 06, 2025 12:00 PM
    Edited by Jan Nelken Mon January 06, 2025 12:11 PM

    Thank you - but my Ubuntu 2410 uses sudo 1.9.15 and I do not see any issues with sudo su - db2inst1 (session uses xterm):

    jnelken@VM-Ubuntu2410:~/Desktop$ sudo -V
    Sudo version 1.9.15p5
    Sudoers policy plugin version 1.9.15p5
    Sudoers file grammar version 50
    Sudoers I/O plugin version 1.9.15p5
    Sudoers audit plugin version 1.9.15p5
    jnelken@VM-Ubuntu2410:~/Desktop$ echo $TERM
    xterm-256color
    jnelken@VM-Ubuntu2410:~/Desktop$ 

    Sudoers contains this line:

    Defaults    use_pty



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