What is Cause of this Error and How to Fix? : Got error 'Primary script unknown'

if it is not in the error log of the domain itself, it is far away from having anything to do with your htaccess. because that means exactly that: it does not even have a domain related vhost involved.

it is probably some request hitting the IP directly and not even a domain name. or an old domain name of a former owner of that IP that might still point there but does not exist in your setup. that’s why it ends up in the general apache2 log.

I just checked and /var/log/apache2/access.log is empty on my servers too. logging at that level is probably just not configured or turned off on purpose because everything there is wrong traffic anyway. to be fair I am too lazy to dig that up now. it’s noise and I rather prefer to not have that noise fill up my logfiles on top.

TL;DR; ignore it.

1 Like

Thanks @falzo! I will ignore it. I appreciate yours and eris wealth of knowledge.

And that makes more sense, given I changed the IP address of the server, when I built the new DigitalOcean droplet for this HestiaCP server.

It’s a bit late now, but if I were to do it again, I think it would have been better to build the server and then restore the image onto the existing server IP address. As I have had that IP for many years. I notice that Gmail is rate limiting some of the email I am forwarding over to them. I don’t know if this is because of the new IP address on the server or other things I need to check, but perhaps it’s related.

Anyway, another battle for another day. Thanks so much!

most likely. IPs earn a reputation (good or bad) over time, especially when it comes to mail. forwarding on top is a rather bad practise nowadays because your system will also forward spam mails and for gmail the origin of these spam mails are your IP and therefore it will hurt its reputation.

but as you said, that definitely is a totally different battle and an even more complex one.

Indeed, that’s why I typically implement spam assassin with strict rules and I have the server delete anything with a spam score over 10. This way it doesn’t get forwarded on to gmail. I had that battle in the past and I think it resolved itself. I’m guessing it could be just because this is a new IP address and I need to improve the reputation.

Btw, while I was investigating the above issue, I noticed that my apache error.log was flooded with these phpmyadmin failed to load errors. There is more than 100 of them and all within seconds of each other.

I assume this is some kind of brute-force attack? Is this just noise or something I should look into? Thanks!

[Mon May 03 23:57:10.064910 2021] [proxy_fcgi:error] [pid 508395:tid 139630275958528] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'
[Mon May 03 23:57:11.928087 2021] [proxy_fcgi:error] [pid 508395:tid 139630423525120] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'
[Mon May 03 23:57:17.449325 2021] [proxy_fcgi:error] [pid 508396:tid 139630275958528] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'
[Mon May 03 23:57:20.438889 2021] [proxy_fcgi:error] [pid 508396:tid 139630166853376] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'
[Mon May 03 23:57:23.523171 2021] [proxy_fcgi:error] [pid 508395:tid 139630250780416] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'
[Mon May 03 23:57:30.932029 2021] [proxy_fcgi:error] [pid 508396:tid 139630431917824] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'
[Mon May 03 23:57:33.716355 2021] [proxy_fcgi:error] [pid 508396:tid 139630259173120] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'
[Mon May 03 23:57:34.829349 2021] [proxy_fcgi:error] [pid 508395:tid 139630183638784] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'
[Mon May 03 23:57:35.815561 2021] [proxy_fcgi:error] [pid 508396:tid 139630267565824] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'
[Mon May 03 23:57:37.018177 2021] [proxy_fcgi:error] [pid 508396:tid 139630301136640] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'
[Mon May 03 23:57:40.856900 2021] [proxy_fcgi:error] [pid 508395:tid 139630284351232] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'
[Mon May 03 23:57:42.908818 2021] [proxy_fcgi:error] [pid 508396:tid 139630225602304] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'
[Mon May 03 23:57:43.865481 2021] [proxy_fcgi:error] [pid 508396:tid 139630175246080] [client 78.138.43.43:0] AH01071: Got error 'PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.'

It seems are all from the same IP 78.138.43.43. My guess is that you have some misconfiguration somewhere in your server. Just my 2p opinion.

Known issue we should adress in 1.4

1 Like

Thanks @eris - duly noted. I will document this as a known issue and look for a resolution in 1.4. Thanks for confirming and the quick response.

@eris - Do you guys have a targeted date for the 1.4 release? Is there some manual fix I can deploy for now?

I found some other forum post on this topic, not sure their solution would apply to ours, but it seems this could just be a folder permission issue. Can you please share if it’s a fairly easy fix. Thanks!

Hi @eris - Just checking in on this. I noticed from my weekly error log report that this issue is still present, even though I have upgraded to HestiaCP 1.4.

I saw this in the error log today:

