Issue Setting up local 13 instance with SugarDockerized

Hello! I'm trying to spin up a local instance of my 13.3 Sugar environment using SugarDockerized and following this support article:
https://support.sugarcrm.com/resources/environments/development_environments/docker-development-environment/#Vagrant_Setup

During step 3, when I run the installfromzip.sh command, I get an error that the system was not installed properly.

This is the command I run:

./utilities/installfromzip.sh /Users/kaitlintomkosky/deployer/storage/sugar/installers/13.3.3/SugarEnt-13.3.0.zip

And this is the output:

Cleaning up previous install (./data/app/sugar) if any, please wait...
Unzipping /Users/kaitlintomkosky/deployer/storage/sugar/installers/13.3.3/SugarEnt-13.3.0.zip, please wait...
Done
Fixing Sugar permissions, please wait...
Done
Restarting sugar-web1 container, please wait...
Done
Restarting sugar-cron container, please wait...
Done
Deleting all previous redis values
Done
Deleting all previous Elasticsearch indices, please wait...
Done
bash: line 1: ./config_si.php: No such file or directory
The silent installer configuration has been deployed into the sugar instance
bash: line 1: ./config_override.php: No such file or directory
The config override configuration has been deployed into the sugar instance
Running installation, please wait...
curl: (22) The requested URL returned error: 404 Not Found

Installation completed!

You can now access the instance on your browser with http://docker.local/sugar
Executing script ./data/app/initsystem.php
The system is not installed successfully, please try again
Done

I see that all of the docker containers are created, but I noticed that sugar-permissions is not running. I also opened the /data/app/initsystem.php file and found this code that is returning the error message "The system is not installed successfully, please try again" above if the file include/entryPoint.php file does't exist. I checked and the include/entryPoint.php file does exist, so I'm not sure if this is a permissions issue.

Has anyone else run into an issue when running the installfromzip.sh command for a 13 instance?

Any ideas or input would be appreciated! Thanks so much!

  • Hi  ,

    sugar-permissions container will execute only once (apply permissions) and die, and will never execute again (it's a one-time thing), however, it seems to me that you don't have the necessary permissions to extract "SugarEnt-13.3.0.zip" or write to "data/app/sugar" that's why it's failing.

    Please review your local permissions something like this should be enough:

    sudo find . -type d -exec chmod 775 {} \;

    sudo find . -type f -exec chmod 664 {} \;

    SugarCRM | Principal Developer Advocate

  •  thanks for the feedback! I moved my SugarEnt-13.3.0.zip file into my sugardocker folder, and ran the commands to update the permissions within the sugardocker folder, but I'm still getting the same results as before.

  • Thanks for sharing  .. happy coding!

    SugarCRM | Principal Developer Advocate

  •  I moved sugardocker and the zip file into a clean folder and the installfromzip.sh step worked properly, but now I'm running into similar errors when trying to run the restorefromfile.sh command:

    /utilities/restorefromfile.sh /Users/kaitlintomkosky/Documents/sugardev/moveinready.gz 

    Starting restore at Wed Apr  3 09:25:27 MDT 2024

    Cleaning up previous install (./data/app/sugar) if any, please wait...

    Decompressing /Users/kaitlintomkosky/Documents/sugardev/moveinready.gz, please wait...

    Restoring application files

    Application files restored

    Restoring database

    Database "sugar" dropped

    mysql: [Warning] Using a password on the command line interface can be insecure.

    mysql: [Warning] Using a password on the command line interface can be insecure.

    Database restored

    Dockerizing Backup config files...

    Cleaning up please wait...

    Fixing Sugar permissions, please wait...

    Done

    Restarting sugar-web1 container, please wait...

    Done

    Restarting sugar-cron container, please wait...

    Done

    Deleting all previous redis values

    Done

    Deleting all previous Elasticsearch indices, please wait...

    Done

    Repairing system

    Could not open input file: simpleRepair.php

    System repaired

    Performing Elasticsearch re-index

    bash: line 1: ./bin/sugarcrm: No such file or directory

    Restore completed!

    Restore finished at Wed Apr  3 09:28:47 MDT 2024

  •  interesting, that tells me the decompressing went wrong, or the file structure expected by the script has failed..

    as you can see, simpleRepair is copied over to data/app/sugar which is supposed to exist (decompressing does few things and renames to sugar).. did you download that "moveinready.gz" from a cloud backup?

                cp ./utilities/build/simpleRepair.php ./data/app/sugar
    

    SugarCRM | Principal Developer Advocate

  •  thank you so much! I re-downloaded the backup from sugar and I made it a bit further this time. the restorefromfile.sh finished but had this message a ton of times while reindexing:

    Performing Elasticsearch re-index

    Scheduling reindex ... 

    PHP Warning:  Only the first byte will be assigned to the string offset in /var/www/html/sugar/src/Elasticsearch/Adapter/Client.php on line 454

    PHP Warning:  foreach() argument must be of type array|object, string given in /var/www/html/sugar/vendor/ruflin/elastica/src/Transport/Http.php on line 200




    I'm now able to login into the sugar instance, but get a 500 server error everywhere with this in the console:

    display_stack_trace caller, file: /var/www/html/sugar/include/database/DBManagerFactory.php line#: 88
    /var/www/html/sugar/include/database/DBManagerFactory.php[L:156](DBManagerFactory:getTypeInstance)
    /var/www/html/sugar/clients/base/api/FilterApi.php[L:583](DBManagerFactory:getInstance)
    /var/www/html/sugar/clients/base/api/FilterApi.php[L:412](FilterApi:getQueryObject)
    /var/www/html/sugar/clients/base/api/FilterApi.php[L:395](FilterApi:createQuery)
    /var/www/html/sugar/clients/base/api/FilterApi.php[L:471](FilterApi:filterListSetup)
    /var/www/html/sugar/include/api/RestService.php[L:317](FilterApi:filterList)
    /var/www/html/sugar/api/rest.php[L:26](RestService:execute)
    Cannot load DB manager

  • I think is time for us to connect and get you going, something is up with your filesystem.. I'll contact you directly.

    SugarCRM | Principal Developer Advocate