setup部署多节点之排错分析(3)

问题3:dea的日志有问题

问题描述:在查看dea的log(位于$HOME/cloudfoundry/.deployment/dea/log/  目录下)的时候发现下面的提示信息,runtime not support。

[2012-09-20 22:04:50.898873] dea - pid=12396 tid=d39f fid=99c9  DEBUG -- DEA received discovery message: {"droplet":12,"limits":{"mem":128,"disk":2048,"fds":256},"name":"hello","runtime_info":{"version":"1.8.7","description":"Ruby 1.8.7","executable":"/root/cloudfoundry/.deployments/rest/deploy/rubies/ruby-1.8.7-p357/bin/ruby","version_flag":"-e 'puts RUBY_VERSION'","additional_checks":"-e 'puts RUBY_PATCHLEVEL >= 174'","version_output":"1.8.7","environment":{"PATH":"/root/cloudfoundry/.deployments/rest/deploy/rubies/ruby-1.8.7-p357/bin:$PATH","BUNDLE_GEMFILE":null},"name":"ruby18"},"runtime":"ruby18","prod":false,"sha":"012b0fc043c9e03a03bf7f3432a0fc9c54d14ba1"} 

[2012-09-20 22:04:50.899769] dea - pid=12396 tid=d39f fid=99c9  DEBUG -- Ignoring request, runtime not enabled for 'ruby18' 

[2012-09-20 22:04:50.899939] dea - pid=12396 tid=d39f fid=99c9  DEBUG -- Ignoring request, {"version"=>"1.8.7", "description"=>"Ruby 1.8.7", "executable"=>"/root/cloudfoundry/.deployments/rest/deploy/rubies/ruby-1.8.7-p357/bin/ruby", "version_flag"=>"-e 'puts RUBY_VERSION'", "additional_checks"=>"-e 'puts RUBY_PATCHLEVEL >= 174'", "version_output"=>"1.8.7", "environment"=>{"PATH"=>"/root/cloudfoundry/.deployments/rest/deploy/rubies/ruby-1.8.7-p357/bin:$PATH", "BUNDLE_GEMFILE"=>nil}, "name"=>"ruby18"} runtime not supported. 

解决方法:回答之前可以先插卡看下自己的runtimes,如下。说实在的,我没弄明白这边的runtime到底是什么玩意,所以这个问题就稀里糊涂的去网上查了。

vm@vm:~/cloudfoundry/vcap/dev_setup$ vmc runtimes 

 

+--------------+---------------+-----------+ 

| Name         | Description   | Version   | 

+--------------+---------------+-----------+ 

| php          | PHP 5         | 5.3       | 

| node08       | Node.js       | 0.8.2     | 

| node06       | Node.js       | 0.6.8     | 

| ruby19       | Ruby 1.9.2    | 1.9.2p180 | 

| ruby18       | Ruby 1.8.7    | 1.8.7     | 

| java         | Java 6        | 1.6       | 

| erlangR14B01 | Erlang R14B01 | R14B01    | 

| python2      | Python 2.6.5  | 2.6.5     | 

| node         | Node.js       | 0.4.12    | 

+--------------+---------------+-----------+ 

在Google Group里面的答案就是:问题就是这个路径名出现问题了。

Hi 

   I think the problem is because dea didn't find the correct ruby executable path. 

 DEBUG -- DEA received discovery message: {"droplet":12,"limits":{"mem":128,"disk":2048,"fds":256},"name":"hello","runtime_info":{"version":"1.8.7","description":"Ruby 1.8.7","executable":"/root/cloudfoundry/.deployments/rest/deploy/rubies/ruby-1.8.7-p357/bin/ruby","version_flag":"-e 'puts RUBY_VERSION'","additional_checks":"-e 'puts RUBY_PATCHLEVEL >= 174'","version_output":"1.8.7","environment":{"PATH":"/root/cloudfoundry/.deployments/rest/deploy/rubies/ruby-1.8.7-p357/bin:$PATH","BUNDLE_GEMFILE":null},"name":"ruby18"},"runtime":"ruby18","prod":false,"sha":"012b0fc043c9e03a03bf7f3432a0fc9c54d14ba1"} 

   the correct path should be /root/cloudfoundry/.deployments/dea/deploy/rubies/ruby-1.8.7-p357/bin/. 

要怎么解决呢?:就是去修改rest这个节点底下的runtimes.yml文件,找到里面对于这个路径名的设置的地方,然后架构rest修改成dea就可以了。

Hi guys: 

     It worked. 

     I find the configuration. 

     /root/cloudfoundry/.deployments/rest/config/runtimes.yml 

     the path of executable ruby need change to where your dea's ruby located in.   

再看dea的log文件,没问题了

vm@vm:~/cloudfoundry/.deployments/dea$ tail log/dea.log   

[2012-10-15 16:25:36.540653] dea - pid=6504 tid=a226 fid=0c51   INFO -- Using ruby @ /home/vm/cloudfoundry/.deployments/dea/deploy/rubies/ruby-1.9.2-p180/bin/ruby 

[2012-10-15 16:25:36.540896] dea - pid=6504 tid=a226 fid=0c51   INFO -- Using network: 192.168.1.101 

[2012-10-15 16:25:36.541032] dea - pid=6504 tid=a226 fid=0c51   INFO -- Socket Limit:1024 

[2012-10-15 16:25:36.541099] dea - pid=6504 tid=a226 fid=0c51   INFO -- Max Memory set to 4.0G 

[2012-10-15 16:25:36.541159] dea - pid=6504 tid=a226 fid=0c51   INFO -- Utilizing 1 cpu cores 

[2012-10-15 16:25:36.541212] dea - pid=6504 tid=a226 fid=0c51   INFO -- Allowing multi-tenancy 

[2012-10-15 16:25:36.541273] dea - pid=6504 tid=a226 fid=0c51   INFO -- Using directory: /var/vcap.local/dea/ 

[2012-10-15 16:25:36.542077] dea - pid=6504 tid=a226 fid=0c51   INFO -- Initial usage of droplet fs is: 0% 

[2012-10-15 16:25:36.597228] dea - pid=6504 tid=a226 fid=0c51   INFO -- File service started on port: 12345 

[2012-10-15 16:25:36.636433] dea - pid=6504 tid=a226 fid=0c51  DEBUG -- Took 0.002520012 to snapshot application state. 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/9eed381570b50a0ce959b98e911402c8.html