[Sun Jun 06 21:34:21.962601 2021] [proxy_fcgi:error] [pid 107040:tid 140671973316352] [client 211.75.58.114:0] AH01071: Got error ‘PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.’

Is there something I need to manually do or configure after HestiaCP is upgrade to 1.4 for this fix to be put in place?

Thanks!

Make sure you used the manual upgrade script found in /usr/local/hestia/instal/upgrade/manual/

Thanks @eris!

I missed that in the update log notes. I attempted to run that script, but it appears to have some issue:

Here is what I get:

root@srv01:/usr/local/hestia/install/upgrade/manual# sh /usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh

/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 10: source: not found

/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 12: source: not found

/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 13: source: not found

For deleting PHPmyAdmin you will need confirm the removal with root password. Password can be found in /usr/local/hestia/conf/mysql.conf

Would you like to continue? [y/n]/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 21: read: arg count

/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 23: [[: not found

root@srv01:/usr/local/hestia/install/upgrade/manual# 

Please note, I see that it’s asking a question to confirm the password, but I am not even given a chance to provide the password. I’m currently running 1.4.1 if it helps. Should I first upgrade to 1.4.2 and then attempt this again?

Okay, I upgrade to 1.4.2 successfully. And I noticed the same issue when trying to run the script with:
sh scriptname.sh, so I tried simply running with ./scriptname.sh. Which appeared to work, but then a different problem.

root@srv01:/usr/local/hestia/install/upgrade/manual# ./migrate_phpmyadmin.sh

For deleting PHPmyAdmin you will need confirm the removal with root password. Password can be found in /usr/local/hestia/conf/mysql.conf

Would you like to continue? [y/n]y

[ * ] Make backup old config files

[ * ] Remove PHPmyAdmin via ATP

phpmyadmin set on hold.

[ * ] Delete possible trail

[ * ] Create new folders

[ * ] Installing phpMyAdmin version v5.1.0...

tar (child): phpMyAdmin-5.1.0-all-languages.tar.gz: Cannot open: No such file or directory

tar (child): Error is not recoverable: exiting now

tar: Child returned status 2

tar: Error is not recoverable: exiting now

cp: cannot stat 'phpMyAdmin-5.1.0-all-languages/*': No such file or directory

sed: can't read /usr/share/phpmyadmin/libraries/vendor_config.php: No such file or directory

sed: can't read /usr/share/phpmyadmin/libraries/vendor_config.php: No such file or directory

[ * ] Createing localhost config

[ * ] Drop database could throw a error if successfull removal was preformed

[ * ] Create new user

[ * ] Create new database

root@srv01:/usr/local/hestia/install/upgrade/manual#

So it appears this is not working.

Also, attempting to access phpmydmin from the HestiaCP link results in this:

Screen Shot 2021-06-07 at 2.16.15 PM
Screen Shot 2021-06-07 at 2.16.20 PM

tar (child): phpMyAdmin-5.1.0-all-languages.tar.gz: Cannot open: No such file or directory
It didn’t download phpmyadmin properly…

Thanks, so should I wget this file into a specific directory? I would assume the script would do that action. Is there any instructions on how to do the manual update. Sorry if I missed it, but I assume I should just run the script and it will take care of all of this.

If you could point me in the direction to the instruction/knowlege doc that would be great.

There are no instructions available…

And config.inc.php

I have executed the script probally 100 of times and never had issues…

hmmm, I think I might have found the root cause. Internet connection outbound appears to be somehow dead on the server. Websites are still being served (although a big slow) and I can still remotely log in via SSH, but it seems it can’t connect to external servers. I guess that’s why the phpmyadmin file is not getting downloaded.

I was just curious and attempted to run update and upgrade and noticed the issue.

I posted a new question here as it appears to be related to after I upgraded to 1.4.2.

Any idea what’s going on? Seems to be related to the 1.4.2 update. Server was working just fine before I ran the update.

This was an issue in 1.4.1 it should be fixed for 1.4.2…

1 Like

THANK YOU!

All working now and recovered. It did seem the issue with the phpmyadmin manual upgrade script was due to that firewall issue. Once I ran the commands you provided, apt update and upgrade resumed working properly. I then was able to successfully run the phpmyadmin script and it successfully downloaded the file and upgrade phpmyadmin.

I also rebooted the server to make sure things remained intact and I was able to run update and upgrade again with no problem.

Thanks for the quick response and help. I was worried I was going to have to do a restore from a DigitalOcean backup. Thanks for saving me the time!

For anyone else that ends up on this thread. The commands eris provided me with to restore the firewall issue and connectivity, can be found here:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.