Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08F32DBB3 for ; Tue, 6 Nov 2012 20:08:10 +0000 (UTC) Received: (qmail 82767 invoked by uid 500); 6 Nov 2012 20:08:04 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 82699 invoked by uid 500); 6 Nov 2012 20:08:04 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 82691 invoked by uid 99); 6 Nov 2012 20:08:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2012 20:08:04 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [206.47.135.205] (HELO Spam1.prd.mpac.ca) (206.47.135.205) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2012 20:07:57 +0000 Received: from Spam1.prd.mpac.ca (unknown [127.0.0.1]) by IMSVA80 (Postfix) with ESMTP id 470471D805E for ; Tue, 6 Nov 2012 15:07:32 -0500 (EST) Received: from SMAIL1.prd.mpac.ca (unknown [172.29.2.53]) by Spam1.prd.mpac.ca (Postfix) with ESMTP id F2C5C1D805D for ; Tue, 6 Nov 2012 15:07:31 -0500 (EST) Received: from SMAIL1.prd.mpac.ca ([fe80::d548:4221:967c:4cfb]) by SMAIL1.prd.mpac.ca ([fe80::18cb:8648:b77f:2b55%11]) with mapi id 14.02.0318.004; Tue, 6 Nov 2012 15:07:31 -0500 From: "Kartashov, Andy" To: "user@hadoop.apache.org" Subject: RE: starting Daemons remotely, through ssh - SOLVED Thread-Topic: starting Daemons remotely, through ssh - SOLVED Thread-Index: Ac28WlmiSNol2DjISPWAduVa3ySqZw== Date: Tue, 6 Nov 2012 20:07:31 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.29.60.102] Content-Type: multipart/alternative; boundary="_000_BD42F346AE90F544A731516A805D1B8AD85976SMAIL1prdmpacca_" MIME-Version: 1.0 X-TM-AS-Product-Ver: IMSVA-8.0.0.1304-6.5.0.1024-19346.001 X-TM-AS-Result: No--31.288-5.0-31-10 X-imss-scan-details: No--31.288-5.0-31-10 X-TM-AS-Result-Xfilter: Match text exemption rules:No X-TMASE-MatchedRID: dL10VBB8yocOwH4pD14DsI9URkDgdlb5zSnbR3NwN1wno4Cg1D1PpEC5 cFE1egrmBEwG50CDfQPTjyINc5k77iZywmJvYiNpbMGKOuLn5FUh9mNF8ZPJ2GM+uU0H6Ayr9BQ FWu9qPYZzY42c5lAKiu/Qm/w6WKXC8c42iOE6XAmAV3ZMVrKwyGLu7N0EkjfktXl9IxEPXOq1Pt /xX75izBkYZZjW6VwOIkENNi9mO/hiMl5IUVtzwmYNYtsE5knDNjuRIfuOU0chg/had72R1D8Pg l1MTjZlb4igCRHlAt45NrMZPf265B/yubtiMTISWuiIVTY3iIhp5Ic6zFbk0geLCIX046iBjNLx rcxKViUihgJVrNniBWrEBfVjKK6u1lfDCm9+EZVYKMMlFh4BnYfsPVs/8Vw6EfKzCAntKpAGk2p TPAu+9//55Kkc+9/6c91xMYNqHkWBkjWfpo1TNt/wYmMFcJSIcLENoEk74i8IV1QinP8sFVHXxC nNdK1OeJzUQvlF1ue3nW0OsWYNynuLfgSBmtT0uBPKuumTwxzKIGMaZvT02x56ZnC1plXN0lGkn tz0sQH3aCtTBCBhlyX0gnMmsBPucxuIssoEeQTICx64sSQ1m1wI2GGgEcAETaQBzI7iE/oDjP7b Katygf6Lve5vAAljHulUx7a2290= X-Virus-Checked: Checked by ClamAV on apache.org --_000_BD42F346AE90F544A731516A805D1B8AD85976SMAIL1prdmpacca_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Harsh/Ravi, I wrote my own scripts to [start|stop|restart] [hdfs|mapred] daemons. The = content of the script is $sudo service /etc/init.d/hadoop-[hdfs-*|mapred-*] I have no problem starting Daemons locally on each node. I have sudo-access= granted. I run script and enter password. I have passwordless ssh enabled. But when I am trying to start slave Daemon= s from NN I get ": sudo: sorry, you must have a tty to run sudo". I just solved this issue by: a. Modifying slaves.sh script to add -t after ssh "-t" a1. Someone suggested to: $sudo sudeors and commenting out Defaults requiretty But a. worked just fine. Cheers, AK47 From: Ravi Mutyala [mailto:ravi@hortonworks.com] Sent: Tuesday, November 06, 2012 2:31 PM To: user@hadoop.apache.org Subject: Re: starting Daemons remotely, through ssh Andy, Which specific scripts are these? As far as I know, all daemons on the hado= op side can be started with hadoop/hdfs or any non-sudo username. You will = require passwordless ssh for that user if you are using slaves/regionserver= s configured to start the daemons remotely from the NameNode/HBase Master. On Tue, Nov 6, 2012 at 1:25 PM, Kartashov, Andy > wrote: Hadoopers, How does one start Daemons remotely when scripts normally require root user= to start them? Do you modify scripts? Thanks, NOTICE: This e-mail message and any attachments are confidential, subject t= o copyright and may be privileged. Any unauthorized use, copying or disclos= ure is prohibited. If you are not the intended recipient, please delete and= contact the sender immediately. Please consider the environment before pri= nting this e-mail. AVIS : le pr=E9sent courriel et toute pi=E8ce jointe qui= l'accompagne sont confidentiels, prot=E9g=E9s par le droit d'auteur et peu= vent =EAtre couverts par le secret professionnel. Toute utilisation, copie = ou divulgation non autoris=E9e est interdite. Si vous n'=EAtes pas le desti= nataire pr=E9vu de ce courriel, supprimez-le et contactez imm=E9diatement l= 'exp=E9diteur. Veuillez penser =E0 l'environnement avant d'imprimer le pr= =E9sent courriel NOTICE: This e-mail message and any attachments are confidential, subject t= o copyright and may be privileged. Any unauthorized use, copying or disclos= ure is prohibited. If you are not the intended recipient, please delete and= contact the sender immediately. Please consider the environment before pri= nting this e-mail. AVIS : le pr=E9sent courriel et toute pi=E8ce jointe qui= l'accompagne sont confidentiels, prot=E9g=E9s par le droit d'auteur et peu= vent =EAtre couverts par le secret professionnel. Toute utilisation, copie = ou divulgation non autoris=E9e est interdite. Si vous n'=EAtes pas le desti= nataire pr=E9vu de ce courriel, supprimez-le et contactez imm=E9diatement l= 'exp=E9diteur. Veuillez penser =E0 l'environnement avant d'imprimer le pr= =E9sent courriel --_000_BD42F346AE90F544A731516A805D1B8AD85976SMAIL1prdmpacca_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Harsh/Ravi,

 

I wrote my own scripts = to [start|stop|restart]  [hdfs|mapred] daemons. The content of the scr= ipt is

 

$sudo service /etc/init= .d/hadoop-[hdfs-*|mapred-*]

 

I have no problem start= ing Daemons locally on each node. I have sudo-access granted. I run script = and enter password.

I have passwordless ssh= enabled. But when I am trying to start slave Daemons from NN I get  <= /span>

“<remothsot>= ;:  sudo: sorry, you must have a tty to run sudo”.

 

I just solved this issu= e by:

a.       Modifying slaves.sh scrip= t to add –t after ssh “-t” <host-ip> <command>= ;

 

a1. Someone sugg= ested to:

$sudo sudeors an= d commenting out Defaults requiretty

But a. worked ju= st fine.

 

Cheers,

AK47  

 

From: Ravi Mutyala [mailto:ravi@hortonworks.com]
Sent: Tuesday, November 06, 2012 2:31 PM
To: user@hadoop.apache.org
Subject: Re: starting Daemons remotely, through ssh

 

Andy, 

 

Which specific scripts are these? As far as I know, = all daemons on the hadoop side can be started with hadoop/hdfs or any non-s= udo username. You will require passwordless ssh for that user if you are us= ing slaves/regionservers configured to start the daemons remotely from the NameNode/HBase Master. 

 

 

On Tue, Nov 6, 2012 at 1:25 PM, Kartashov, Andy <= Andy.Kartashov@= mpac.ca> wrote:

Hadoopers,

 

How does one= start Daemons remotely when scripts normally require root user to start th= em? Do you modify scripts?

 

Thanks,

NOTICE: This e-mail message and any attachments are = confidential, subject to copyright and may be privileged. Any unauthorized = use, copying or disclosure is prohibited. If you are not the intended recip= ient, please delete and contact the sender immediately. Please consider the environment before printing this e= -mail. AVIS : le pr=E9sent courriel et toute pi=E8ce jointe qui l'accompagn= e sont confidentiels, prot=E9g=E9s par le droit d'auteur et peuvent =EAtre = couverts par le secret professionnel. Toute utilisation, copie ou divulgation non autoris=E9e est interdite. Si vous n= '=EAtes pas le destinataire pr=E9vu de ce courriel, supprimez-le et contact= ez imm=E9diatement l'exp=E9diteur. Veuillez penser =E0 l'environnement avan= t d'imprimer le pr=E9sent courriel

 

NOTICE: This e-mail message and any attachments are confidential, subject t= o copyright and may be privileged. Any unauthorized use, copying or disclos= ure is prohibited. If you are not the intended recipient, please delete and= contact the sender immediately. Please consider the environment before printing this e-mail. AVIS : le pr= =E9sent courriel et toute pi=E8ce jointe qui l'accompagne sont confidentiel= s, prot=E9g=E9s par le droit d'auteur et peuvent =EAtre couverts par le sec= ret professionnel. Toute utilisation, copie ou divulgation non autoris=E9e est interdite. Si vous n'=EAtes pas le dest= inataire pr=E9vu de ce courriel, supprimez-le et contactez imm=E9diatement = l'exp=E9diteur. Veuillez penser =E0 l'environnement avant d'imprimer le pr= =E9sent courriel --_000_BD42F346AE90F544A731516A805D1B8AD85976SMAIL1prdmpacca_--