The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Recently since 11.60 random Aliases appear as ARRAY(0x1854394)

Discussion in 'User Experience' started by Metro2, Jan 20, 2017.

Tags:
  1. Metro2

    Metro2 Well-Known Member

    Joined:
    May 24, 2006
    Messages:
    394
    Likes Received:
    17
    Trophy Points:
    168
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    I just happened to notice that recently in some of my user's cPanel > Aliases (formerly Parked Domains) section, there's suddenly the word ARRAY with seemingly random id generated next to it. For example - ARRAY(0x1854394) - where basically any combination of numbers appears after the 0x , and it's not happening in all accounts, just some.

    I've tried things like:

    - Checking /var/cpanel/userdata/username/ for extra or unusual items. Nothing found.

    - SSH in to root and "locate 0x1854394" , no results.

    - Using the "Remove Alias" button in user's cPanel. Only returns the following error:

    There was a problem removing the alias. Park::unpark(ARRAY(0x1854394)) failed: You do not have control of the domain “array”.

    Has anyone else ever encountered this?

    I'm running CloudLinux 6.7 , WHM/cPanel 11.60.35 (Release tier) , Apache 2.4.25 , PHP 5.6.29

    Thanks for any potential feedback!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you verify if these entries exist under the DNS= values in the /var/cpanel/users/$username file? If so, does modifying those entries and running the "/scripts/updateuserdomains" command address the issue?

    Thank you.
     
  3. Metro2

    Metro2 Well-Known Member

    Joined:
    May 24, 2006
    Messages:
    394
    Likes Received:
    17
    Trophy Points:
    168
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Thank you for responding.

    No, the entries do not exist under the under the DNS= values in the /var/cpanel/users/$username file.

    I had the opportunity to also test this on an account this morning after I literally emptied it of all content, emails, db's, and any customizations. Since I was already going to delete the user's account this morning, I went into their cPanel and removed everything / completely cleaned it up, and then attempted to remove the bogus "Alias" one more time (in hopes that maybe it would succeed and could therefore be somehow linked to a specific cPanel feature) , but still the same result. :(

    Screenshots attached.

    cannot_remove_alias_array_0.jpg cannot_remove_alias_array_1.jpg cannot_remove_alias_array_2.jpg cannot_remove_alias_array_3.jpg
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  5. Metro2

    Metro2 Well-Known Member

    Joined:
    May 24, 2006
    Messages:
    394
    Likes Received:
    17
    Trophy Points:
    168
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    UPDATE:

    As it turns out, this appears a rare bug but I'm not the only host that cPanel Level 2 support has seen encounter it. They mentioned they've seen it in 3 or 4 other cases but the root cause is yet unknown, and a meta case is going to be opened for further investigation.

    Luckily I was able to get this solved with the help of awesome cPanel techs. Ultimately Jason T. from cPanel came up with a solution to fix it, and Aaron H. from cPanel assisted me with one of the commands I was missing (thanks guys!!).

    Just in case anyone else ever runs into this bug, here's the main info and commands that resolved it for me:

    What seems to be happening is that the userdata files are being modified with the incorrect syntax. The way to fix this is to remove the erroneous lines from the files in /var/cpanel/userdata/$user/main,cache and /var/cpanel/users/$user, then rebuild the configuration files.

    So, after making a backup of the httpd.conf and everything in /var/cpanel/userdata/ these are the commands that worked to remove all the stubborn false Aliases from all user cPanels:

    Code:
    ===
    # grep array /var/cpanel/userdata/*/main -l | uniq -u | while read i ; do sed -i -E '/array\(/d' "$i" ;done
    
    # grep -zEl "parked_domains:(\s|\n)+ - \[\]" /var/cpanel/userdata/*/main|while read i;do sed -i ':a;$!N;s/\n - \[\]/[]/;ta;P;D' "$i";done
    
    # find /var/cpanel/userdata -type f \! \( -name \*.cache -o -name cache -o -name cache.json \) -exec grep -lP "^serveralias.*ARRAY\([0-9xa-f]+\)" '{}' \;|while read i;do sed -i -E '/^serveralias.*ARRAY/{s/(www.)?ARRAY\(0x[0-9a-f]+\) //g}' "$i";done
    
    # /scripts/updateuserdomains --force
    
    # /scripts/updateuserdatacache --force
    
    # /scripts/rebuildhttpdconf
    
    # grep array /var/cpanel/userdata/*/main -l
    ===

    I hope this info can help someone else someday.

    Much thanks to all the cPanel tech team and especially Jason T. for coming up with the fix!
     
    cPanelMichael likes this.
  6. Metro2

    Metro2 Well-Known Member

    Joined:
    May 24, 2006
    Messages:
    394
    Likes Received:
    17
    Trophy Points:
    168
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    ANOTHER UPDATE:

    As it turns out, even though solution I posted above (that Jason T. provided) gets rid of the false "Array" Aliases sitting in user's cPanel > Aliases area and they can create their own Aliases (parked domains) again....

    ...there IS one remaining issue left behind:

    It still leaves zone entries for all of the bogus "Array" Aliases showing in user's cPanel > Zone Editor area and cPanel > Advanced DNS Zone Editor area.

    This is an ongoing case open with cPanel devs and from what I've been told so far, it seems to only be affecting servers running CloudLinux 6.8 with EasyApache 3.

    cPanel's Jason T. came up with a way to hide those entries until a real solution for this bug is discovered.

    He said it's done
    And he kindly provided the following commands:

    Code:
    ===
    # tar -zcvf /root/cptechsjt/usersbak/users.tar.gz /var/cpanel/users/*
    ===
    The above command archived the files to /root/cptechsjt/usersbak/users.tar.gz. (NOTE - you would make your own backup folder location first)

    Then, clean up the user files by using this command:

    Code:
    ===
    # cd /var/cpanel/users ; for i in `grep -Pli 'array\(' *` ; do sed -i.bak -E 's/(^DNS.*array\(.*$)/X\1/' $i ; done
    ===
    This command also creates a backup copy of the user file by appending .bak to the end of it, which improves the ability to roll back from any changes.

    So again, this is an ongoing case and I'll keep updating this thread as more info becomes available to me since they've become aware of several more cases of this with other users / hosts, and maybe this info will help someone else.
     
    cPanelMichael and Infopro like this.
  7. Metro2

    Metro2 Well-Known Member

    Joined:
    May 24, 2006
    Messages:
    394
    Likes Received:
    17
    Trophy Points:
    168
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Another update:

    The saga continues (if you happen to be running CloudLinux 6.8 and EasyApache 3) but there is progress being made.

    The false "Array" Aliases tend to re-appear even after running all of the commands provided in my previous posts. So, a few things of note at this time:

    1. cPanel developers have been working on fixes for the open case related to this - CPANEL-11785 - and it looks like the fix has made it to "Current" release tier.

    2. It seems like I've found a way to remove the false Aliases after they re-appear and make them *stay* gone. This is very tedious if you have a lot of accounts / servers, but after they re-appeared I removed them all via the WHM > Account Information > Parked Domains tool a few days ago, and so far they have not come back. (Fingers crossed it stays that way)

    3. If you have any stubborn false Aliases that cannot be removed via any the methods mentioned in this thread, then edit the file for that user at /var/cpanel/userdata/$user/main

    And look for the existence of this:
    --
    parked_domains:
    - []
    --

    And change it to this:
    --
    parked_domains: []
    --

    And then:
    # /scripts/updateuserdomains --force
    # /scripts/updateuserdatacache --force
    # /scripts/rebuildhttpdconf

    DISCLAIMER - I'm only posting what has worked for me based on the advice of cPanel technicians who have been working closely with users and developers on this issue. Your results may vary and it's prudent to make backups of everything you intend to edit before-hand so you can quickly revert if necessary.

    Special thanks to the cPanel Support team
    who have been so helpful and responsive to this issue and working the open case related to this bug. There are too many involved now to name them all. When I first opened the ticket regarding this, nobody had heard of it initially, but then a cPanel analyst stepped in and said he was aware of a few other instances, so we began using my initial reports along with one of my servers for CP support to examine for reference while CP support started working with the devs on the aforementioned cases which has resulted in forthcoming solutions in updates. This has been a real stickler of a bug and I would have lost my mind without the help of the cPanel analysts that have been directly corresponding with me on it!
     
    cPanelMichael likes this.
Loading...

Share This Page