Page 1 of 1

Zend Server docker problem

Posted: Thu Oct 11, 2018 10:17 pm
by alek76
I formated my macbook and installed latest version of everything (OSX, docker, zend-server) from scratch. I am using Docker for mac along with Kitematic. I am using the latest version of the official image from the docker store.

The machine builds, starts up and shows the activation wizard. However, I can't complete the wizard.

- First screen I accept the user agreement and click "next"
- Second screen I select "development" and click "next"
- Fird screen i put in "password" into the first two fields and leave the other 2 fields blank
- The fouth screen I click "Launch" and it says "Please wait, storing configuration... " for 2 minutes. After that I get a red error message "Bootstrap was not completed: Zend Server could complete the bootstrap process due to a fatal error".

When I inspect the XHR call I see a message:

Code: Select all

{
  "success": false,
  "message": "Failed to set user details in bootstrap: Set Profile; Statement could not be executed (HY000 - 5 - database is locked)",
  "trace": [
    {
      "file": "/usr/local/zend/gui/module/Application/src/Bootstrap/Controller/BootstrapController.php",
      "line": 163,
      "function": "bootstrapSingleServer",
      "class": "Bootstrap\\Mapper",
      "type": "->",
      "args": [
        1
      ]
    },
    {
      "file": "/usr/local/zend/gui/vendor/ZF2/library/Zend/Mvc/Controller/AbstractActionController.php",
      "line": 82,
      "function": "saveAction",
      "class": "Bootstrap\\Controller\\BootstrapController",
      "type": "->",
      "args": []
    },
    {
      "function": "onDispatch",
      "class": "Zend\\Mvc\\Controller\\AbstractActionController",
      "type": "->",
      "args": [
        {}
      ]
    },
    {
      "file": "/usr/local/zend/gui/vendor/ZF2/library/Zend/EventManager/EventManager.php",
      "line": 444,
      "function": "call_user_func",
      "args": [
        [
          {},
          "onDispatch"
        ],
        {}
      ]
    },
    {
      "file": "/usr/local/zend/gui/vendor/ZF2/library/Zend/EventManager/EventManager.php",
      "line": 205,
      "function": "triggerListeners",
      "class": "Zend\\EventManager\\EventManager",
      "type": "->",
      "args": [
        "dispatch",
        {},
        {}
      ]
    },
    {
      "file": "/usr/local/zend/gui/vendor/ZF2/library/Zend/Mvc/Controller/AbstractController.php",
      "line": 118,
      "function": "trigger",
      "class": "Zend\\EventManager\\EventManager",
      "type": "->",
      "args": [
        "dispatch",
        {},
        {}
      ]
    },
    {
      "file": "/usr/local/zend/gui/vendor/ZF2/library/Zend/Mvc/DispatchListener.php",
      "line": 93,
      "function": "dispatch",
      "class": "Zend\\Mvc\\Controller\\AbstractController",
      "type": "->",
      "args": [
        {},
        {}
      ]
    },
    {
      "function": "onDispatch",
      "class": "Zend\\Mvc\\DispatchListener",
      "type": "->",
      "args": [
        {}
      ]
    },
    {
      "file": "/usr/local/zend/gui/vendor/ZF2/library/Zend/EventManager/EventManager.php",
      "line": 444,
      "function": "call_user_func",
      "args": [
        [
          {},
          "onDispatch"
        ],
        {}
      ]
    },
    {
      "file": "/usr/local/zend/gui/vendor/ZF2/library/Zend/EventManager/EventManager.php",
      "line": 205,
      "function": "triggerListeners",
      "class": "Zend\\EventManager\\EventManager",
      "type": "->",
      "args": [
        "dispatch",
        {},
        {}
      ]
    },
    {
      "file": "/usr/local/zend/gui/vendor/ZF2/library/Zend/Mvc/Application.php",
      "line": 314,
      "function": "trigger",
      "class": "Zend\\EventManager\\EventManager",
      "type": "->",
      "args": [
        "dispatch",
        {},
        {}
      ]
    },
    {
      "file": "/usr/local/zend/gui/public/index.php",
      "line": 23,
      "function": "run",
      "class": "Zend\\Mvc\\Application",
      "type": "->",
      "args": []
    }
  ]
}
After doing some digging I found that this is relayed to an issue with the SQLite DB used by the GUI. Prevues times I had to change the permissions of the DB folder /usr/local/zend/var/db to 777 to get it to work but this didn't help.

It seems that the zsd.db file is locked during the storing configuration process:

Code: Select all

-rw-rw-r-- 1 zend www-data 488K Oct 11 15:36 zsd.db
-rw-rw-r-- 1 zend www-data  21K Oct 11 20:27 zsd.db-journal
sqlite3 zsd.db
sqlite> .tables
Error: database is locked
After the process finishes and I get the error it is unlocked again.

Can anyone help?

thank you

Re: Zend Server docker problem

Posted: Mon Oct 15, 2018 1:11 pm
by davidl71
Docker containers should not ask you to complete the activation wizard. Please start a new container in your environment, let it run for about 2 minutes and then export it using the command "docker export --output="latest.tar" red_panda;gzip latest.tar" and share it with me so I can analyse it.

Re: Zend Server docker problem

Posted: Mon Oct 15, 2018 10:02 pm
by alek76
Here it is:

https://alexdir.com/tst/latest.tar.gz

thank you very much!

Re: Zend Server docker problem

Posted: Thu Nov 01, 2018 11:29 pm
by alek76
Update: I fixed this. For anyone having this problem on MacOS X here is what I did. I removed all apps downloaded from the docker website.

Then I followed this guide to install docker via homebrew:

After that I cloned the official repo to a local directory:

After that I built the image and then I run it.