500 Server Error SugarEnterprise v12.3.0 - Cannot load DB manager

Hello Everyone!

I would like to ask just in case anyone encounters the error that I am encountering right now. I requested a SugarCRM Enterprise 12.3.0 backup from the cloud, and I want to install it locally for development purposes. I restore the the SugarCRM and database to my local instance but I got this error below:

Steps on restoring the backup on my local:
1. Create a Sugar Vagrant instance "sugarcrm/php80es716"
2. Copy the CRM to the Vagrant Instance and Restore database
3. Update the memory_limit in php.ini from 512MB to 1G (Because if the latter setup is 512MB, I get a blank page only)

CRM Error:

SugarCRM Logs:

Php Error Logs:

Hopping someone can help me with this concern.

Regards,

Clinton Canarias

Parents
  • This may be a simple directory permissions issue - that is what I would check first.

    Although I use VirtualBox not Vagrant (and Enrico's excellent SugarDockerized [*] ) I often get a similar issue when I have forgotten to update the directory permissions. My experience with restoring clones from downloaded cloud instances is that they always unpack with directory permissions only set for the owner. I always get similar errors until I remember to allow at least Read and Execute permissions to the group and other users. Without Execute permissions the Apache user cannot enter directories to read the contents. In *nix the following at the Sugar root directory should set the permissions for the "other" users:

    chmod -R o+rX *

    For those not familiar with *nix or bash, using an upper case "X" for the execute bit sets that only for directories and the -R flag sets the permissions recursively. As far as I know up to now, in a default installation no files need execute permissions and for safety none should be set.

    You may also need to use a:

    sudo chown -R {username} *

    to update the ownership of the file tree depending on the setup of your environment.

    This is what I would try first when seeing the errors you are.

    Thanks,

    JH.

    [*] Like you I find the 512Mb is not enough for a 12.3 instance. SugarDockerized uses images for the default PHP container that are set with 512Mb by default for the memory setting. I found I need to alter the Dockerfile in the stacks path to up the memory to 1Gb and use the "local-build" yaml file to pull a container with enough memory to allow the 12.3 instance to function.

  • Hi ,

    Thank you for your response. I already changed the permissions and owner of the files still did not work. But I was able to fix this issue by removing the db configuration below in config.php.

    I don`t know what is the use of this configuration, but when I check my on-premises sugar instance config.php, this configuration is not available. Right now, I am currently exploring what would be the effect by removing of this configuration.

    Regards,

    Clinton Canarias

  • Hi ,

    Done testing, now I tried to save a new record in Accounts Module, I got this error below:

    Tue Mar 28 07:53:46 2023 [891][8a99dcd0-4aad-11e9-8b20-06f590b7be66][FATAL] An exception occurred while executing a query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank, third_party_id, first_name, last_name) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?' at line 1
    Tue Mar 28 07:53:46 2023 [891][8a99dcd0-4aad-11e9-8b20-06f590b7be66][FATAL] An exception happened: (500: db_error) Database failure. Please refer to sugarcrm.log for details.

    (this error also appears when you update an existing records)

    Still got this SQL Syntax error even though I am using the supported platform provided from the SugarCRM website https://support.sugarcrm.com/Resources/Supported_Platforms/Sugar_12.0.x_Supported_Platforms/.

    Additional, can I ask how to use this SugarDocker and what is the Pre-requisite before using?

    Regards,

    Clinton Canarias

  • The db configuration section in config.php is where you store the details of the database connection. You will need this to be both present and correctly set for your local database in order for Sugar to work. If you have managed to log in then at least part of the config is set as the CRM reads the database to check access rights.

    For the SQL error, it looks as though it is trying to read / set fields that are not in the Accounts table. There isn't enough in your images to determine exactly what is going on here. I recommend (on your local instance, not a Sugar cloud one!) switching the logger level to "debug" and re-running the action. You should then get a fuller detail of what the CRM is trying to do in the database and can follow it through to see where the error is.

    SugarDockerized is pretty simple to use, you need a Linux (virtual) machine to run it on. I use latest Ubuntu in VitrualBox but any Linux will do. You need to install docker and docker-compose to the machine. For Ubuntu this is as simple as:

    sudo apt-get install docker docker-compose

    Once the VM is set up, you need to go to that GitHub repo and download the zip file, unzip it to where you want it to run and then use the script tools (or a CLI command) to run the stack required. There are stacks for current and all old versions included which pull in the correct PHP / MySQL versions for the Sugar version.

    There are full instructions on the GitHub repo and in the unpacked zip file. I suggest reading through those first to get an idea of what you need to do. I find this better to use that the Vagrant boxes provided as it offers me more config options and the ability to fire up different configs on the same machine. You can also choose to run a load balanced stack if you want to test that.

    Thanks,

    JH.

Reply
  • The db configuration section in config.php is where you store the details of the database connection. You will need this to be both present and correctly set for your local database in order for Sugar to work. If you have managed to log in then at least part of the config is set as the CRM reads the database to check access rights.

    For the SQL error, it looks as though it is trying to read / set fields that are not in the Accounts table. There isn't enough in your images to determine exactly what is going on here. I recommend (on your local instance, not a Sugar cloud one!) switching the logger level to "debug" and re-running the action. You should then get a fuller detail of what the CRM is trying to do in the database and can follow it through to see where the error is.

    SugarDockerized is pretty simple to use, you need a Linux (virtual) machine to run it on. I use latest Ubuntu in VitrualBox but any Linux will do. You need to install docker and docker-compose to the machine. For Ubuntu this is as simple as:

    sudo apt-get install docker docker-compose

    Once the VM is set up, you need to go to that GitHub repo and download the zip file, unzip it to where you want it to run and then use the script tools (or a CLI command) to run the stack required. There are stacks for current and all old versions included which pull in the correct PHP / MySQL versions for the Sugar version.

    There are full instructions on the GitHub repo and in the unpacked zip file. I suggest reading through those first to get an idea of what you need to do. I find this better to use that the Vagrant boxes provided as it offers me more config options and the ability to fire up different configs on the same machine. You can also choose to run a load balanced stack if you want to test that.

    Thanks,

    JH.

Children