Page 1 of 1

Unable to restore workspace

Posted: Mon Jan 28, 2019 5:07 am
by kleung
Hi,

I have done some development with Bitnami PM community version 3.2.1-0 on Window 10. I'm going to migrate the development to Linux also using Bitnami PM community version 3.2.1-0.

The line
lower_case_table_names = 1
is added to my.cnf

The workflow.tar file is located at /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/shared/backups

Then after issuing the command
WIL:/opt/processmaker-3.2.1-0/apps/processmaker/htdocs # /opt/processmaker-3.2.1-0/php/bin/php processmaker workspace-restore -o workflow

The following messages came up.
Restoring from /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/shared/backups/workflow.tar
Found 1 workspaces in backup:
-> workflow.meta

Warning: A workspace from a newer version of ProcessMaker can NOT be restored in an older version of
ProcessMaker. For example, restoring from v.3.0 to v.2.5 will not work. However, it may be possible
to restore a workspace from an older version to an newer version of ProcessMaker, although error
messages may be displayed during the restore process.
> Restoring workflow to workflow
> Workspace workflow already exist, overwriting!
+> Restoring directory 'workflow.files'
> Changing file permissions
> Connecting to system database in 'localhost'
+> Restoring database bitnami_pm to bitnami_pm
> Verify files enterprise old...
Without changes...
<*> Verify took 0.00099515914916992 seconds.
> Verify License Enterprise...
An internal error occurred #1548662496. Please contact your system administrator for more information.

However, I could not find the error message of #1548662496 either from PM or Bitnami website.

I also found the following two lines in my console.
PHP Notice: Undefined property: workspaceTools::$dbGrantUserPassword in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/workflow/engine/classes/class.wsTools.php on line 1786


PHP Notice: Undefined property: workspaceTools::$dbGrantUserPassword in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/workflow/engine/classes/class.wsTools.php on line 1787

When I tried to login the PM with a browser, the following error message came up.
System Exception.
RuntimeException:
[wrapped: connect failed [Native Error: Access denied for user 'bn_processmaker'@'localhost' (using password: YES)] [User Info: bn_processmaker]]
1. At Propel::getConnection()
in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/gulliver/system/class.g.php line 1715
2. At G::sqlEscape()
in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/gulliver/system/class.g.php line 1780
3. At G::replaceDataField()
in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/gulliver/system/class.xmlform.php line 4440
4. At XmlForm_Field_JavaScript->render()
in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/gulliver/system/class.xmlformTemplate.php line 248
5. At xmlformTemplate->getFields()
in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/gulliver/system/class.xmlformTemplate.php line 332
6. At xmlformTemplate->printObject()
in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/gulliver/system/class.form.php line 240
7. At Form->render()
in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/gulliver/system/class.publisher.php line 276
8. At Publisher->RenderContent0()
in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/gulliver/system/class.publisher.php line 84
9. At Publisher->AddContent()
in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/workflow/engine/methods/login/login.php line 197
10. At require_once() in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/workflow/public_html/sysGeneric.php line 1045
11. At include() in /opt/processmaker-3.2.1-0/apps/processmaker/htdocs/workflow/public_html/app.php line 61

Grateful if I can be advised to fix the problem and restore the workspace.

Thousand Thanks.

cheers,
Karl

Re: Unable to restore workspace

Posted: Tue Jan 29, 2019 12:53 am
by amosbatto
This looks like a bug. Please register it at http://bugs.processmaker.com

Let's try something. Follow these instructions to add a 'bn_processmaker'@'localhost' user in in your installation MySQL. Does that fix the problem?

If not, then I think that the best solution is for you to do a manual install in Linux and then manually move the workspace's files and database to the Linux install. What Linux distro and version are you using?

I'm planning on writing up instructions on http://www.pmusers.com on how to move a workspace from a Bitnami installation to a manual installation. Check back in two days and I'll post a link to the new page when I finish creating it.

Re: Unable to restore workspace

Posted: Wed Jan 30, 2019 12:16 am
by kleung
Hi Amos,

thank you for your advice.

I tried to Add a duplicate user in MySQL with the host 127.0.0.1 as per advice following the instructions in https://www.pmusers.com/index.php/Creat ... _127.0.0.1

However, after entering the password of bn_processmaker, the following error message came up.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock" (2)

Please advise.

Many Thanks.

cheers,
karl

Re: Unable to restore workspace

Posted: Wed Jan 30, 2019 12:18 am
by kleung
Hi Amos,

the Linux I'm using is OpenSUSE Leap 15.0.

cheers,
Karl

Re: Unable to restore workspace

Posted: Wed Jan 30, 2019 1:31 am
by amosbatto
If you copied the password from the text in the wiki, then you did it wrong. You need to copy the password from the existing user in your database.

Re: Unable to restore workspace

Posted: Wed Jan 30, 2019 2:09 am
by kleung
I copied the passwd from the result after connecting to http://{your-ip-or-domain}/sysworkflow/en/neoclassic/services/test
not the passwd of Wiki.

Re: Unable to restore workspace

Posted: Thu Jan 31, 2019 5:40 am
by amosbatto
I have written up instructions how to migrate from a Bitnami install to a manual install of ProcessMaker:
https://www.pmusers.com/index.php/Migra ... al_install

(I haven't tested this in all systems, so I might have to add some extra instructions.)

Re: Unable to restore workspace

Posted: Thu Jan 31, 2019 10:40 pm
by kleung
Thank you Amos.
I'll try it.

Re: Unable to restore workspace

Posted: Fri Feb 01, 2019 4:49 am
by kleung
Hi Amos,

with reference to https://www.pmusers.com/index.php/Migra ... al_install

after issuing the command
mysqldump -host 127.0.0.1 -u bn_processmaker -p bitnami_pm --single-transaction --quick --lock-tables=false > C:\Users\Administrator\workflow-backup.sql and have passwd input
on Window Bitnami installation, I got the following error message

mysqldump: Got error: 2005: Unknown MySQL server host 'ost' (2) when trying to connect

The same error message came up with Apache up or shutdown.

Please advise.

cheers,
Karl

Re: Unable to restore workspace

Posted: Fri Feb 01, 2019 10:07 pm
by amosbatto
Oh sorry, I wrote that up in a hurry from memory.

The command should be:
mysqldump -h 127.0.0.1 -u bn_processmaker -p bitnami_pm --single-transaction --quick --lock-tables=false > C:\Users\Administrator\workflow-backup.sql

Change -host to -h

If it doesn't work, then don't bother specifying the host. It shouldn't be necessary if you are logging in on the same machine as MySQL:
mysqldump -u bn_processmaker -p bitnami_pm --single-transaction --quick --lock-tables=false > C:\Users\Administrator\workflow-backup.sql