CentOS 7 cPanel & WHM with Postgresql 13 (Error crontab update_db_cache)
Hi, I need help with cPanel / WHM crontab tasks.
cPanel & WHM Version: v94.0.2
O.S.: CENTOS 7.9
Summing up my scenario, I was in a hosting where the Postgresql version was 12, but when I came to the current hosting, WHM offered only 9. So this generated conflicts in my project and I had to update, take advantage and update Posgresql to version 13.
At first everything works correctly, but I'm getting an error coming from cron jobs that seems to be a standard cPanel / WHM.
When I run the following cron:
The error is this: [QUOTE] Error opening directory "/var/lib/pgsql/13/data/base/0": No such file or directory at /usr/local/cpanel/Cpanel/PostgresAdmin.pm line 96. Need db! at /usr/local/cpanel/Cpanel/DB/Map/Collection/Index.pm line 118.
This error at first does not interfere with the functioning of Postgresql, but I would like to know what this task is for and if possible solve it. Any suggestions regarding this error? More information: What I noticed different about the update is: When upgrading from version 9 to version 13, the service went from postgresql to postgresql-13. As can be seen in the image below, everything is working, including the WHM panel (creation of the config file, users and password change).
# /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cacheThe error is this: [QUOTE] Error opening directory "/var/lib/pgsql/13/data/base/0": No such file or directory at /usr/local/cpanel/Cpanel/PostgresAdmin.pm line 96. Need db! at /usr/local/cpanel/Cpanel/DB/Map/Collection/Index.pm line 118.
This error at first does not interfere with the functioning of Postgresql, but I would like to know what this task is for and if possible solve it. Any suggestions regarding this error? More information: What I noticed different about the update is: When upgrading from version 9 to version 13, the service went from postgresql to postgresql-13. As can be seen in the image below, everything is working, including the WHM panel (creation of the config file, users and password change).
-
Hey there! cPanel only supports PostGreSQL versions that are installed from /scripts/installpostgres script, so if there is anything different than the default of version 9 on the machine, you'll run into those errors. In this case, our update_db_cache script is looking for a specific structure that doesn't exist in version 13. While you're welcome to run that version of PostGreSQL, we can't say it will be compatible with all cPanel tools. 0 -
Hi @cPRex, thanks for answering this topic. What does update_db_cache really do? Can I disable it from cron to avoid these errors or is it not recommended? In the current hosting I'm using MySQL and PostgreSQL. 0 -
That script clears cached data from files in /var/cpanel/datastore that are used for various internal operations, so I can't recommend shutting that one off as that could have further unintended consequences. 0 -
ok, is there any way for me to get around this? because I am receiving 3 to 4 emails a day with this error. I wish I could really correct or do something about it. 0 -
The only thing I can recommend on my end would be to remove the custom installation of PostGres as we don't guarantee that will work properly with cPanel tools. 0 -
Oooh no! :( I really like cPanel / WHM it helps some processes in a way. However, I believe that it is a pity not to be able to update and be able to use the latest technologies that are already in the digital world for a long time. I have no way of being stuck with a version of a database that is already outdated which is the heart of an application. As a senior developer I'm really sorry for that. I'm coming from AWS RDS, I believed that WHM was more "flexible" than I just realized. As you can see, the PostgreSQL maintainer encourages the update. [QUOTE] 0 -
Did you find a workaround on this? Im on the same boat, i tried to create a directory 0 on this path: "/var/lib/pgsql/13/data/base/" as the error was "Not such file or directory" and the first error was gone but i still have the "Need db!" error every 4 hours 0 -
Did you find a workaround on this? Im on the same boat, i tried to create a directory 0 on this path: "/var/lib/pgsql/13/data/base/" as the error was "Not such file or directory" and the first error was gone but i still have the "Need db!" error every 4 hours
Hello, I ended up giving up using PostgreSQL with cPanel, I was afraid of having problems. I'm using PostgreSQL separately on AWS RDS. If one day support for PostgreSQL with cPanel is possible I will use it, at the moment I'm still waiting for an update on that.0 -
Support for PostGreSQL is included with cPanel, but you just have to use the version that comes with the operating system you're using. 0 -
Ok, I think that was one of the points of my question about PostgreSQL some time ago. I have projects in newer versions of PostgreSQL but cPanel only accepted the system version, in this case I couldn't migrate because of that. I believe that if I had a manager as ugly for MySQL or MariaDB it would be very useful in the matter of using PostgreSQL with cPanel. 0
Please sign in to leave a comment.
Comments
11 comments