Home » Php » linux – error when trying to start hadoop via php

linux – error when trying to start hadoop via php

Posted by: admin February 25, 2020 Leave a comment

Questions:

i have a shell script, that is start-dfs.sh. it runs well when using terminal.i want to execute it via php and i tried the following code in php:

<?php
$output= shell_exec("/usr/local/hadoop3/sbin/start-dfs.sh");

echo "<pre>".$output."</pre>" ;

?>

when i execute the code above i get the error:

Starting namenodes on [localhost] localhost: Permission denied (publickey,password).
Starting datanodes
localhost: Permission denied (publickey,password).
Starting secondary namenodes [chbpc-VirtualBox] chbpc-VirtualBox: Permission denied (publickey,password).

how can i resolve this?

How to&Answers: