From hdfs-issues-return-223549-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Sun Jun 10 00:35:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2448D180648 for ; Sun, 10 Jun 2018 00:35:04 +0200 (CEST) Received: (qmail 47374 invoked by uid 500); 9 Jun 2018 22:35:04 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 47363 invoked by uid 99); 9 Jun 2018 22:35:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 09 Jun 2018 22:35:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8BEEF18069C for ; Sat, 9 Jun 2018 22:35:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id b_pup7b3Ut8C for ; Sat, 9 Jun 2018 22:35:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 92A0F5F1F3 for ; Sat, 9 Jun 2018 22:35:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DBF52E00C9 for ; Sat, 9 Jun 2018 22:35:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 222F420EAB for ; Sat, 9 Jun 2018 22:35:00 +0000 (UTC) Date: Sat, 9 Jun 2018 22:35:00 +0000 (UTC) From: "Elek, Marton (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-12571) Ozone: remove spaces from the beginning of the hdfs script MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-12571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16507175#comment-16507175 ] Elek, Marton commented on HDFS-12571: ------------------------------------- Hi [~kmarton] The root cause of the original problem was a space before the bash hashbang. I checked it on the source tree of 3.0.1 tag and in the binary distribution of the 3.1.0 hadoop and everything looks fine {code:java} find -type f -executable | xargs -n1 head -n1 | less | grep bash | sort | uniq {code} (yes, I know that this check is dummy but was effective). On the other hand in the 3.1.0 binary distribution there are only 165 lines: {code} cat ./libexec/hadoop-config.sh | wc 165 717 5457 {code} It seems you have at least 273 lines: {code} /hadoop/hadoop-3.1.0/bin/../libexec/hadoop-config.sh: line 273: hadoop_generic_java_subcmd_handler: command not found {code} Could you please share what kind of hadoop distribution do you have? Is it an binary distribution of the apache release, custom built from source or any other distribution? Also: Could you please check your hashbangs with the previous command? IMHO It could be a different problem as this space problem was introduced only on the HDFS branch which was merged to trunk. Could be a different (but may be similar) problem on 3.0.1 / 3.1.0. > Ozone: remove spaces from the beginning of the hdfs script > ------------------------------------------------------------ > > Key: HDFS-12571 > URL: https://issues.apache.org/jira/browse/HDFS-12571 > Project: Hadoop HDFS > Issue Type: Sub-task > Affects Versions: HDFS-7240 > Reporter: Elek, Marton > Assignee: Elek, Marton > Priority: Critical > Labels: ozoneMerge > Fix For: HDFS-7240 > > Attachments: HDFS-12571-HDFS-7240.001.patch > > > It seems that during one of the previous merge some unnecessary spaces has been added to the hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs file. > After a dist build I can not start server with the hdfs command: > {code} > /tmp/hadoop-3.1.0-SNAPSHOT/bin/../libexec/hadoop-functions.sh: line 398: syntax error near unexpected token `<' > /tmp/hadoop-3.1.0-SNAPSHOT/bin/../libexec/hadoop-functions.sh: line 398: ` done < <(for text in "${input[@]}"; do' > /tmp/hadoop-3.1.0-SNAPSHOT/bin/../libexec/hadoop-config.sh: line 70: hadoop_deprecate_envvar: command not found > /tmp/hadoop-3.1.0-SNAPSHOT/bin/../libexec/hadoop-config.sh: line 87: hadoop_bootstrap: command not found > /tmp/hadoop-3.1.0-SNAPSHOT/bin/../libexec/hadoop-config.sh: line 104: hadoop_parse_args: command not found > /tmp/hadoop-3.1.0-SNAPSHOT/bin/../libexec/hadoop-config.sh: line 105: shift: : numeric argument required > /tmp/hadoop-3.1.0-SNAPSHOT/bin/../libexec/hadoop-config.sh: line 110: hadoop_find_confdir: command not found > /tmp/hadoop-3.1.0-SNAPSHOT/bin/../libexec/hadoop-config.sh: line 111: hadoop_exec_hadoopenv: command not found > /tmp/hadoop-3.1.0-SNAPSHOT/bin/../libexec/hadoop-config.sh: line 112: hadoop_import_shellprofiles: command not found > {code} > See the space at here: > https://github.com/apache/hadoop/blob/d0bd0f623338dbb558d0dee5e747001d825d92c5/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs > Or see the latest version at: > https://github.com/apache/hadoop/blob/HDFS-7240/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs > To be honest I don't understand how it could work for others, as it seems to be an older change. Maybe some git magic removed it on OSX (I use linux). Anyway I upload a patch to fix it. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org