2016-06-13 8 views
0

私のpostconfigスクリプトを使用してcfnclusterを作成しようとしています。マスターノードが作成されましたEc2ダッシュボードにマスターノードがあり、しかし、コマンドプロンプトとCloudFormationで「CREATE Failed」と表示されます。私のpostconfigスクリプトでは、NFS共有をマウントしています。私のpostconfigスクリプトを使用せずに、私は問題に直面しません。私のpost_installスクリプトを使用するとCfnclusterがマスタノードを作成できない

以下のログを見つけてください: '\ r' がコマンドでエラーが見つからない

12:53:44 UTC-0400 CREATE_FAILED AWS::CloudFormation::Stack cfncluster-cfnclustertest1 The following resource(s) failed to create: [MasterServer]. 
12:53:42 UTC-0400 CREATE_FAILED AWS::EC2::Instance MasterServer Received FAILURE signal with UniqueId i-07ef799b 
12:47:40 UTC-0400 CREATE_IN_PROGRESS AWS::EC2::Instance MasterServer Resource creation Initiated 
12:47:38 UTC-0400 CREATE_IN_PROGRESS AWS::EC2::Instance MasterServer  
12:47:28 UTC-0400 CREATE_COMPLETE AWS::IAM::InstanceProfile RootInstanceProfile 
12:45:29 UTC-0400 CREATE_COMPLETE AWS::IAM::Policy S3ReadWriteRolePolicies 
12:45:29 UTC-0400 CREATE_COMPLETE AWS::IAM::Policy CfnClusterPolicies 

Running handlers: 
Running handlers complete 
Chef Client finished, 69/184 resources updated in 01 minutes 11 seconds 

2016-06-13 18:55:32,250 [DEBUG] No services specified 
2016-06-13 18:55:33,124 [INFO] Running config shellRunPostInstall 
2016-06-13 18:55:33,124 [DEBUG] No packages specified 
2016-06-13 18:55:33,124 [DEBUG] No groups specified 
2016-06-13 18:55:33,124 [DEBUG] No users specified 
2016-06-13 18:55:33,124 [DEBUG] No sources specified 
2016-06-13 18:55:33,124 [DEBUG] No files specified 
2016-06-13 18:55:33,124 [DEBUG] Running command runpostinstall 
2016-06-13 18:55:33,124 [DEBUG] No test for command runpostinstall 
2016-06-13 18:55:37,118 [ERROR] Command runpostinstall (/opt/cfncluster/scripts/fetch_and_run -postinstall) failed 
2016-06-13 18:55:37,118 [DEBUG] Command runpostinstall output: /tmp/tmp.jooCNBMSMS: line 2: $'\r': command not found 
/tmp/tmp.jooCNBMSMS: line 4: $'\r': command not found 
does not existt point /mnt/nfs/home 
/tmp/tmp.jooCNBMSMS: line 7: $'\r': command not found 
/tmp/tmp.jooCNBMSMS: line 8: $'\r': command not found 
/tmp/tmp.jooCNBMSMS: line 9: $'\r': command not found 
/tmp/tmp.jooCNBMSMS: line 10: $'\r': command not found 
/tmp/tmp.jooCNBMSMS: line 11: $'\r': command not found 
/tmp/tmp.jooCNBMSMS: line 12: $'\r': command not found 
cfncluster: fetch_and_run - Failed to run boot_as_master postinstall 

2016-06-13 18:55:37,118 [ERROR] Error encountered during build of shellRunPostInstall: Command runpostinstall failed 
Traceback (most recent call last): 
    File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 517, in run_config 
    CloudFormationCarpenter(config, self._auth_config).build(worklog) 
    File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 248, in build 
    changes['commands'] = CommandTool().apply(self._config.commands) 
    File "/usr/lib/python2.7/dist-packages/cfnbootstrap/command_tool.py", line 117, in apply 
    raise ToolError(u"Command %s failed" % name) 
ToolError: Command runpostinstall failed 
2016-06-13 18:55:37,119 [ERROR] -----------------------BUILD FAILED!------------------------ 
2016-06-13 18:55:37,121 [ERROR] Unhandled exception during build: Command runpostinstall failed 
Traceback (most recent call last): 
    File "/opt/aws/bin/cfn-init", line 171, in <module> 
    worklog.build(metadata, configSets) 
    File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 118, in build 
    Contractor(metadata).build(configSets, self) 
    File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 505, in build 
    self.run_config(config, worklog) 
    File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 517, in run_config 
    CloudFormationCarpenter(config, self._auth_config).build(worklog) 
    File "/usr/lib/python2.7/dist-packages/cfnbootstrap/construction.py", line 248, in build 
    changes['commands'] = CommandTool().apply(self._config.commands) 
    File "/usr/lib/python2.7/dist-packages/cfnbootstrap/command_tool.py", line 117, in apply 
    raise ToolError(u"Command %s failed" % name) 
ToolError: Command runpostinstall failed 
2016-06-13 18:55:37,267 [DEBUG] CloudFormation client initialized with endpoint https://cloudformation.us-****-1.amazonaws.com 
2016-06-13 18:55:37,267 [DEBUG] Signaling resource MasterServer in stack cfncluster-cfnclustertest1 with unique ID i-1561f789 and status FAILURE 
+0

"use_public_ips = false"を "use_public_ips = true"に変更してから試してみてください。 – error2007s

+0

私はこの問題がpost_installスクリプトにあると思います。 – nadish

+0

別のノードからNFS共有をCFNクラスタ内のすべてのノードにマウントしようとしています。 post_installスクリプトを使用する代わりに、すべての計算ノードにsshを実行し、同じコマンドを発行してNFS共有をマウントすると、共有ディレクトリにアクセスしてマスタからジョブを実行できます。 – nadish

答えて

1

/var/log/cfn-init.logマスターノードのログを見つけてください。 Windowsでファイルを編集し、Windows以外のシステムでファイルを実行しようとしているために発生します。私がWindows以外のシステムからbashスクリプトを作成したとき、そのクラスターは正常に作成されました。

関連する問題