2017-01-16 5 views
1

私はNode.jsアプリをBluemixにプッシュしようとしました。このアプリはMacで正常に動作しましたが、Bluemixで何らかの理由で起動しませんでした。BluemixへのCF pushが失敗しました

Bluemix ログは多少の誤差が含まれています

コンフィギュレーションファイルを添付
CELL/0Starting health monitoring of containerJan 16, 2017 10:12:29 PM 
APP/0runtime: failed to create new OS thread (have 5 already; errno=11)Jan 16, 2017 10:12:29 PM 
APP/0runtime: may need to increase max user processes (ulimit -u)Jan 16, 2017 10:12:29 PM 
APP/0fatal error: newosprocJan 16, 2017 10:12:29 PM 
APP/0Express app running on port 3000Jan 16, 2017 10:12:30 PM 
CELL/0Timed out after 1m0s: health check never passed.Jan 16, 2017 10:13:31 PM 
CELL/0Exit status 0Jan 16, 2017 10:13:31 PM 
CELL/0Destroying containerJan 16, 2017 10:13:42 PM 
API/0App instance exited with guid a1525a65-4e18-41c6-87a0-53656bc45810 payload: {"instance"=>"", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 1 error(s) occurred:\n\n* Exited with status 4\n* 2 error(s) occurred:\n\n* cancelled\n* process did not exit", "crash_count"=>3, "crash_timestamp"=>1484601222302319454, "version"=>"3480d7ed-0634-4cd6-a43a-94e490c3cafb"}Jan 16, 2017 10:13:42 PM 
CELL/0Successfully destroyed containerJan 16, 2017 10:13:45 PM 
CELL/0Creating containerJan 16, 2017 10:14:22 PM 
CELL/0Successfully created containerJan 16, 2017 10:14:34 PM 
CELL/0Starting health monitoring of containerJan 16, 2017 10:14:36 PM 
APP/0Express app running on port 3000Jan 16, 2017 10:14:36 PM 
CELL/0Timed out after 1m0s: health check never passed.Jan 16, 2017 10:15:37 PM 
CELL/0Exit status 0Jan 16, 2017 10:15:37 PM 
CELL/0Destroying containerJan 16, 2017 10:15:48 PM 
API/4App instance exited with guid a1525a65-4e18-41c6-87a0-53656bc45810 payload: {"instance"=>"", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 1 error(s) occurred:\n\n* Exited with status 4\n* 2 error(s) occurred:\n\n* cancelled\n* process did not exit", "crash_count"=>4, "crash_timestamp"=>1484601348331703378, "version"=>"3480d7ed-0634-4cd6-a43a-94e490c3cafb"}Jan 16, 2017 10:15:48 PM 
CELL/0Successfully destroyed containerJan 16, 2017 10:15:49 PM 
CELL/0Creating containerJan 16, 2017 10:16:54 PM 
CELL/0Successfully created containerJan 16, 2017 10:17:04 PM 
APP/0Starting app with 'node app.js 'Jan 16, 2017 10:17:08 PM 
APP/0Express app running on port 3000Jan 16, 2017 10:17:08 PM 

1. manifest.yml

--- 
applications: 
- name: tks 
    memory: 256M 
    instances: 1 
    host: tks 

2 package.json

{ 
    "name": "ski-dictionary", 
    "version": "1.0.0", 
    "description": "A collection of skier terms and definitions", 
    "main": "app.js", 
    "scripts": { 
    "test": "echo \"Error: no test specified\" && exit 1", 
    "start": "node app.js" 
    }, 
    "author": "Peter Schleinitz", 
    "license": "MIT", 
    "dependencies": { 
    "body-parser": "^1.14.1", 
    "cors": "^2.7.1", 
    "express": "^4.13.3", 
    "request": "^2.79.0" 
    } 
} 

希望します。

答えて

1

がある問題である可能性があり、物事の数がありますが、ここで私はおそらく、最も可能性の高い原因は何を考えている:

1.あなたのポートがBluemix

上で正しく設定されていませんこれはあなたのアプリがローカルで実行される理由を説明しますが、Bluemixでは実行されません。以前はこの問題があったので、設定ファイルを調べて、すべてが正しく設定されていることを確認しました。あなたは、あなたのアプリケーションが特に大きい場合は、大きくする必要があり、タイムアウトに

を大きくする必要があり

https://github.com/IBM-Bluemix/node-helloworld

2:あなたはこのような単純なノードの例を実行して展開することができますを確認しますタイムアウト。そのためには、あなたのマニフェストにタイムアウトフラグを追加します。例

https://docs.cloudfoundry.org/devguide/deploy-apps/large-app-deploy.html


ため

timeout: 120をコードにアクセスせずに、問題を再現するために少し困難なことが、私にできるようになります上記の解決策があなたのために働くかどうかを知る。

+2

joeと同意します。あなたのログは、ポート3000でリッスンしていることを示しています。 'var port = process.env.PORT || 3000; ' –

+0

thx、私が適用した例を使用しました – jpsstack

関連する問題