Jump to content
wildweaselmi

PostgreSQL database error: ERROR: role "blahuser" already exists

Recommended Posts

Our BIG-IQ rebooted due to a scheduled power outage and when it came back online it was in INOPERATIVE state.  I performed a tail -f /var/log/ltm and kept seeing that services would not start.

[root@bigiq:INOPERATIVE:] config # tail -f /var/log/ltm
Nov 4 11:20:02 bigiq emerg load_config_files: "/usr/bin/tmsh -n -g load sys config partitions all base " - failed. -- 010719a2:3: PostgreSQL database error: ERROR: role "blahuser" already exists CONTEXT: SQL statement "CREATE ROLE blahuser LOGIN" PL/pgSQL function rbac_create_user(name) line 7 at EXECUTE Unexpected Error: Loading configuration process failed.

Nov 4 11:20:02 bigiq err mcpd[4963]: 010719a2:3: PostgreSQL database error: ERROR: role "blahuser" already exists CONTEXT: SQL statement "CREATE ROLE blahuser LOGIN" PL/pgSQL function rbac_create_user(name) line 7 at EXECUTE
Nov 4 11:20:02 bigiq err tmsh[8140]: 01420006:3: Loading configuration process failed.
Nov 4 11:20:02 bigiq emerg load_config_files: "/usr/bin/tmsh -n -g load sys config partitions all base " - failed. -- 010719a2:3: PostgreSQL database error: ERROR: role "blahuser" already exists CONTEXT: SQL statement "CREATE ROLE blahuser LOGIN" PL/pgSQL function rbac_create_user(name) line 7 at EXECUTE Unexpected Error: Loading configuration process failed.
Nov 4 11:20:02 bigiq err mcpd[4963]: 01070422:3: Base configuration load failed.
Nov 4 11:20:02 bigiq info promptstatusd[3945]: 01460007:6: semaphore mcpd.running(1) released
Nov 4 11:20:02 bigiq notice promptstatusd[3945]: 01460006:5: mcpd.running(1) released, subscribe to mcpd
Nov 4 11:20:02 bigiq notice mcpd[4963]: 01070404:5: Add a new Publication for publisherID %istatsd and filterType (nil)
Nov 4 11:20:02 bigiq notice scriptd[6469]: 014f0001:5: started
Nov 4 11:20:02 bigiq notice mcpd[4963]: 01070404:5: Add a new Publication for publisherID cluster_file_operations and filterType (nil)
Nov 4 11:20:02 bigiq notice mcpd[4963]: 01070404:5: Add a new Publication for publisherID scriptd-publisher and filterType (nil)
Nov 4 11:20:03 bigiq notice iprepd[5578]: 015c0009:5: IP Reputation has no license currently
Nov 4 11:20:05 bigiq notice logger: /bin/sh /etc/bigstart/scripts/avr.provision ==> /usr/bin/bigstart singlestatus avrd
Nov 4 11:20:05 bigiq notice logger: /bin/sh /etc/bigstart/scripts/avr.provision ==> /usr/bin/bigstart singlestatus dosl7d
Nov 4 11:20:05 bigiq notice logger: /bin/sh /etc/bigstart/scripts/avr.provision ==> /usr/bin/bigstart singlestatus asm
Nov 4 11:20:05 bigiq notice logger: /bin/bash ./run 0 0 ==> /usr/bin/bigstart stop setupd
Nov 4 11:20:05 bigiq notice logger: /bin/sh /etc/bigstart/scripts/avr.provision ==> /usr/bin/bigstart singlestatus datasyncd
Nov 4 11:20:05 bigiq notice logger: /bin/sh /etc/bigstart/scripts/avr.provision ==> /usr/bin/bigstart singlestatus admd
Nov 4 11:20:06 bigiq notice logger: /bin/sh /etc/bigstart/scripts/avr.provision ==> /usr/bin/bigstart singlestatus mgmt_acld
Nov 4 11:20:06 bigiq notice logger: /bin/sh /etc/bigstart/scripts/avr.provision ==> /usr/bin/bigstart singlestat

I attempted a reboot of the BIG-IQ CM in hopes that it would correct the services not starting but no luck.  So my next step was to verify the config files would load so I ran the verify command

[root@bigiq:INOPERATIVE:Standalone] config # tmsh load sys config verify
Validating system configuration...
/defaults/asm_base.conf
/defaults/config_base.conf
/defaults/ipfix_ie_base.conf
/defaults/ipfix_ie_f5base.conf
/defaults/low_profile_base.conf
/defaults/low_security_base.conf
/defaults/policy_base.conf
/defaults/wam_base.conf
/defaults/analytics_base.conf
/defaults/apm_base.conf
/defaults/apm_saml_base.conf
/defaults/app_template_base.conf
/defaults/classification_base.conf
/var/libdata/dpi/conf/classification_update.conf
/defaults/urlcat_base.conf
/defaults/daemon.conf
/defaults/pem_base.conf
/defaults/profile_base.conf
/defaults/sandbox_base.conf
/defaults/security_base.conf
/defaults/urldb_base.conf
/usr/share/monitors/base_monitors.conf
Validating configuration...
/config/bigip_base.conf
/config/bigip_user.conf
/config/bigip.conf
010719a2:3: PostgreSQL database error: ERROR: role "blahuser" already exists
CONTEXT: SQL statement "CREATE ROLE blahuser LOGIN"
PL/pgSQL function rbac_create_user(name) line 7 at EXECUTE

Unexpected Error: Validating configuration process failed.

Now I know the config files won't fully load and it appears its because of this user and since I don't have access to the GUI I figured I'd attempt to find what files does blahuser exist.

I opened an F5 case, I created a qkview file and uploaded it to iHealth and then clicked Files inside that qkview and unchecked Limit to log files and entered in the search box blahuser which showed me the three files I need to remove blahuser from.

  • /config/bigip/auth/userrolepartitions
  • /config/bigip_user.conf
  • /etc/passwd

Ran the verify command again that I ran above and it passed (no errors).  Rebooted the BIG-IQ CM and it came up with no issues/errors. 

Tried creating blahuser and it still errors out

error_Adding.png.9056cec76265991b413b0bdf14f545f8.png

I just created a blahuserTST and that worked.  As an extra precaution I did a tmsh save /sys config and I was able to reboot with no errors.

Problem is solved except for the inability to recreate the user which isn't a huge deal but would love to know why and the solution which I may look at later.

 

Edited by wildweaselmi
typo

Share this post


Link to post
Share on other sites

×
×
  • Create New...