ZCM 24.2 trying to upgrade the embedded postgres doesn't start with "ZENworks server is not hosting the embedded postgres database"

desperation appears in my head and the next will be a ticket at OT support. 

Just want to ask if anybody has been faced with the following:

ZCM System with a little longer history ;-) .

The database lives since 12+ years, had been through many versions, had been migrated from sybase, had been moved from sles to appliance.

the system is 24.2 on appliance at the momnent, running fine since all these years and now when it comes to upgrade to 24.4 i am trying to use the postgres-migration-tool.sh, (SLD Portal,  Downloads at 24.4). 

starting the script it tries to check the requirements and ends - or better not even starts - with the statement that "ZENworks server is not hosting the embedded postgres database""

... but it does. 

zdm.xml contains

<entry key="Type">postgresql</entry>
<entry key="Embedded">true</entry>"

the database gives the correct server when i ask:

SELECT zZENObject.Name FROM  zZENObject,zZENServerRoles WHERE zZENObject.ZUID = zZENServerRoles.id AND zZENServerRoles.Roles = 'Database'; 

Has anybody of you all seen such output?

kind regards

Gerd

... 

  • 0  

    does the dmsuperaccounts.properties file exist in the same folder as the zdm.xml?

    Does "zman dgcs" work?

    Do you know the Super Account Name and PWD for the DB?

    --

    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

    Be sure to "Like" My (and a few others) Cool Solutions below! 

    https://community.microfocus.com/members/craigdwilson/bookmarks

  • 0 in reply to   

    thanks for your reply, ok, we are narrowing down...

    1. there is a dmaccounts.properties file.

    <<<Servername>>> # cat dmaccounts.properties
    #Database accounts and passwords
    #NOTE: If you have \ in your password and providing it here in plain text, you need to escape it and provide it here.
    #For example:
    # If your password is "password\x" then you should provide it as "password\\x"
    #Sat Jul 18 14:08:24 CEST 2020
    zenadmin=<<<< here is a long string>>>>

    2. Here might be a cause?

    zman dgcs

    Error:An internal error occurred. Please check the zman log for more information.

    ERROR: 11

    whereby "zman dgc" is working.and gives back the database administrator

    3, i wasn´t aware of any "super account name" yet.

    When i started the migration script i used the zone administrator for it, which seemed to work. But i have seen that there was asked for a "super administrator". 

    (have you a link in the docs for the moment when the super administrator came into the game? I have completely missed that)

    thanks

    Gerd

  • 0 in reply to 

    ok, digging in docs i found that the super administrator is just a user, given super administrator rights. Misunderstanding wording and of course i have users that have the checkbox set in the user administration part. 

    www.novell.com/.../zen_sys_admin_rights.pdf

  • 0 in reply to 

    the super administrator needed by the postgresql migration script has to be a local non-LDAP account with administrator rights.  this tripped me up initially, as I'd been using my LDAP login for everything and didn't realize there was a local "administrator" account which is not even listed in Configuration->Administrators; I probably used that local login once years ago and then forgot about it.

    however if the script logged in successfully, then you must have given it a valid local account, as the login will simply fail if you give it an LDAP account.

  • 0 in reply to 

    Thanks for reply. 

    Just to make sure that i am not on the wrong path.

    Every ZCM System that is created owns an embedded local User named "Administrator". This one is the one i used for the migration script. It logs in successfully when starting.
    Irritating is the line "that makes me think when starting the script:

    >sh ./postgres-migration-tool.sh
    >Welcome to the PostgreSQL Database Migration tool.
    >PostgreSQL Migration tool running in Migration mode.
    >Enter local ZENworks Super Administrator username:

    ->"Super Administrator" made me think here. Why do the developers use "Super" here...?

    I assumed that the Zone Administrator User "Administrator" should be ok. And it lets me at least log in.

  • 0   in reply to 

    ...and AFAIK the script wants the account name case sensitive, i.e. it likely expects "Administrator".

  • Verified Answer

    +1   in reply to 

    The reason for the failure is most likely due to dmsuperaccounts.properties file missing. (This will 100% cause this failure)  This file missing is also why the the "zman dgcs" is also failing which reads that file to get full access to the database server.

    --

    Presumably, you don't know the PostGres SuperUser Credentials....(Most don't have that stored.)  If you have more than 1 primary server, I would recommend looking on other servers for the file or perhaps server backups.

    If you can't find a copy....you will need to perform various steps to recover/update/change the postgres user password and then recreate the mdsuperaccount.properties file.

    This is probably something that falls outside of forums support, since the steps can be quite dangerous and hose the entire system if not done carefully.

    --

    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

    Be sure to "Like" My (and a few others) Cool Solutions below! 

    https://community.microfocus.com/members/craigdwilson/bookmarks

  • 0   in reply to   

    Actually the issue the original poster is a bit different.

    Yes....The Credentials Provided to "Authorize" the process needs to be a "non-ldap" user...this user actually does not have any 'POSTGRES' permissions.  The customer is missing configuration file that has the encrypted postgres super user, which is needed for the actual postgres operations.

    --

    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

    Be sure to "Like" My (and a few others) Cool Solutions below! 

    https://community.microfocus.com/members/craigdwilson/bookmarks

  • 0 in reply to   

    ok, i am absolutely with you, that is the most plausible cause.

    the system once was on sles with sybase, there was a migration tool that time AFAIR and since then it was hosted on that appliance. 

    Probably at that time the file was lost/never there or whatever.

    If i would be able to GUESS the credentials (at this time i had a very small set of passwords and if it was something a system integrator had to set i would know them) what coul be my next step? 

    So the answer for your last post "what if i knew the credentials", could i recreate the dmsuperaccounts.properties?

  • 0   in reply to 

    It "Definitely" can be done....but best shared via an SR because it's a little tricky and involves messing with both PG itself as well as ZCM. If you can't make an SR for any reason...I'm more than happy to share offline some general steps....just be 100% sure to backup and snapshot before anything I send you just in case.

    --

    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

    Be sure to "Like" My (and a few others) Cool Solutions below! 

    https://community.microfocus.com/members/craigdwilson/bookmarks