Copied UB Data Migration Pro on the server (Ubuntu 16.04 Nginx PHP7) Have clean Magento 2 install. Went to run:
php -f bin/magento module:enable --clear-static-content Ubertheme_Ubdatamigration and
php -f bin/magento setup:upgrade
and received the following:
[ErrorException]
fopen(/var/www/html/magento2/var/page_cache//mage-tags/mage—ea6_FPC): failed to open stream: Permission denied
I know this has to do with permissions somwhere, have everything set per Magento:
cd <your Magento install dir>
find var vendor pub/static pub/media app/etc var -type f -exec chmod u+w {} \;
find var vendor pub/static pub/media app/etc var -type d -exec chmod u+w {} \;
chmod u+x bin/magento
Any other ideas?
26 answers
Hi [email protected],
Let’s make write permission able to folder at path: /var/www/html/magento2/var/
by run command in your Terminal: chmod -R 777 /var/www/html/magento2/var/
and contact me if you need further assistance!
Regards,
Mall.
Thank you, I did that for both the var and pub folders. Now ran fine.
Now when clicking the UB Data Migration Pro button in the Admin section it says:
Whoops, our bad…
The page you requested was not found, and we have a fine guess why.
If you typed the URL directly, please make sure the spelling is correct.
If you clicked on a link to get here, the link is outdated.
Thoughts?
Hi aaronarc-center,
What version of this tool you are using?
Let’s try open the php file at path: app/code/Ubertheme/Ubdatamigration/Block/Index.php
and find to the code line:
if (strpos($documentRoot, "/{$pubFolder}")) {
and replace it by code line:
if (substr($documentRoot, (strlen($documentRoot) - 3)) == $pubFolder) {
and fress F5 key in your browser and tell me know how it goes.
Regards,
Mall.
I just downloaded the latest version from the site yesterday. UB Data Migration Pro v2.0.4
I made some permission changes on my own and am now to this point:
CException
Application runtime path “/var/www/html/magento2/pub/ub-tool/protected/runtime” is not valid. Please make sure it is a directory writable by the Web server process.
/var/www/html/magento2/pub/ub-tool/yii/base/CApplication.php(293)
281 return $this->_runtimePath; 282 } 283 } 284 285 /** 286 * Sets the directory that stores runtime files. 287 * @param string $path the directory that stores runtime files. 288 * @throws CException if the directory does not exist or is not writable 289 */ 290 public function setRuntimePath($path) 291 { 292 if(($runtimePath=realpath($path))===false || !is_dir($runtimePath) || !is_writable($runtimePath)) 293 throw new CException(Yii::t('yii','Application runtime path "{path}" is not valid. Please make sure it is a directory writable by the Web server process.', 294 array('{path}'=>$path))); 295 $this->_runtimePath=$runtimePath; 296 } 297 298 /** 299 * Returns the root directory that holds all third-party extensions. 300 * @return string the directory that contains all extensions. Defaults to the 'extensions' directory under 'protected'. 301 */ 302 public function getExtensionPath() 303 { 304 return Yii::getPathOfAlias('ext'); 305 }
Hi aaronarc-center,
CException
Application runtime path “/var/www/html/magento2/pub/ub-tool/protected/runtime” is not valid.
To solve that, let’s run bellow command in your Terminal:
chmod -R 777 /var/www/html/magento2/pub/ub-tool/protected/runtime
Also, i see you have get some issues with folders/files permission. You should follow this article:
http://devdocs.magento.com/guides/v2.1/install-gde/prereq/file-system-perms.html
Let’s do it and contact me if your need further assistance.
Regards,
Mall.
I’ve run through the recommended permissions on the Magento install guide numerous times.
I ran the chmod -R 777 /var/www/html/magento2/pub/ub-tool/protected/runtime command and now I’m back to the page cannot be found issue I had earlier.
Thank you Mall so much for helping me through this process.
Thoughts?
I did check app/code/Ubertheme/Ubdatamigration/Block/Index.php as stated above, and since I’m running the latest version pro 2.0.4 the code change had already been made.
Any other sugestions as to why the tool is throwing a 404 error?
I purchased this tool last night since I was on a deadline to get this server transfered and have yet to be able to attempt to use it.
Thanks in advance.
Hi aaronarc-center,
I need a closer look to detect the root of issues as you said. Let’s provide me the admin and ssh credentials of your Magento 2 in this thread.
I will check further and help you get out.
Regards,
Mall.
Hi aaronarc-center,
Please re-check your Vanish cache settings in your server. You can follow this:
http://devdocs.magento.com/guides/v2.0/config-guide/varnish/tshoot-varnish-503.html
Regards,
Mall.
Hi aaronarc-center,
I see your Magento2 site working fine now. Let’s contact me if you need further assistance.
(http://i.prntscr.com/833da658fe4643419e36fa5d73b01fde.png)
Regards,
Mall.
Hi aaronarc-center,
I’m stuck at step 3. It times out after 1 minute.
I have re-check your site and see that, you have finished the step #3
http://i.prntscr.com/11935e0cb4524478a6089483fed6e686.png
Please have a look again and contact me if you need further assistance!
Regards,
Mall.
Hi aaronarc-center,
You need to change the settings to fix the connection time out in your server. Please contact your system admin or Server provider for help on this.
You can follow this guide for reference: https://www.tekovic.com/fixing-timeout-between-nginx-and-php-fpm
Anyway, it would be best if you can handle data migration in local environment for better performance.
Regards,
Mall.
I fixed the nginx problem, it was missing a fastcgi_read_timeout in the ub-tools section of the website config.
Now I’m getting this:
CException
Property “Mage2CatalogCategoryProduct.entity_id” is not defined.
/var/www/html/magento2/pub/ub-tool/yii/db/ar/CActiveRecord.php(145)
133 */ 134 public function __get($name) 135 { 136 if(isset($this->_attributes[$name])) 137 return $this->_attributes[$name]; 138 elseif(isset($this->getMetaData()->columns[$name])) 139 return null; 140 elseif(isset($this->_related[$name])) 141 return $this->_related[$name]; 142 elseif(isset($this->getMetaData()->relations[$name])) 143 return $this->getRelated($name); 144 else 145 return parent::__get($name); 146 } 147 148 /** 149 * PHP setter magic method. 150 * This method is overridden so that AR attributes can be accessed like properties. 151 * @param string $name property name 152 * @param mixed $value property value 153 */ 154 public function __set($name,$value) 155 { 156 if($this->setAttribute($name,$value)===false) 157 {
Stack Trace
#0
+
/var/www/html/magento2/pub/ub-tool/yii/db/ar/CActiveRecord.php(145): CComponent->__get(“entity_id”)
#1
+
/var/www/html/magento2/pub/ub-tool/yii/validators/CStringValidator.php(79): CActiveRecord->__get(“entity_id”)
#2
+
/var/www/html/magento2/pub/ub-tool/yii/validators/CValidator.php(201): CStringValidator->validateAttribute(Mage2CatalogCategoryProduct, “entity_id”)
#3
+
/var/www/html/magento2/pub/ub-tool/yii/base/CModel.php(159): CValidator->validate(Mage2CatalogCategoryProduct, array(“entity_id”))
#4
+
/var/www/html/magento2/pub/ub-tool/yii/db/ar/CActiveRecord.php(808): CModel->validate(null)
#5
–
/var/www/html/magento2/pub/ub-tool/protected/controllers/MigrateController.php(1444): CActiveRecord->save()
1439 $model2 = new Mage2CatalogCategoryProduct(); 1440 $model2->category_id = $model->category_id; 1441 $model2->product_id = $model->product_id; 1442 $model2->position = $model->position; 1443 1444 if (!$model2->save()) { 1445 $errors[] = get_class($model2).": ".MigrateSteps::getStringErrors($model2->getErrors()); 1446 } 1447 } 1448 } 1449 }
#6
+
/var/www/html/magento2/pub/ub-tool/yii/web/actions/CInlineAction.php(49): MigrateController->actionStep5()
#7
+
/var/www/html/magento2/pub/ub-tool/yii/web/CController.php(308): CInlineAction->runWithParams(array())
#8
+
/var/www/html/magento2/pub/ub-tool/yii/web/CController.php(286): CController->runAction(CInlineAction)
#9
+
/var/www/html/magento2/pub/ub-tool/yii/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array())
#10
+
/var/www/html/magento2/pub/ub-tool/yii/web/CWebApplication.php(282): CController->run(“step5”)
#11
+
/var/www/html/magento2/pub/ub-tool/yii/web/CWebApplication.php(141): CWebApplication->runController(“migrate/step5”)
#12
+
/var/www/html/magento2/pub/ub-tool/yii/base/CApplication.php(184): CWebApplication->processRequest()
#13
–
/var/www/html/magento2/pub/ub-tool/index.php(13): CApplication->run()
08 // change the following paths if necessary 09 $yii=dirname(__FILE__).'/yii/yii.php'; 10 $config=dirname(__FILE__).'/protected/config/main.php'; 11 12 require_once($yii); 13 Yii::createWebApplication($config)->run();
2016-07-12 16:17:29 nginx/1.10.0 Yii Framework/1.1.16
Hi aaronarc-center,
CException
Property “Mage2CatalogCategoryProduct.entity_id” is not defined.
Please download and install the latest version of this tool v2.0.5 to solve the issue as you said.
And contact me if you need further assistance!
Regards,
Mall.
Hi aaronarc-center,
As you can see, that is an issue of Magento core, in your context with PHP 7.0. You are using the code clone from dev version at https://github.com/magento/magento2
To solve this issue, you have to run command: php -f bin/magento setup:di:compile
But please note that after you run that command successfully, you will get this issue: https://github.com/magento/data-migration-tool/issues/64
It relates to data migration tool of Magento. I think you should remove this tool.
Further, you should use the souce code of Magento core released at: https://www.magentocommerce.com/download
It will handle all the latest issues of Magento 2 core (Don’t use the developing version as in your existing Magento instance).
Please have a look and contact me if you need further assistance!
Regards,
Mall