Hi Everyone
Through lots of workaround, My cloud foundry installation is almost
done.
But still there is a issue. The cloud controller can't be started.
The error message is like below:
/bin# ./cloud_controller
Staging environment validation failed: sinatra runtime ruby18
version was 1.9.3p0, expected to match 1.8.7*

You guys have any idea or workaround for this? Thanks a million.

Search Discussions

  • Yangzifeng1104 at Sep 12, 2012 at 1:20 am
    another question is where are clould foundry run logs.
  • Yangzifeng1104 at Sep 12, 2012 at 2:33 am
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging script. Although I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<!--
    FileName: index.html\n Language: [en]\n-->\n<!--Head-->\n<head>\n
    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd {\n\t\xE3\x80\x80color:#666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif; \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color: #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color: #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\">\n
    <title>\xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE9\xA1\xB5</title>\n
    <script src=\"/mwg-internal/de5fs23hu73ds/files/javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link rel=\"stylesheet\"
    href=\"/mwg-internal/de5fs23hu73ds/files/default/stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!--Body-->\n<body onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n <tr>\n <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n <img
    src='/mwg-internal/de5fs23hu73ds/files/default/img/logo.jpg '>\n </td>\n
    </tr>\n</table>\n<!--/Logo-->\n<!--Contents-->\n<!-- FileName:
    cannotconnect.html\n Language: [en]\n-->\n<!--Title-->\n<table
    class='titleTable'
    background='/mwg-internal/de5fs23hu73ds/files/default/img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n
    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE6\xB2\xA1\xE6\x9C\x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n </tr>\n</table>\n<!--/Title-->\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td class=\"policytData\">\n
    \xE6\x82\xA8\xE6\x8C\x87\xE5\xAE\x9A\xE7\x9A\x84\xE7\xBD\x91\xE9\xA1\xB5\xE6\x97\xA0\xE6\xB3\x95\xE8\xAE\xBF\xE9\x97\xAE\xE3\x80\x82\xE8\xAF\xA5\xE9\x97\xAE\xE9\xA2\x98\xE5\x8F\xAF\xE8\x83\xBD\xE6\x98\xAF\xE7\x94\xB1\xE4\xBA\x8E\xE6\x82\xA8\xE8\xAE\xBF\xE9\x97\xAE\xE7\x9A\x84\xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE9\x83\xA8\xE7\xBD\xB2\xE5\x9C\xA8\xE6\xB5\xB7\xE5\xA4\x96\xEF\xBC\x8C\xE7\x94\xB1\xE4\xBA\x8E\xE4\xB8\x80\xE4\xBA\x9B\xE4\xB8\xB4\xE6\x97\xB6\xE7\x9A\x84\xE7\xBD\x91\xE7\xBB\x9C\xE9\x97\xAE\xE9\xA2\x98\xE8\x80\x8C\xE5\xAF\xBC\xE8\x87\xB4\xE7\x9A\x84\xE3\x80\x82\xE8\xBF\x99\xE7\xB1\xBB\xE9\x97\xAE\xE9\xA2\x98\xE5\xB8\xB8\xE5\x87\xBA\xE7\x8E\xB0\xE4\xBA\x8E\xE6\x82\xA8\xE4\xBD\xBF\xE7\x94\xA8Google\xE8\xBF\x9B\xE8\xA1\x8C\xE4\xBF\xA1\xE6\x81\xAF\xE6\x90\x9C\xE7\xB4\xA2\xE6\x97\xB6\xE3\x80\x82\n
    </td>\n </tr>\n</table>\n<!--/Content-->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td class=\"infoData\">\n <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n
    </tr>\n</table>\n<!--/Info-->\n\n<!--/Contents-->\n<!--Policy-->\n<table
    class='policyTable'>\n <tr>\n <td class='policyHeading'>\n <hr>\n

    \xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.
    \xE5\xBC\x80\xE6\x94\xBE\xE4\xBF\xA1\xE6\x81\xAF\xE7\xA7\x91\xE6\x8A\x80\xE3\x80\x81\xE5\x95\x86\xE4\xB8\x9A\xE4\xB8\x8E\xE7\xBB\x8F\xE6\xB5\x8E\xE3\x80\x81\xE6\x96\xB0\xE9\x97\xBB\xE4\xB8\x8E\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81\xE6\x90\x9C\xE7\xB4\xA2\xE5\xBC\x95\xE6\x93\x8E\xE4\xB8\x8E\xE9\x97\xA8\xE6\x88\xB7\xE3\x80\x81\xE6\x94\xBF\xE5\xBA\x9C\xE3\x80\x81\xE6\x95\x99\xE8\x82\xB2\xE3\x80\x81\xE5\x81\xA5\xE5\xBA\xB7\xE3\x80\x81\xE4\xBA\xA4\xE9\x80\x9A\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.
    \xE7\xA6\x81\xE6\xAD\xA2\xE8\xB5\x8C\xE5\x8D\x9A\xE3\x80\x81\xE6\x88\x90\xE4\xBA\xBA\xE3\x80\x81\xE5\xBA\xB8\xE4\xBF\x97\xE3\x80\x81\xE6\x9A\xB4\xE5\x8A\x9B\xE3\x80\x81\xE7\xBD\x91\xE7\xBB\x9C\xE8\x81\x8A\xE5\xA4\xA9\xE3\x80\x81\xE9\x87\x91\xE8\x9E\x8D\xE4\xBF\xA1\xE6\x81\xAF\xE4\xB8\x8E\xE6\x9C\x8D\xE5\x8A\xA1\xE3\x80\x81\xE5\xAE\x97\xE6\x95\x99\xE3\x80\x81\xE6\xB1\x82\xE8\x81\x8C\xE3\x80\x81\xE5\xA8\xB1\xE4\xB9\x90\xE3\x80\x81\xE6\x97\xB6\xE5\xB0\x9A\xE4\xB8\x8E\xE7\x94\x9F\xE6\xB4\xBB\xE3\x80\x81\xE6\xB5\x81\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81Webmail\xE3\x80\x81Blog\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\xE7\xA6\x81\xE6\xAD\xA2\xE9\x80\x9A\xE8\xBF\x87\xE4\xBB\xA3\xE7\x90\x86\xE8\xAE\xBF\xE9\x97\xAE\xE5\x85\xAC\xE5\x8F\xB8\xE5\x86\x85\xE7\xBD\x91\xE8\xB5\x84\xE6\xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.
    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\xB6\xB3\xE5\x91\x98\xE5\xB7\xA5\xE7\x89\xB9\xE6\xAE\x8A\xE9\x9C\x80\xE6\xB1\x82\xEF\xBC\x8C\xE5\x85\xAC\xE5\x8F\xB8\xE6\x8F\x90\xE4\xBE\x9B\xE7\xBD\x91\xE7\xAB\x99\xE5\xBC\x80\xE9\x80\x9A\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xEF\xBC\x8C\xE5\x85\xB7\xE4\xBD\x93\xE8\xAF\xB7\xE5\x8F\x82\xE8\xA7\x81web.neusoft.com->\xE6\x9C\x8D\xE5\x8A\xA1\xE5\xB9\xB3\xE5\x8F\xB0->IT\xE6\x9C\x8D\xE5\x8A\xA1\xE7\xAE\xA1\xE7\x90\x86
    \xE5\x8F\x91\xE5\xB8\x83\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xE5\x92\x8C\xE8\xA1\xA8\xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n </tr>\n</table>\n<!--/Policy-->\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData' >\n
    \xE4\xBF\xA1\xE6\x81\xAF\xE8\xA7\x84\xE5\x88\x92\xE4\xB8\x8E\xE7\xAE\xA1\xE7\x90\x86\xE9\x83\xA8\xEF\xBC\x8C\xE6\xB2\x88\xE9\x98\xB3\xE5\x9B\xAD\xE5\x8C\xBAA2\xE6\xA5\xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\xBC\x9Aipm@neusoft.com\n </td>\n </tr>\n
    <tr>\n <td class='policyData' >\n
    \xE7\x94\xB5\xE8\xAF\x9D\xEF\xBC\x9A+86-24-83665512\xE3\x80\x80\xE3\x80\x80\xE4\xBC\xA0\xE7\x9C\x9F\xEF\xBC\x9A+86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form target=\"_top\" >\n
    <input type=\"button\"
    onClick=\"javascript:parent.window.close();\"
    value=\"\xE5\x85\xB3\xE9\x97\xAD\xE9\xA1\xB5\xE9\x9D\xA2\">\n\t\t\t</form>\n\n</u></font></td>\n
    </tr>\n</table>\n<!--/Foot-->\n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body-->\n</html>\n", {:via=>"1.1 192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)", :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-Alive"}]
    >>>
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259 tid=abb1 fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1 fid=a955 INFO --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1 fid=a955 INFO --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1 fid=a955 INFO --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1 fid=a955 INFO --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1 fid=a955 INFO --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1 fid=a955 INFO --
    1 servers available for api.vcap.me
  • Yongkun Anfernee Gui at Sep 12, 2012 at 3:12 am
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway 7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging script. Although I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<!--
    FileName: index.html\n Language: [en]\n-->\n<!--Head-->\n<head>\n <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd {\n\t\xE3\x80\x80color:#666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif; \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color: #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color: #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\" http-equiv=\"Content-Type\">\n
    <title>\xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE9\xA1\xB5</title>\n
    <script src=\"/mwg-internal/de5fs23hu73ds/files/javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link rel=\"stylesheet\"
    href=\"/mwg-internal/de5fs23hu73ds/files/default/stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!--Body-->\n<body onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n <tr>\n <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n <img
    src='/mwg-internal/de5fs23hu73ds/files/default/img/logo.jpg '>\n </td>\n
    </tr>\n</table>\n<!--/Logo-->\n<!--Contents-->\n<!-- FileName:
    cannotconnect.html\n Language: [en]\n-->\n<!--Title-->\n<table
    class='titleTable'
    background='/mwg-internal/de5fs23hu73ds/files/default/img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n
    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE6\xB2\xA1\xE6\x9C\x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n </tr>\n</table>\n<!--/Title-->\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td class=\"policytData\">\n
    \xE6\x82\xA8\xE6\x8C\x87\xE5\xAE\x9A\xE7\x9A\x84\xE7\xBD\x91\xE9\xA1\xB5\xE6\x97\xA0\xE6\xB3\x95\xE8\xAE\xBF\xE9\x97\xAE\xE3\x80\x82\xE8\xAF\xA5\xE9\x97\xAE\xE9\xA2\x98\xE5\x8F\xAF\xE8\x83\xBD\xE6\x98\xAF\xE7\x94\xB1\xE4\xBA\x8E\xE6\x82\xA8\xE8\xAE\xBF\xE9\x97\xAE\xE7\x9A\x84\xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE9\x83\xA8\xE7\xBD\xB2\xE5\x9C\xA8\xE6\xB5\xB7\xE5\xA4\x96\xEF\xBC\x8C\xE7\x94\xB1\xE4\xBA\x8E\xE4\xB8\x80\xE4\xBA\x9B\xE4\xB8\xB4\xE6\x97\xB6\xE7\x9A\x84\xE7\xBD\x91\xE7\xBB\x9C\xE9\x97\xAE\xE9\xA2\x98\xE8\x80\x8C\xE5\xAF\xBC\xE8\x87\xB4\xE7\x9A\x84\xE3\x80\x82\xE8\xBF\x99\xE7\xB1\xBB\xE9\x97\xAE\xE9\xA2\x98\xE5\xB8\xB8\xE5\x87\xBA\xE7\x8E\xB0\xE4\xBA\x8E\xE6\x82\xA8\xE4\xBD\xBF\xE7\x94\xA8Google\xE8\xBF\x9B\xE8\xA1\x8C\xE4\xBF\xA1\xE6\x81\xAF\xE6\x90\x9C\xE7\xB4\xA2\xE6\x97\xB6\xE3\x80\x82\n
    </td>\n </tr>\n</table>\n<!--/Content-->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td class=\"infoData\">\n <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n
    </tr>\n</table>\n<!--/Info-->\n\n<!--/Contents-->\n<!--Policy-->\n<table
    class='policyTable'>\n <tr>\n <td class='policyHeading'>\n <hr>\n
    \xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.
    \xE5\xBC\x80\xE6\x94\xBE\xE4\xBF\xA1\xE6\x81\xAF\xE7\xA7\x91\xE6\x8A\x80\xE3\x80\x81\xE5\x95\x86\xE4\xB8\x9A\xE4\xB8\x8E\xE7\xBB\x8F\xE6\xB5\x8E\xE3\x80\x81\xE6\x96\xB0\xE9\x97\xBB\xE4\xB8\x8E\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81\xE6\x90\x9C\xE7\xB4\xA2\xE5\xBC\x95\xE6\x93\x8E\xE4\xB8\x8E\xE9\x97\xA8\xE6\x88\xB7\xE3\x80\x81\xE6\x94\xBF\xE5\xBA\x9C\xE3\x80\x81\xE6\x95\x99\xE8\x82\xB2\xE3\x80\x81\xE5\x81\xA5\xE5\xBA\xB7\xE3\x80\x81\xE4\xBA\xA4\xE9\x80\x9A\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.
    \xE7\xA6\x81\xE6\xAD\xA2\xE8\xB5\x8C\xE5\x8D\x9A\xE3\x80\x81\xE6\x88\x90\xE4\xBA\xBA\xE3\x80\x81\xE5\xBA\xB8\xE4\xBF\x97\xE3\x80\x81\xE6\x9A\xB4\xE5\x8A\x9B\xE3\x80\x81\xE7\xBD\x91\xE7\xBB\x9C\xE8\x81\x8A\xE5\xA4\xA9\xE3\x80\x81\xE9\x87\x91\xE8\x9E\x8D\xE4\xBF\xA1\xE6\x81\xAF\xE4\xB8\x8E\xE6\x9C\x8D\xE5\x8A\xA1\xE3\x80\x81\xE5\xAE\x97\xE6\x95\x99\xE3\x80\x81\xE6\xB1\x82\xE8\x81\x8C\xE3\x80\x81\xE5\xA8\xB1\xE4\xB9\x90\xE3\x80\x81\xE6\x97\xB6\xE5\xB0\x9A\xE4\xB8\x8E\xE7\x94\x9F\xE6\xB4\xBB\xE3\x80\x81\xE6\xB5\x81\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81Webmail\xE3\x80\x81Blog\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\xE7\xA6\x81\xE6\xAD\xA2\xE9\x80\x9A\xE8\xBF\x87\xE4\xBB\xA3\xE7\x90\x86\xE8\xAE\xBF\xE9\x97\xAE\xE5\x85\xAC\xE5\x8F\xB8\xE5\x86\x85\xE7\xBD\x91\xE8\xB5\x84\xE6\xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.
    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\xB6\xB3\xE5\x91\x98\xE5\xB7\xA5\xE7\x89\xB9\xE6\xAE\x8A\xE9\x9C\x80\xE6\xB1\x82\xEF\xBC\x8C\xE5\x85\xAC\xE5\x8F\xB8\xE6\x8F\x90\xE4\xBE\x9B\xE7\xBD\x91\xE7\xAB\x99\xE5\xBC\x80\xE9\x80\x9A\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xEF\xBC\x8C\xE5\x85\xB7\xE4\xBD\x93\xE8\xAF\xB7\xE5\x8F\x82\xE8\xA7\x81web.neusoft.com->\xE6\x9C\x8D\xE5\x8A\xA1\xE5\xB9\xB3\xE5\x8F\xB0->IT\xE6\x9C\x8D\xE5\x8A\xA1\xE7\xAE\xA1\xE7\x90\x86
    \xE5\x8F\x91\xE5\xB8\x83\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xE5\x92\x8C\xE8\xA1\xA8\xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n </tr>\n</table>\n<!--/Policy-->\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData' >\n
    \xE4\xBF\xA1\xE6\x81\xAF\xE8\xA7\x84\xE5\x88\x92\xE4\xB8\x8E\xE7\xAE\xA1\xE7\x90\x86\xE9\x83\xA8\xEF\xBC\x8C\xE6\xB2\x88\xE9\x98\xB3\xE5\x9B\xAD\xE5\x8C\xBAA2\xE6\xA5\xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\xBC\x9Aipm@neusoft.com\n </td>\n </tr>\n
    <tr>\n <td class='policyData' >\n
    \xE7\x94\xB5\xE8\xAF\x9D\xEF\xBC\x9A+86-24-83665512\xE3\x80\x80\xE3\x80\x80\xE4\xBC\xA0\xE7\x9C\x9F\xEF\xBC\x9A+86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form target=\"_top\" >\n
    <input type=\"button\" onClick=\"javascript:parent.window.close();\"
    value=\"\xE5\x85\xB3\xE9\x97\xAD\xE9\xA1\xB5\xE9\x9D\xA2\">\n\t\t\t</form>\n\n</u></font></td>\n
    </tr>\n</table>\n<!--/Foot-->\n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body-->\n</html>\n", {:via=>"1.1 192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)", :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259 tid=abb1 fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1 fid=a955 INFO --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1 fid=a955 INFO --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1 fid=a955 INFO --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1 fid=a955 INFO --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1 fid=a955 INFO --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1 fid=a955 INFO --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee
  • Yangzifeng1104 at Sep 12, 2012 at 3:20 am
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from other mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway 7.2.0.1.0.13253)"

    On Wed, Sep 12, 2012 at 10:32 AM, <yangzif...@gmail.com <javascript:>>
    wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging script. Although I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<!--
    FileName: index.html\n Language: [en]\n-->\n<!--Head-->\n<head>\n <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif; \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color: #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color: #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n

    <title>\xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE9\xA1\xB5</title>\n
    <script src=\"/mwg-internal/de5fs23hu73ds/files/javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link rel=\"stylesheet\"
    href=\"/mwg-internal/de5fs23hu73ds/files/default/stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!--Body-->\n<body onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n <tr>\n <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n <img
    src='/mwg-internal/de5fs23hu73ds/files/default/img/logo.jpg '>\n </td>\n
    </tr>\n</table>\n<!--/Logo-->\n<!--Contents-->\n<!-- FileName:
    cannotconnect.html\n Language: [en]\n-->\n<!--Title-->\n<table
    class='titleTable'
    background='/mwg-internal/de5fs23hu73ds/files/default/img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n
    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE6\xB2\xA1\xE6\x9C\x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n </tr>\n</table>\n<!--/Title-->\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td class=\"policytData\">\n
    \xE6\x82\xA8\xE6\x8C\x87\xE5\xAE\x9A\xE7\x9A\x84\xE7\xBD\x91\xE9\xA1\xB5\xE6\x97\xA0\xE6\xB3\x95\xE8\xAE\xBF\xE9\x97\xAE\xE3\x80\x82\xE8\xAF\xA5\xE9\x97\xAE\xE9\xA2\x98\xE5\x8F\xAF\xE8\x83\xBD\xE6\x98\xAF\xE7\x94\xB1\xE4\xBA\x8E\xE6\x82\xA8\xE8\xAE\xBF\xE9\x97\xAE\xE7\x9A\x84\xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE9\x83\xA8\xE7\xBD\xB2\xE5\x9C\xA8\xE6\xB5\xB7\xE5\xA4\x96\xEF\xBC\x8C\xE7\x94\xB1\xE4\xBA\x8E\xE4\xB8\x80\xE4\xBA\x9B\xE4\xB8\xB4\xE6\x97\xB6\xE7\x9A\x84\xE7\xBD\x91\xE7\xBB\x9C\xE9\x97\xAE\xE9\xA2\x98\xE8\x80\x8C\xE5\xAF\xBC\xE8\x87\xB4\xE7\x9A\x84\xE3\x80\x82\xE8\xBF\x99\xE7\xB1\xBB\xE9\x97\xAE\xE9\xA2\x98\xE5\xB8\xB8\xE5\x87\xBA\xE7\x8E\xB0\xE4\xBA\x8E\xE6\x82\xA8\xE4\xBD\xBF\xE7\x94\xA8Google\xE8\xBF\x9B\xE8\xA1\x8C\xE4\xBF\xA1\xE6\x81\xAF\xE6\x90\x9C\xE7\xB4\xA2\xE6\x97\xB6\xE3\x80\x82\n
    </td>\n </tr>\n</table>\n<!--/Content-->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td class=\"infoData\">\n <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n
    </tr>\n</table>\n<!--/Info-->\n\n<!--/Contents-->\n<!--Policy-->\n<table
    class='policyTable'>\n <tr>\n <td class='policyHeading'>\n <hr>\n

    \xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.
    \xE5\xBC\x80\xE6\x94\xBE\xE4\xBF\xA1\xE6\x81\xAF\xE7\xA7\x91\xE6\x8A\x80\xE3\x80\x81\xE5\x95\x86\xE4\xB8\x9A\xE4\xB8\x8E\xE7\xBB\x8F\xE6\xB5\x8E\xE3\x80\x81\xE6\x96\xB0\xE9\x97\xBB\xE4\xB8\x8E\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81\xE6\x90\x9C\xE7\xB4\xA2\xE5\xBC\x95\xE6\x93\x8E\xE4\xB8\x8E\xE9\x97\xA8\xE6\x88\xB7\xE3\x80\x81\xE6\x94\xBF\xE5\xBA\x9C\xE3\x80\x81\xE6\x95\x99\xE8\x82\xB2\xE3\x80\x81\xE5\x81\xA5\xE5\xBA\xB7\xE3\x80\x81\xE4\xBA\xA4\xE9\x80\x9A\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.
    \xE7\xA6\x81\xE6\xAD\xA2\xE8\xB5\x8C\xE5\x8D\x9A\xE3\x80\x81\xE6\x88\x90\xE4\xBA\xBA\xE3\x80\x81\xE5\xBA\xB8\xE4\xBF\x97\xE3\x80\x81\xE6\x9A\xB4\xE5\x8A\x9B\xE3\x80\x81\xE7\xBD\x91\xE7\xBB\x9C\xE8\x81\x8A\xE5\xA4\xA9\xE3\x80\x81\xE9\x87\x91\xE8\x9E\x8D\xE4\xBF\xA1\xE6\x81\xAF\xE4\xB8\x8E\xE6\x9C\x8D\xE5\x8A\xA1\xE3\x80\x81\xE5\xAE\x97\xE6\x95\x99\xE3\x80\x81\xE6\xB1\x82\xE8\x81\x8C\xE3\x80\x81\xE5\xA8\xB1\xE4\xB9\x90\xE3\x80\x81\xE6\x97\xB6\xE5\xB0\x9A\xE4\xB8\x8E\xE7\x94\x9F\xE6\xB4\xBB\xE3\x80\x81\xE6\xB5\x81\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81Webmail\xE3\x80\x81Blog\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\xE7\xA6\x81\xE6\xAD\xA2\xE9\x80\x9A\xE8\xBF\x87\xE4\xBB\xA3\xE7\x90\x86\xE8\xAE\xBF\xE9\x97\xAE\xE5\x85\xAC\xE5\x8F\xB8\xE5\x86\x85\xE7\xBD\x91\xE8\xB5\x84\xE6\xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.
    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\xB6\xB3\xE5\x91\x98\xE5\xB7\xA5\xE7\x89\xB9\xE6\xAE\x8A\xE9\x9C\x80\xE6\xB1\x82\xEF\xBC\x8C\xE5\x85\xAC\xE5\x8F\xB8\xE6\x8F\x90\xE4\xBE\x9B\xE7\xBD\x91\xE7\xAB\x99\xE5\xBC\x80\xE9\x80\x9A\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xEF\xBC\x8C\xE5\x85\xB7\xE4\xBD\x93\xE8\xAF\xB7\xE5\x8F\x82\xE8\xA7\x81web.neusoft.com->\xE6\x9C\x8D\xE5\x8A\xA1\xE5\xB9\xB3\xE5\x8F\xB0->IT\xE6\x9C\x8D\xE5\x8A\xA1\xE7\xAE\xA1\xE7\x90\x86

    \xE5\x8F\x91\xE5\xB8\x83\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xE5\x92\x8C\xE8\xA1\xA8\xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n </tr>\n</table>\n<!--/Policy-->\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData' >\n
    \xE4\xBF\xA1\xE6\x81\xAF\xE8\xA7\x84\xE5\x88\x92\xE4\xB8\x8E\xE7\xAE\xA1\xE7\x90\x86\xE9\x83\xA8\xEF\xBC\x8C\xE6\xB2\x88\xE9\x98\xB3\xE5\x9B\xAD\xE5\x8C\xBAA2\xE6\xA5\xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\xBC\x9A...@neusoft.com <javascript:>\n
    </td>\n </tr>\n
    <tr>\n <td class='policyData' >\n
    \xE7\x94\xB5\xE8\xAF\x9D\xEF\xBC\x9A+86-24-83665512\xE3\x80\x80\xE3\x80\x80\xE4\xBC\xA0\xE7\x9C\x9F\xEF\xBC\x9A+86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form target=\"_top\"
    \n
    <input type=\"button\" onClick=\"javascript:parent.window.close();\"
    value=\"\xE5\x85\xB3\xE9\x97\xAD\xE9\xA1\xB5\xE9\x9D\xA2\">\n\t\t\t</form>\n\n</u></font></td>\n
    </tr>\n</table>\n<!--/Foot-->\n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body-->\n</html>\n", {:via=>"1.1 192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)", :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259 tid=abb1 fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1 fid=a955 INFO --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1 fid=a955 INFO --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1 fid=a955 INFO --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1 fid=a955 INFO --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1 fid=a955 INFO --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1 fid=a955 INFO --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee
  • Yongkun Anfernee Gui at Sep 12, 2012 at 3:22 am
    Can you check if nginx is listening on port 80?
    On Wed, Sep 12, 2012 at 11:20 AM, wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from other mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway 7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging script. Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"

    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<!--
    FileName: index.html\n Language: [en]\n-->\n<!--Head-->\n<head>\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif; \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color: #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color: #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n

    <title>\xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE9\xA1\xB5</title>\n
    <script src=\"/mwg-internal/de5fs23hu73ds/files/javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link rel=\"stylesheet\"
    href=\"/mwg-internal/de5fs23hu73ds/files/default/stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!--Body-->\n<body onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n <tr>\n <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n <img
    src='/mwg-internal/de5fs23hu73ds/files/default/img/logo.jpg '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\n<!--Contents-->\n<!-- FileName:
    cannotconnect.html\n Language: [en]\n-->\n<!--Title-->\n<table
    class='titleTable'

    background='/mwg-internal/de5fs23hu73ds/files/default/img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n

    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE6\xB2\xA1\xE6\x9C\x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n </tr>\n</table>\n<!--/Title-->\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td class=\"policytData\">\n

    \xE6\x82\xA8\xE6\x8C\x87\xE5\xAE\x9A\xE7\x9A\x84\xE7\xBD\x91\xE9\xA1\xB5\xE6\x97\xA0\xE6\xB3\x95\xE8\xAE\xBF\xE9\x97\xAE\xE3\x80\x82\xE8\xAF\xA5\xE9\x97\xAE\xE9\xA2\x98\xE5\x8F\xAF\xE8\x83\xBD\xE6\x98\xAF\xE7\x94\xB1\xE4\xBA\x8E\xE6\x82\xA8\xE8\xAE\xBF\xE9\x97\xAE\xE7\x9A\x84\xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE9\x83\xA8\xE7\xBD\xB2\xE5\x9C\xA8\xE6\xB5\xB7\xE5\xA4\x96\xEF\xBC\x8C\xE7\x94\xB1\xE4\xBA\x8E\xE4\xB8\x80\xE4\xBA\x9B\xE4\xB8\xB4\xE6\x97\xB6\xE7\x9A\x84\xE7\xBD\x91\xE7\xBB\x9C\xE9\x97\xAE\xE9\xA2\x98\xE8\x80\x8C\xE5\xAF\xBC\xE8\x87\xB4\xE7\x9A\x84\xE3\x80\x82\xE8\xBF\x99\xE7\xB1\xBB\xE9\x97\xAE\xE9\xA2\x98\xE5\xB8\xB8\xE5\x87\xBA\xE7\x8E\xB0\xE4\xBA\x8E\xE6\x82\xA8\xE4\xBD\xBF\xE7\x94\xA8Google\xE8\xBF\x9B\xE8\xA1\x8C\xE4\xBF\xA1\xE6\x81\xAF\xE6\x90\x9C\xE7\xB4\xA2\xE6\x97\xB6\xE3\x80\x82\n
    </td>\n </tr>\n</table>\n<!--/Content-->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td class=\"infoData\">\n <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n
    </tr>\n</table>\n<!--/Info-->\n\n<!--/Contents-->\n<!--Policy-->\n<table
    class='policyTable'>\n <tr>\n <td class='policyHeading'>\n
    <hr>\n

    \xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.

    \xE5\xBC\x80\xE6\x94\xBE\xE4\xBF\xA1\xE6\x81\xAF\xE7\xA7\x91\xE6\x8A\x80\xE3\x80\x81\xE5\x95\x86\xE4\xB8\x9A\xE4\xB8\x8E\xE7\xBB\x8F\xE6\xB5\x8E\xE3\x80\x81\xE6\x96\xB0\xE9\x97\xBB\xE4\xB8\x8E\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81\xE6\x90\x9C\xE7\xB4\xA2\xE5\xBC\x95\xE6\x93\x8E\xE4\xB8\x8E\xE9\x97\xA8\xE6\x88\xB7\xE3\x80\x81\xE6\x94\xBF\xE5\xBA\x9C\xE3\x80\x81\xE6\x95\x99\xE8\x82\xB2\xE3\x80\x81\xE5\x81\xA5\xE5\xBA\xB7\xE3\x80\x81\xE4\xBA\xA4\xE9\x80\x9A\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.

    \xE7\xA6\x81\xE6\xAD\xA2\xE8\xB5\x8C\xE5\x8D\x9A\xE3\x80\x81\xE6\x88\x90\xE4\xBA\xBA\xE3\x80\x81\xE5\xBA\xB8\xE4\xBF\x97\xE3\x80\x81\xE6\x9A\xB4\xE5\x8A\x9B\xE3\x80\x81\xE7\xBD\x91\xE7\xBB\x9C\xE8\x81\x8A\xE5\xA4\xA9\xE3\x80\x81\xE9\x87\x91\xE8\x9E\x8D\xE4\xBF\xA1\xE6\x81\xAF\xE4\xB8\x8E\xE6\x9C\x8D\xE5\x8A\xA1\xE3\x80\x81\xE5\xAE\x97\xE6\x95\x99\xE3\x80\x81\xE6\xB1\x82\xE8\x81\x8C\xE3\x80\x81\xE5\xA8\xB1\xE4\xB9\x90\xE3\x80\x81\xE6\x97\xB6\xE5\xB0\x9A\xE4\xB8\x8E\xE7\x94\x9F\xE6\xB4\xBB\xE3\x80\x81\xE6\xB5\x81\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81Webmail\xE3\x80\x81Blog\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\xE7\xA6\x81\xE6\xAD\xA2\xE9\x80\x9A\xE8\xBF\x87\xE4\xBB\xA3\xE7\x90\x86\xE8\xAE\xBF\xE9\x97\xAE\xE5\x85\xAC\xE5\x8F\xB8\xE5\x86\x85\xE7\xBD\x91\xE8\xB5\x84\xE6\xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.

    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\xB6\xB3\xE5\x91\x98\xE5\xB7\xA5\xE7\x89\xB9\xE6\xAE\x8A\xE9\x9C\x80\xE6\xB1\x82\xEF\xBC\x8C\xE5\x85\xAC\xE5\x8F\xB8\xE6\x8F\x90\xE4\xBE\x9B\xE7\xBD\x91\xE7\xAB\x99\xE5\xBC\x80\xE9\x80\x9A\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xEF\xBC\x8C\xE5\x85\xB7\xE4\xBD\x93\xE8\xAF\xB7\xE5\x8F\x82\xE8\xA7\x81web.neusoft.com->\xE6\x9C\x8D\xE5\x8A\xA1\xE5\xB9\xB3\xE5\x8F\xB0->IT\xE6\x9C\x8D\xE5\x8A\xA1\xE7\xAE\xA1\xE7\x90\x86

    \xE5\x8F\x91\xE5\xB8\x83\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xE5\x92\x8C\xE8\xA1\xA8\xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n </tr>\n</table>\n<!--/Policy-->\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData' >\n

    \xE4\xBF\xA1\xE6\x81\xAF\xE8\xA7\x84\xE5\x88\x92\xE4\xB8\x8E\xE7\xAE\xA1\xE7\x90\x86\xE9\x83\xA8\xEF\xBC\x8C\xE6\xB2\x88\xE9\x98\xB3\xE5\x9B\xAD\xE5\x8C\xBAA2\xE6\xA5\xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\xBC\x9A...@neusoft.com\n </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n

    \xE7\x94\xB5\xE8\xAF\x9D\xEF\xBC\x9A+86-24-83665512\xE3\x80\x80\xE3\x80\x80\xE4\xBC\xA0\xE7\x9C\x9F\xEF\xBC\x9A+86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form target=\"_top\"
    \n
    <input type=\"button\" onClick=\"javascript:parent.window.close();\"

    value=\"\xE5\x85\xB3\xE9\x97\xAD\xE9\xA1\xB5\xE9\x9D\xA2\">\n\t\t\t</form>\n\n</u></font></td>\n
    </tr>\n</table>\n<!--/Foot-->\n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body-->\n</html>\n", {:via=>"1.1 192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)", :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259 tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1 fid=a955 INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1 fid=a955 INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1 fid=a955 INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1 fid=a955 INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1 fid=a955 INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1 fid=a955 INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Yangzifeng1104 at Sep 12, 2012 at 3:26 am
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,Anfernee Gui写道:
    Can you check if nginx is listening on port 80?

    On Wed, Sep 12, 2012 at 11:20 AM, <yangzif...@gmail.com <javascript:>>
    wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from other mechine.
    在 2012年9月12日星期三UTC+8上午11时12分45秒,Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway 7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"
    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<!--
    FileName: index.html\n Language: [en]\n-->\n<!--Head-->\n<head>\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif; \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color: #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n
    <title>\xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE9\xA1\xB5</title>\n
    <script src=\"/mwg-internal/de5fs23hu73ds/files/javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link rel=\"stylesheet\"
    href=\"/mwg-internal/de5fs23hu73ds/files/default/stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!--Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n <tr>\n <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n <img
    src='/mwg-internal/de5fs23hu73ds/files/default/img/logo.jpg '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\n<!--Contents-->\n<!-- FileName:
    cannotconnect.html\n Language: [en]\n-->\n<!--Title-->\n<table
    class='titleTable'
    background='/mwg-internal/de5fs23hu73ds/files/default/img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n
    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE6\xB2\xA1\xE6\x9C\x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n </tr>\n</table>\n<!--/Title-->\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td class=\"policytData\">\n
    \xE6\x82\xA8\xE6\x8C\x87\xE5\xAE\x9A\xE7\x9A\x84\xE7\xBD\x91\xE9\xA1\xB5\xE6\x97\xA0\xE6\xB3\x95\xE8\xAE\xBF\xE9\x97\xAE\xE3\x80\x82\xE8\xAF\xA5\xE9\x97\xAE\xE9\xA2\x98\xE5\x8F\xAF\xE8\x83\xBD\xE6\x98\xAF\xE7\x94\xB1\xE4\xBA\x8E\xE6\x82\xA8\xE8\xAE\xBF\xE9\x97\xAE\xE7\x9A\x84\xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE9\x83\xA8\xE7\xBD\xB2\xE5\x9C\xA8\xE6\xB5\xB7\xE5\xA4\x96\xEF\xBC\x8C\xE7\x94\xB1\xE4\xBA\x8E\xE4\xB8\x80\xE4\xBA\x9B\xE4\xB8\xB4\xE6\x97\xB6\xE7\x9A\x84\xE7\xBD\x91\xE7\xBB\x9C\xE9\x97\xAE\xE9\xA2\x98\xE8\x80\x8C\xE5\xAF\xBC\xE8\x87\xB4\xE7\x9A\x84\xE3\x80\x82\xE8\xBF\x99\xE7\xB1\xBB\xE9\x97\xAE\xE9\xA2\x98\xE5\xB8\xB8\xE5\x87\xBA\xE7\x8E\xB0\xE4\xBA\x8E\xE6\x82\xA8\xE4\xBD\xBF\xE7\x94\xA8Google\xE8\xBF\x9B\xE8\xA1\x8C\xE4\xBF\xA1\xE6\x81\xAF\xE6\x90\x9C\xE7\xB4\xA2\xE6\x97\xB6\xE3\x80\x82\n
    </td>\n </tr>\n</table>\n<!--/Content-->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n
    </tr>\n</table>\n<!--/Info-->\n\n<!--/Contents-->\n<!--Policy-->\n<table
    class='policyTable'>\n <tr>\n <td class='policyHeading'>\n
    <hr>\n
    \xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.
    \xE5\xBC\x80\xE6\x94\xBE\xE4\xBF\xA1\xE6\x81\xAF\xE7\xA7\x91\xE6\x8A\x80\xE3\x80\x81\xE5\x95\x86\xE4\xB8\x9A\xE4\xB8\x8E\xE7\xBB\x8F\xE6\xB5\x8E\xE3\x80\x81\xE6\x96\xB0\xE9\x97\xBB\xE4\xB8\x8E\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81\xE6\x90\x9C\xE7\xB4\xA2\xE5\xBC\x95\xE6\x93\x8E\xE4\xB8\x8E\xE9\x97\xA8\xE6\x88\xB7\xE3\x80\x81\xE6\x94\xBF\xE5\xBA\x9C\xE3\x80\x81\xE6\x95\x99\xE8\x82\xB2\xE3\x80\x81\xE5\x81\xA5\xE5\xBA\xB7\xE3\x80\x81\xE4\xBA\xA4\xE9\x80\x9A\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.
    \xE7\xA6\x81\xE6\xAD\xA2\xE8\xB5\x8C\xE5\x8D\x9A\xE3\x80\x81\xE6\x88\x90\xE4\xBA\xBA\xE3\x80\x81\xE5\xBA\xB8\xE4\xBF\x97\xE3\x80\x81\xE6\x9A\xB4\xE5\x8A\x9B\xE3\x80\x81\xE7\xBD\x91\xE7\xBB\x9C\xE8\x81\x8A\xE5\xA4\xA9\xE3\x80\x81\xE9\x87\x91\xE8\x9E\x8D\xE4\xBF\xA1\xE6\x81\xAF\xE4\xB8\x8E\xE6\x9C\x8D\xE5\x8A\xA1\xE3\x80\x81\xE5\xAE\x97\xE6\x95\x99\xE3\x80\x81\xE6\xB1\x82\xE8\x81\x8C\xE3\x80\x81\xE5\xA8\xB1\xE4\xB9\x90\xE3\x80\x81\xE6\x97\xB6\xE5\xB0\x9A\xE4\xB8\x8E\xE7\x94\x9F\xE6\xB4\xBB\xE3\x80\x81\xE6\xB5\x81\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81Webmail\xE3\x80\x81Blog\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\xE7\xA6\x81\xE6\xAD\xA2\xE9\x80\x9A\xE8\xBF\x87\xE4\xBB\xA3\xE7\x90\x86\xE8\xAE\xBF\xE9\x97\xAE\xE5\x85\xAC\xE5\x8F\xB8\xE5\x86\x85\xE7\xBD\x91\xE8\xB5\x84\xE6\xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.
    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\xB6\xB3\xE5\x91\x98\xE5\xB7\xA5\xE7\x89\xB9\xE6\xAE\x8A\xE9\x9C\x80\xE6\xB1\x82\xEF\xBC\x8C\xE5\x85\xAC\xE5\x8F\xB8\xE6\x8F\x90\xE4\xBE\x9B\xE7\xBD\x91\xE7\xAB\x99\xE5\xBC\x80\xE9\x80\x9A\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xEF\xBC\x8C\xE5\x85\xB7\xE4\xBD\x93\xE8\xAF\xB7\xE5\x8F\x82\xE8\xA7\x81web.neusoft.com->\xE6\x9C\x8D\xE5\x8A\xA1\xE5\xB9\xB3\xE5\x8F\xB0->IT\xE6\x9C\x8D\xE5\x8A\xA1\xE7\xAE\xA1\xE7\x90\x86
    \xE5\x8F\x91\xE5\xB8\x83\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xE5\x92\x8C\xE8\xA1\xA8\xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n </tr>\n</table>\n<!--/Policy-->\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData' >\n
    \xE4\xBF\xA1\xE6\x81\xAF\xE8\xA7\x84\xE5\x88\x92\xE4\xB8\x8E\xE7\xAE\xA1\xE7\x90\x86\xE9\x83\xA8\xEF\xBC\x8C\xE6\xB2\x88\xE9\x98\xB3\xE5\x9B\xAD\xE5\x8C\xBAA2\xE6\xA5\xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\xBC\x9A...@neusoft.com\n </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n
    \xE7\x94\xB5\xE8\xAF\x9D\xEF\xBC\x9A+86-24-83665512\xE3\x80\x80\xE3\x80\x80\xE4\xBC\xA0\xE7\x9C\x9F\xEF\xBC\x9A+86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\" onClick=\"javascript:parent.window.close();\"
    value=\"\xE5\x85\xB3\xE9\x97\xAD\xE9\xA1\xB5\xE9\x9D\xA2\">\n\t\t\t</form>\n\n</u></font></td>\n
    </tr>\n</table>\n<!--/Foot-->\n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body-->\n</html>\n", {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)", :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259 tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Yongkun Anfernee Gui at Sep 12, 2012 at 3:30 am
    Just do:
    $ sudo netstat -lnp | grep :80
    On Wed, Sep 12, 2012 at 11:26 AM, wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,Anfernee Gui写道:
    Can you check if nginx is listening on port 80?
    On Wed, Sep 12, 2012 at 11:20 AM, wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway 7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"


    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<!--
    FileName: index.html\n Language: [en]\n-->\n<!--Head-->\n<head>\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif; \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color: #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n


    <title>\xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE9\xA1\xB5</title>\n
    <script src=\"/mwg-internal/de5fs23hu73ds/files/javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link rel=\"stylesheet\"
    href=\"/mwg-internal/de5fs23hu73ds/files/default/stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!--Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n <tr>\n <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n <img
    src='/mwg-internal/de5fs23hu73ds/files/default/img/logo.jpg '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\n<!--Contents-->\n<!-- FileName:
    cannotconnect.html\n Language: [en]\n-->\n<!--Title-->\n<table
    class='titleTable'


    background='/mwg-internal/de5fs23hu73ds/files/default/img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n


    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE6\xB2\xA1\xE6\x9C\x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n </tr>\n</table>\n<!--/Title-->\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td class=\"policytData\">\n


    \xE6\x82\xA8\xE6\x8C\x87\xE5\xAE\x9A\xE7\x9A\x84\xE7\xBD\x91\xE9\xA1\xB5\xE6\x97\xA0\xE6\xB3\x95\xE8\xAE\xBF\xE9\x97\xAE\xE3\x80\x82\xE8\xAF\xA5\xE9\x97\xAE\xE9\xA2\x98\xE5\x8F\xAF\xE8\x83\xBD\xE6\x98\xAF\xE7\x94\xB1\xE4\xBA\x8E\xE6\x82\xA8\xE8\xAE\xBF\xE9\x97\xAE\xE7\x9A\x84\xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE9\x83\xA8\xE7\xBD\xB2\xE5\x9C\xA8\xE6\xB5\xB7\xE5\xA4\x96\xEF\xBC\x8C\xE7\x94\xB1\xE4\xBA\x8E\xE4\xB8\x80\xE4\xBA\x9B\xE4\xB8\xB4\xE6\x97\xB6\xE7\x9A\x84\xE7\xBD\x91\xE7\xBB\x9C\xE9\x97\xAE\xE9\xA2\x98\xE8\x80\x8C\xE5\xAF\xBC\xE8\x87\xB4\xE7\x9A\x84\xE3\x80\x82\xE8\xBF\x99\xE7\xB1\xBB\xE9\x97\xAE\xE9\xA2\x98\xE5\xB8\xB8\xE5\x87\xBA\xE7\x8E\xB0\xE4\xBA\x8E\xE6\x82\xA8\xE4\xBD\xBF\xE7\x94\xA8Google\xE8\xBF\x9B\xE8\xA1\x8C\xE4\xBF\xA1\xE6\x81\xAF\xE6\x90\x9C\xE7\xB4\xA2\xE6\x97\xB6\xE3\x80\x82\n
    </td>\n </tr>\n</table>\n<!--/Content-->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n

    </tr>\n</table>\n<!--/Info-->\n\n<!--/Contents-->\n<!--Policy-->\n<table
    class='policyTable'>\n <tr>\n <td class='policyHeading'>\n
    <hr>\n


    \xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.


    \xE5\xBC\x80\xE6\x94\xBE\xE4\xBF\xA1\xE6\x81\xAF\xE7\xA7\x91\xE6\x8A\x80\xE3\x80\x81\xE5\x95\x86\xE4\xB8\x9A\xE4\xB8\x8E\xE7\xBB\x8F\xE6\xB5\x8E\xE3\x80\x81\xE6\x96\xB0\xE9\x97\xBB\xE4\xB8\x8E\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81\xE6\x90\x9C\xE7\xB4\xA2\xE5\xBC\x95\xE6\x93\x8E\xE4\xB8\x8E\xE9\x97\xA8\xE6\x88\xB7\xE3\x80\x81\xE6\x94\xBF\xE5\xBA\x9C\xE3\x80\x81\xE6\x95\x99\xE8\x82\xB2\xE3\x80\x81\xE5\x81\xA5\xE5\xBA\xB7\xE3\x80\x81\xE4\xBA\xA4\xE9\x80\x9A\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.


    \xE7\xA6\x81\xE6\xAD\xA2\xE8\xB5\x8C\xE5\x8D\x9A\xE3\x80\x81\xE6\x88\x90\xE4\xBA\xBA\xE3\x80\x81\xE5\xBA\xB8\xE4\xBF\x97\xE3\x80\x81\xE6\x9A\xB4\xE5\x8A\x9B\xE3\x80\x81\xE7\xBD\x91\xE7\xBB\x9C\xE8\x81\x8A\xE5\xA4\xA9\xE3\x80\x81\xE9\x87\x91\xE8\x9E\x8D\xE4\xBF\xA1\xE6\x81\xAF\xE4\xB8\x8E\xE6\x9C\x8D\xE5\x8A\xA1\xE3\x80\x81\xE5\xAE\x97\xE6\x95\x99\xE3\x80\x81\xE6\xB1\x82\xE8\x81\x8C\xE3\x80\x81\xE5\xA8\xB1\xE4\xB9\x90\xE3\x80\x81\xE6\x97\xB6\xE5\xB0\x9A\xE4\xB8\x8E\xE7\x94\x9F\xE6\xB4\xBB\xE3\x80\x81\xE6\xB5\x81\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81Webmail\xE3\x80\x81Blog\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\xE7\xA6\x81\xE6\xAD\xA2\xE9\x80\x9A\xE8\xBF\x87\xE4\xBB\xA3\xE7\x90\x86\xE8\xAE\xBF\xE9\x97\xAE\xE5\x85\xAC\xE5\x8F\xB8\xE5\x86\x85\xE7\xBD\x91\xE8\xB5\x84\xE6\xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.


    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\xB6\xB3\xE5\x91\x98\xE5\xB7\xA5\xE7\x89\xB9\xE6\xAE\x8A\xE9\x9C\x80\xE6\xB1\x82\xEF\xBC\x8C\xE5\x85\xAC\xE5\x8F\xB8\xE6\x8F\x90\xE4\xBE\x9B\xE7\xBD\x91\xE7\xAB\x99\xE5\xBC\x80\xE9\x80\x9A\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xEF\xBC\x8C\xE5\x85\xB7\xE4\xBD\x93\xE8\xAF\xB7\xE5\x8F\x82\xE8\xA7\x81web.neusoft.com->\xE6\x9C\x8D\xE5\x8A\xA1\xE5\xB9\xB3\xE5\x8F\xB0->IT\xE6\x9C\x8D\xE5\x8A\xA1\xE7\xAE\xA1\xE7\x90\x86


    \xE5\x8F\x91\xE5\xB8\x83\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xE5\x92\x8C\xE8\xA1\xA8\xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n </tr>\n</table>\n<!--/Policy-->\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData' >\n


    \xE4\xBF\xA1\xE6\x81\xAF\xE8\xA7\x84\xE5\x88\x92\xE4\xB8\x8E\xE7\xAE\xA1\xE7\x90\x86\xE9\x83\xA8\xEF\xBC\x8C\xE6\xB2\x88\xE9\x98\xB3\xE5\x9B\xAD\xE5\x8C\xBAA2\xE6\xA5\xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\xBC\x9A...@neusoft.com\n </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n


    \xE7\x94\xB5\xE8\xAF\x9D\xEF\xBC\x9A+86-24-83665512\xE3\x80\x80\xE3\x80\x80\xE4\xBC\xA0\xE7\x9C\x9F\xEF\xBC\x9A+86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\" onClick=\"javascript:parent.window.close();\"


    value=\"\xE5\x85\xB3\xE9\x97\xAD\xE9\xA1\xB5\xE9\x9D\xA2\">\n\t\t\t</form>\n\n</u></font></td>\n
    </tr>\n</table>\n<!--/Foot-->\n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body-->\n</html>\n", {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)", :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259 tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Yangzifeng1104 at Sep 12, 2012 at 3:32 am
    the out put is
    netstat -lnp | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    3312/apache2

    在 2012年9月12日星期三UTC+8上午11时30分52秒,Anfernee Gui写道:
    Just do:
    $ sudo netstat -lnp | grep :80

    On Wed, Sep 12, 2012 at 11:26 AM, <yangzif...@gmail.com <javascript:>>
    wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,Anfernee Gui写道:
    Can you check if nginx is listening on port 80?
    On Wed, Sep 12, 2012 at 11:20 AM, wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway 7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"


    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<!--
    FileName: index.html\n Language:
    [en]\n-->\n<!--Head-->\n<head>\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif; \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color:
    #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n

    <title>\xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE9\xA1\xB5</title>\n
    <script src=\"/mwg-internal/de5fs23hu73ds/files/javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link rel=\"stylesheet\"
    href=\"/mwg-internal/de5fs23hu73ds/files/default/stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!--Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n <tr>\n
    <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n <img
    src='/mwg-internal/de5fs23hu73ds/files/default/img/logo.jpg '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\n<!--Contents-->\n<!-- FileName:
    cannotconnect.html\n Language: [en]\n-->\n<!--Title-->\n<table
    class='titleTable'

    background='/mwg-internal/de5fs23hu73ds/files/default/img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n

    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE6\xB2\xA1\xE6\x9C\x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n </tr>\n</table>\n<!--/Title-->\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td class=\"policytData\">\n

    \xE6\x82\xA8\xE6\x8C\x87\xE5\xAE\x9A\xE7\x9A\x84\xE7\xBD\x91\xE9\xA1\xB5\xE6\x97\xA0\xE6\xB3\x95\xE8\xAE\xBF\xE9\x97\xAE\xE3\x80\x82\xE8\xAF\xA5\xE9\x97\xAE\xE9\xA2\x98\xE5\x8F\xAF\xE8\x83\xBD\xE6\x98\xAF\xE7\x94\xB1\xE4\xBA\x8E\xE6\x82\xA8\xE8\xAE\xBF\xE9\x97\xAE\xE7\x9A\x84\xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE9\x83\xA8\xE7\xBD\xB2\xE5\x9C\xA8\xE6\xB5\xB7\xE5\xA4\x96\xEF\xBC\x8C\xE7\x94\xB1\xE4\xBA\x8E\xE4\xB8\x80\xE4\xBA\x9B\xE4\xB8\xB4\xE6\x97\xB6\xE7\x9A\x84\xE7\xBD\x91\xE7\xBB\x9C\xE9\x97\xAE\xE9\xA2\x98\xE8\x80\x8C\xE5\xAF\xBC\xE8\x87\xB4\xE7\x9A\x84\xE3\x80\x82\xE8\xBF\x99\xE7\xB1\xBB\xE9\x97\xAE\xE9\xA2\x98\xE5\xB8\xB8\xE5\x87\xBA\xE7\x8E\xB0\xE4\xBA\x8E\xE6\x82\xA8\xE4\xBD\xBF\xE7\x94\xA8Google\xE8\xBF\x9B\xE8\xA1\x8C\xE4\xBF\xA1\xE6\x81\xAF\xE6\x90\x9C\xE7\xB4\xA2\xE6\x97\xB6\xE3\x80\x82\n
    </td>\n </tr>\n</table>\n<!--/Content-->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n
    </tr>\n</table>\n<!--/Info-->\n\n<!--/Contents-->\n<!--Policy-->\n<table
    class='policyTable'>\n <tr>\n <td class='policyHeading'>\n
    <hr>\n

    \xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.

    \xE5\xBC\x80\xE6\x94\xBE\xE4\xBF\xA1\xE6\x81\xAF\xE7\xA7\x91\xE6\x8A\x80\xE3\x80\x81\xE5\x95\x86\xE4\xB8\x9A\xE4\xB8\x8E\xE7\xBB\x8F\xE6\xB5\x8E\xE3\x80\x81\xE6\x96\xB0\xE9\x97\xBB\xE4\xB8\x8E\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81\xE6\x90\x9C\xE7\xB4\xA2\xE5\xBC\x95\xE6\x93\x8E\xE4\xB8\x8E\xE9\x97\xA8\xE6\x88\xB7\xE3\x80\x81\xE6\x94\xBF\xE5\xBA\x9C\xE3\x80\x81\xE6\x95\x99\xE8\x82\xB2\xE3\x80\x81\xE5\x81\xA5\xE5\xBA\xB7\xE3\x80\x81\xE4\xBA\xA4\xE9\x80\x9A\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.

    \xE7\xA6\x81\xE6\xAD\xA2\xE8\xB5\x8C\xE5\x8D\x9A\xE3\x80\x81\xE6\x88\x90\xE4\xBA\xBA\xE3\x80\x81\xE5\xBA\xB8\xE4\xBF\x97\xE3\x80\x81\xE6\x9A\xB4\xE5\x8A\x9B\xE3\x80\x81\xE7\xBD\x91\xE7\xBB\x9C\xE8\x81\x8A\xE5\xA4\xA9\xE3\x80\x81\xE9\x87\x91\xE8\x9E\x8D\xE4\xBF\xA1\xE6\x81\xAF\xE4\xB8\x8E\xE6\x9C\x8D\xE5\x8A\xA1\xE3\x80\x81\xE5\xAE\x97\xE6\x95\x99\xE3\x80\x81\xE6\xB1\x82\xE8\x81\x8C\xE3\x80\x81\xE5\xA8\xB1\xE4\xB9\x90\xE3\x80\x81\xE6\x97\xB6\xE5\xB0\x9A\xE4\xB8\x8E\xE7\x94\x9F\xE6\xB4\xBB\xE3\x80\x81\xE6\xB5\x81\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81Webmail\xE3\x80\x81Blog\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\xE7\xA6\x81\xE6\xAD\xA2\xE9\x80\x9A\xE8\xBF\x87\xE4\xBB\xA3\xE7\x90\x86\xE8\xAE\xBF\xE9\x97\xAE\xE5\x85\xAC\xE5\x8F\xB8\xE5\x86\x85\xE7\xBD\x91\xE8\xB5\x84\xE6\xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.

    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\xB6\xB3\xE5\x91\x98\xE5\xB7\xA5\xE7\x89\xB9\xE6\xAE\x8A\xE9\x9C\x80\xE6\xB1\x82\xEF\xBC\x8C\xE5\x85\xAC\xE5\x8F\xB8\xE6\x8F\x90\xE4\xBE\x9B\xE7\xBD\x91\xE7\xAB\x99\xE5\xBC\x80\xE9\x80\x9A\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xEF\xBC\x8C\xE5\x85\xB7\xE4\xBD\x93\xE8\xAF\xB7\xE5\x8F\x82\xE8\xA7\x81web.neusoft.com->\xE6\x9C\x8D\xE5\x8A\xA1\xE5\xB9\xB3\xE5\x8F\xB0->IT\xE6\x9C\x8D\xE5\x8A\xA1\xE7\xAE\xA1\xE7\x90\x86
    \xE5\x8F\x91\xE5\xB8\x83\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xE5\x92\x8C\xE8\xA1\xA8\xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n
    </tr>\n</table>\n<!--/Policy-->\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData' >\n

    \xE4\xBF\xA1\xE6\x81\xAF\xE8\xA7\x84\xE5\x88\x92\xE4\xB8\x8E\xE7\xAE\xA1\xE7\x90\x86\xE9\x83\xA8\xEF\xBC\x8C\xE6\xB2\x88\xE9\x98\xB3\xE5\x9B\xAD\xE5\x8C\xBAA2\xE6\xA5\xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\xBC\x9A...@neusoft.com\n </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n

    \xE7\x94\xB5\xE8\xAF\x9D\xEF\xBC\x9A+86-24-83665512\xE3\x80\x80\xE3\x80\x80\xE4\xBC\xA0\xE7\x9C\x9F\xEF\xBC\x9A+86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\"
    onClick=\"javascript:parent.window.close();\"
    value=\"\xE5\x85\xB3\xE9\x97\xAD\xE9\xA1\xB5\xE9\x9D\xA2\">\n\t\t\t</form>\n\n</u></font></td>\n
    </tr>\n</table>\n<!--/Foot-->\n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body-->\n</html>\n", {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)", :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259 tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Yongkun Anfernee Gui at Sep 12, 2012 at 3:36 am
    apache2 hijacked the http request.
    stop it. and do

    $ service nginx_router start

    instead.

    On Wed, Sep 12, 2012 at 11:32 AM, wrote:
    the out put is
    netstat -lnp | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    3312/apache2

    在 2012年9月12日星期三UTC+8上午11时30分52秒,Anfernee Gui写道:
    Just do:
    $ sudo netstat -lnp | grep :80
    On Wed, Sep 12, 2012 at 11:26 AM, wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,Anfernee Gui写道:
    Can you check if nginx is listening on port 80?
    On Wed, Sep 12, 2012 at 11:20 AM, wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway 7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"



    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<!--
    FileName: index.html\n Language:
    [en]\n-->\n<!--Head-->\n<head>\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif; \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color:
    #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n



    <title>\xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE9\xA1\xB5</title>\n
    <script src=\"/mwg-internal/de5fs23hu73ds/files/javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link rel=\"stylesheet\"
    href=\"/mwg-internal/de5fs23hu73ds/files/default/stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!--Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n <tr>\n
    <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n <img
    src='/mwg-internal/de5fs23hu73ds/files/default/img/logo.jpg '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\n<!--Contents-->\n<!-- FileName:
    cannotconnect.html\n Language: [en]\n-->\n<!--Title-->\n<table
    class='titleTable'



    background='/mwg-internal/de5fs23hu73ds/files/default/img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n



    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE6\xB2\xA1\xE6\x9C\x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n </tr>\n</table>\n<!--/Title-->\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td class=\"policytData\">\n



    \xE6\x82\xA8\xE6\x8C\x87\xE5\xAE\x9A\xE7\x9A\x84\xE7\xBD\x91\xE9\xA1\xB5\xE6\x97\xA0\xE6\xB3\x95\xE8\xAE\xBF\xE9\x97\xAE\xE3\x80\x82\xE8\xAF\xA5\xE9\x97\xAE\xE9\xA2\x98\xE5\x8F\xAF\xE8\x83\xBD\xE6\x98\xAF\xE7\x94\xB1\xE4\xBA\x8E\xE6\x82\xA8\xE8\xAE\xBF\xE9\x97\xAE\xE7\x9A\x84\xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE9\x83\xA8\xE7\xBD\xB2\xE5\x9C\xA8\xE6\xB5\xB7\xE5\xA4\x96\xEF\xBC\x8C\xE7\x94\xB1\xE4\xBA\x8E\xE4\xB8\x80\xE4\xBA\x9B\xE4\xB8\xB4\xE6\x97\xB6\xE7\x9A\x84\xE7\xBD\x91\xE7\xBB\x9C\xE9\x97\xAE\xE9\xA2\x98\xE8\x80\x8C\xE5\xAF\xBC\xE8\x87\xB4\xE7\x9A\x84\xE3\x80\x82\xE8\xBF\x99\xE7\xB1\xBB\xE9\x97\xAE\xE9\xA2\x98\xE5\xB8\xB8\xE5\x87\xBA\xE7\x8E\xB0\xE4\xBA\x8E\xE6\x82\xA8\xE4\xBD\xBF\xE7\x94\xA8Google\xE8\xBF\x9B\xE8\xA1\x8C\xE4\xBF\xA1\xE6\x81\xAF\xE6\x90\x9C\xE7\xB4\xA2\xE6\x97\xB6\xE3\x80\x82\n
    </td>\n </tr>\n</table>\n<!--/Content-->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n


    </tr>\n</table>\n<!--/Info-->\n\n<!--/Contents-->\n<!--Policy-->\n<table
    class='policyTable'>\n <tr>\n <td class='policyHeading'>\n
    <hr>\n



    \xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.



    \xE5\xBC\x80\xE6\x94\xBE\xE4\xBF\xA1\xE6\x81\xAF\xE7\xA7\x91\xE6\x8A\x80\xE3\x80\x81\xE5\x95\x86\xE4\xB8\x9A\xE4\xB8\x8E\xE7\xBB\x8F\xE6\xB5\x8E\xE3\x80\x81\xE6\x96\xB0\xE9\x97\xBB\xE4\xB8\x8E\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81\xE6\x90\x9C\xE7\xB4\xA2\xE5\xBC\x95\xE6\x93\x8E\xE4\xB8\x8E\xE9\x97\xA8\xE6\x88\xB7\xE3\x80\x81\xE6\x94\xBF\xE5\xBA\x9C\xE3\x80\x81\xE6\x95\x99\xE8\x82\xB2\xE3\x80\x81\xE5\x81\xA5\xE5\xBA\xB7\xE3\x80\x81\xE4\xBA\xA4\xE9\x80\x9A\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.



    \xE7\xA6\x81\xE6\xAD\xA2\xE8\xB5\x8C\xE5\x8D\x9A\xE3\x80\x81\xE6\x88\x90\xE4\xBA\xBA\xE3\x80\x81\xE5\xBA\xB8\xE4\xBF\x97\xE3\x80\x81\xE6\x9A\xB4\xE5\x8A\x9B\xE3\x80\x81\xE7\xBD\x91\xE7\xBB\x9C\xE8\x81\x8A\xE5\xA4\xA9\xE3\x80\x81\xE9\x87\x91\xE8\x9E\x8D\xE4\xBF\xA1\xE6\x81\xAF\xE4\xB8\x8E\xE6\x9C\x8D\xE5\x8A\xA1\xE3\x80\x81\xE5\xAE\x97\xE6\x95\x99\xE3\x80\x81\xE6\xB1\x82\xE8\x81\x8C\xE3\x80\x81\xE5\xA8\xB1\xE4\xB9\x90\xE3\x80\x81\xE6\x97\xB6\xE5\xB0\x9A\xE4\xB8\x8E\xE7\x94\x9F\xE6\xB4\xBB\xE3\x80\x81\xE6\xB5\x81\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81Webmail\xE3\x80\x81Blog\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\xE7\xA6\x81\xE6\xAD\xA2\xE9\x80\x9A\xE8\xBF\x87\xE4\xBB\xA3\xE7\x90\x86\xE8\xAE\xBF\xE9\x97\xAE\xE5\x85\xAC\xE5\x8F\xB8\xE5\x86\x85\xE7\xBD\x91\xE8\xB5\x84\xE6\xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.



    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\xB6\xB3\xE5\x91\x98\xE5\xB7\xA5\xE7\x89\xB9\xE6\xAE\x8A\xE9\x9C\x80\xE6\xB1\x82\xEF\xBC\x8C\xE5\x85\xAC\xE5\x8F\xB8\xE6\x8F\x90\xE4\xBE\x9B\xE7\xBD\x91\xE7\xAB\x99\xE5\xBC\x80\xE9\x80\x9A\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xEF\xBC\x8C\xE5\x85\xB7\xE4\xBD\x93\xE8\xAF\xB7\xE5\x8F\x82\xE8\xA7\x81web.neusoft.com->\xE6\x9C\x8D\xE5\x8A\xA1\xE5\xB9\xB3\xE5\x8F\xB0->IT\xE6\x9C\x8D\xE5\x8A\xA1\xE7\xAE\xA1\xE7\x90\x86



    \xE5\x8F\x91\xE5\xB8\x83\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xE5\x92\x8C\xE8\xA1\xA8\xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n
    </tr>\n</table>\n<!--/Policy-->\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData' >\n



    \xE4\xBF\xA1\xE6\x81\xAF\xE8\xA7\x84\xE5\x88\x92\xE4\xB8\x8E\xE7\xAE\xA1\xE7\x90\x86\xE9\x83\xA8\xEF\xBC\x8C\xE6\xB2\x88\xE9\x98\xB3\xE5\x9B\xAD\xE5\x8C\xBAA2\xE6\xA5\xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\xBC\x9A...@neusoft.com\n </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n



    \xE7\x94\xB5\xE8\xAF\x9D\xEF\xBC\x9A+86-24-83665512\xE3\x80\x80\xE3\x80\x80\xE4\xBC\xA0\xE7\x9C\x9F\xEF\xBC\x9A+86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\"
    onClick=\"javascript:parent.window.close();\"



    value=\"\xE5\x85\xB3\xE9\x97\xAD\xE9\xA1\xB5\xE9\x9D\xA2\">\n\t\t\t</form>\n\n</u></font></td>\n
    </tr>\n</table>\n<!--/Foot-->\n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body-->\n</html>\n", {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)", :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259 tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1 fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Yangzifeng1104 at Sep 12, 2012 at 5:17 am
    Hi Anfernee:
    Now I run the nginx.
    netstat -lnp|grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    27125/nginx: master

    The error information changed like below:
    vmc target api.vcap.me
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y
    Error (JSON 404): VCAP ROUTER: 404 - DESTINATION ...

    the vcap.access.log information is :
    api.vcap.me - [12/Sep/2012:05:48:50 -0700] "GET /info HTTP/1.1" 404 311 "-"
    "Ruby" 127.0.0.1 response_time:0.020

    My Nginx.conf is like below, and I see the file /tmp/router.sock
    user www-data;
    worker_processes 1;

    error_log /var/log/nginx/error.log;
    pid /var/run/nginx.pid;

    events {
    worker_connections 2048;
    use epoll;
    # multi_accept on;
    }

    http {
    include /etc/nginx/mime.types;
    access_log /var/log/nginx/access.log;

    log_format main '$host - [$time_local] '
    '"$request" $status $bytes_sent '
    '"$http_referer" "$http_user_agent" '
    '$remote_addr response_time:$upstream_response_time';

    default_type text/html;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    keepalive_timeout 75 20;

    gzip on;
    gzip_min_length 1250;
    gzip_buffers 16 8k;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types text/plain text/css application/javascript
    application/x-javascript text/xml application/xml application/xml+rss
    text/javascript;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    client_max_body_size 256M;

    upstream vcap_router {
    server unix:/tmp/router.sock;
    }
    server {
    listen *:80;
    server_name _;

    access_log /var/vcap/sys/log/vcap.access.log main;
    server_name_in_redirect off;

    location / {
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header X-Forwarded_For
    $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded_Proto http;
    proxy_redirect off;
    proxy_connect_timeout 10;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_pass http://vcap_router;
    }
    }
    }



    在 2012年9月12日星期三UTC+8上午11时36分35秒,Anfernee Gui写道:
    apache2 hijacked the http request.
    stop it. and do

    $ service nginx_router start

    instead.


    On Wed, Sep 12, 2012 at 11:32 AM, <yangzif...@gmail.com <javascript:>>
    wrote:
    the out put is
    netstat -lnp | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    3312/apache2

    在 2012年9月12日星期三UTC+8上午11时30分52秒,Anfernee Gui写道:
    Just do:
    $ sudo netstat -lnp | grep :80
    On Wed, Sep 12, 2012 at 11:26 AM, wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,Anfernee Gui写道:
    Can you check if nginx is listening on port 80?
    On Wed, Sep 12, 2012 at 11:20 AM, wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway 7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"



    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<!--
    FileName: index.html\n Language:
    [en]\n-->\n<!--Head-->\n<head>\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif; \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color:
    #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n


    <title>\xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE9\xA1\xB5</title>\n
    <script
    src=\"/mwg-internal/de5fs23hu73ds/files/javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link rel=\"stylesheet\"
    href=\"/mwg-internal/de5fs23hu73ds/files/default/stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!--Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n <tr>\n
    <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n <img
    src='/mwg-internal/de5fs23hu73ds/files/default/img/logo.jpg
    '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\n<!--Contents-->\n<!-- FileName:
    cannotconnect.html\n Language:
    [en]\n-->\n<!--Title-->\n<table
    class='titleTable'


    background='/mwg-internal/de5fs23hu73ds/files/default/img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n


    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE6\xB2\xA1\xE6\x9C\x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n
    </tr>\n</table>\n<!--/Title-->\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td
    class=\"policytData\">\n

    \xE6\x82\xA8\xE6\x8C\x87\xE5\xAE\x9A\xE7\x9A\x84\xE7\xBD\x91\xE9\xA1\xB5\xE6\x97\xA0\xE6\xB3\x95\xE8\xAE\xBF\xE9\x97\xAE\xE3\x80\x82\xE8\xAF\xA5\xE9\x97\xAE\xE9\xA2\x98\xE5\x8F\xAF\xE8\x83\xBD\xE6\x98\xAF\xE7\x94\xB1\xE4\xBA\x8E\xE6\x82\xA8\xE8\xAE\xBF\xE9\x97\xAE\xE7\x9A\x84\xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE9\x83\xA8\xE7\xBD\xB2\xE5\x9C\xA8\xE6\xB5\xB7\xE5\xA4\x96\xEF\xBC\x8C\xE7\x94\xB1\xE4\xBA\x8E\xE4\xB8\x80\xE4\xBA\x9B\xE4\xB8\xB4\xE6\x97\xB6\xE7\x9A\x84\xE7\xBD\x91\xE7\xBB\x9C\xE9\x97\xAE\xE9\xA2\x98\xE8\x80\x8C\xE5\xAF\xBC\xE8\x87\xB4\xE7\x9A\x84\xE3\x80\x82\xE8\xBF\x99\xE7\xB1\xBB\xE9\x97\xAE\xE9\xA2\x98\xE5\xB8\xB8\xE5\x87\xBA\xE7\x8E\xB0\xE4\xBA\x8E\xE6\x82\xA8\xE4\xBD\xBF\xE7\x94\xA8Google\xE8\xBF\x9B\xE8\xA1\x8C\xE4\xBF\xA1\xE6\x81\xAF\xE6\x90\x9C\xE7\xB4\xA2\xE6\x97\xB6\xE3\x80\x82\n
    </td>\n
    </tr>\n</table>\n<!--/Content-->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n

    </tr>\n</table>\n<!--/Info-->\n\n<!--/Contents-->\n<!--Policy-->\n<table
    class='policyTable'>\n <tr>\n <td class='policyHeading'>\n
    <hr>\n


    \xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.


    \xE5\xBC\x80\xE6\x94\xBE\xE4\xBF\xA1\xE6\x81\xAF\xE7\xA7\x91\xE6\x8A\x80\xE3\x80\x81\xE5\x95\x86\xE4\xB8\x9A\xE4\xB8\x8E\xE7\xBB\x8F\xE6\xB5\x8E\xE3\x80\x81\xE6\x96\xB0\xE9\x97\xBB\xE4\xB8\x8E\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81\xE6\x90\x9C\xE7\xB4\xA2\xE5\xBC\x95\xE6\x93\x8E\xE4\xB8\x8E\xE9\x97\xA8\xE6\x88\xB7\xE3\x80\x81\xE6\x94\xBF\xE5\xBA\x9C\xE3\x80\x81\xE6\x95\x99\xE8\x82\xB2\xE3\x80\x81\xE5\x81\xA5\xE5\xBA\xB7\xE3\x80\x81\xE4\xBA\xA4\xE9\x80\x9A\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.


    \xE7\xA6\x81\xE6\xAD\xA2\xE8\xB5\x8C\xE5\x8D\x9A\xE3\x80\x81\xE6\x88\x90\xE4\xBA\xBA\xE3\x80\x81\xE5\xBA\xB8\xE4\xBF\x97\xE3\x80\x81\xE6\x9A\xB4\xE5\x8A\x9B\xE3\x80\x81\xE7\xBD\x91\xE7\xBB\x9C\xE8\x81\x8A\xE5\xA4\xA9\xE3\x80\x81\xE9\x87\x91\xE8\x9E\x8D\xE4\xBF\xA1\xE6\x81\xAF\xE4\xB8\x8E\xE6\x9C\x8D\xE5\x8A\xA1\xE3\x80\x81\xE5\xAE\x97\xE6\x95\x99\xE3\x80\x81\xE6\xB1\x82\xE8\x81\x8C\xE3\x80\x81\xE5\xA8\xB1\xE4\xB9\x90\xE3\x80\x81\xE6\x97\xB6\xE5\xB0\x9A\xE4\xB8\x8E\xE7\x94\x9F\xE6\xB4\xBB\xE3\x80\x81\xE6\xB5\x81\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81Webmail\xE3\x80\x81Blog\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\xE7\xA6\x81\xE6\xAD\xA2\xE9\x80\x9A\xE8\xBF\x87\xE4\xBB\xA3\xE7\x90\x86\xE8\xAE\xBF\xE9\x97\xAE\xE5\x85\xAC\xE5\x8F\xB8\xE5\x86\x85\xE7\xBD\x91\xE8\xB5\x84\xE6\xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.


    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\xB6\xB3\xE5\x91\x98\xE5\xB7\xA5\xE7\x89\xB9\xE6\xAE\x8A\xE9\x9C\x80\xE6\xB1\x82\xEF\xBC\x8C\xE5\x85\xAC\xE5\x8F\xB8\xE6\x8F\x90\xE4\xBE\x9B\xE7\xBD\x91\xE7\xAB\x99\xE5\xBC\x80\xE9\x80\x9A\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xEF\xBC\x8C\xE5\x85\xB7\xE4\xBD\x93\xE8\xAF\xB7\xE5\x8F\x82\xE8\xA7\x81web.neusoft.com->\xE6\x9C\x8D\xE5\x8A\xA1\xE5\xB9\xB3\xE5\x8F\xB0->IT\xE6\x9C\x8D\xE5\x8A\xA1\xE7\xAE\xA1\xE7\x90\x86

    \xE5\x8F\x91\xE5\xB8\x83\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xE5\x92\x8C\xE8\xA1\xA8\xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n
    </tr>\n</table>\n<!--/Policy-->\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData' >\n


    \xE4\xBF\xA1\xE6\x81\xAF\xE8\xA7\x84\xE5\x88\x92\xE4\xB8\x8E\xE7\xAE\xA1\xE7\x90\x86\xE9\x83\xA8\xEF\xBC\x8C\xE6\xB2\x88\xE9\x98\xB3\xE5\x9B\xAD\xE5\x8C\xBAA2\xE6\xA5\xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\xBC\x9A...@neusoft.com\n
    </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n


    \xE7\x94\xB5\xE8\xAF\x9D\xEF\xBC\x9A+86-24-83665512\xE3\x80\x80\xE3\x80\x80\xE4\xBC\xA0\xE7\x9C\x9F\xEF\xBC\x9A+86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\"
    onClick=\"javascript:parent.window.close();\"


    value=\"\xE5\x85\xB3\xE9\x97\xAD\xE9\xA1\xB5\xE9\x9D\xA2\">\n\t\t\t</form>\n\n</u></font></td>\n
    </tr>\n</table>\n<!--/Foot-->\n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body-->\n</html>\n", {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)",
    :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259
    tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Yongkun Anfernee Gui at Sep 12, 2012 at 5:33 am
    That is the wrong config file, which is very out-of-date.
    Please run the following command to start nginx

    $ /etc/init.d/nginx_router restart

    If you don't have that script, please run the latest dev_setup again.
    On Wed, Sep 12, 2012 at 1:10 PM, wrote:
    Hi Anfernee:
    Now I run the nginx.
    netstat -lnp|grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    27125/nginx: master

    The error information changed like below:
    vmc target api.vcap.me
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y
    Error (JSON 404): VCAP ROUTER: 404 - DESTINATION ...

    the vcap.access.log information is :
    api.vcap.me - [12/Sep/2012:05:48:50 -0700] "GET /info HTTP/1.1" 404 311 "-"
    "Ruby" 127.0.0.1 response_time:0.020

    My Nginx.conf is like below, and I see the file /tmp/router.sock
    user www-data;
    worker_processes 1;

    error_log /var/log/nginx/error.log;
    pid /var/run/nginx.pid;

    events {
    worker_connections 2048;
    use epoll;
    # multi_accept on;
    }

    http {
    include /etc/nginx/mime.types;
    access_log /var/log/nginx/access.log;

    log_format main '$host - [$time_local] '
    '"$request" $status $bytes_sent '
    '"$http_referer" "$http_user_agent" '
    '$remote_addr response_time:$upstream_response_time';

    default_type text/html;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    keepalive_timeout 75 20;

    gzip on;
    gzip_min_length 1250;
    gzip_buffers 16 8k;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types text/plain text/css application/javascript
    application/x-javascript text/xml application/xml application/xml+rss
    text/javascript;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    client_max_body_size 256M;

    upstream vcap_router {
    server unix:/tmp/router.sock;
    }
    server {
    listen *:80;
    server_name _;

    access_log /var/vcap/sys/log/vcap.access.log main;
    server_name_in_redirect off;

    location / {
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header X-Forwarded_For
    $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded_Proto http;
    proxy_redirect off;
    proxy_connect_timeout 10;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_pass http://vcap_router;
    }
    }
    }



    在 2012年9月12日星期三UTC+8上午11时36分35秒,Anfernee Gui写道:
    apache2 hijacked the http request.
    stop it. and do

    $ service nginx_router start

    instead.

    On Wed, Sep 12, 2012 at 11:32 AM, wrote:
    the out put is
    netstat -lnp | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:*
    LISTEN
    3312/apache2

    在 2012年9月12日星期三UTC+8上午11时30分52秒,Anfernee Gui写道:
    Just do:
    $ sudo netstat -lnp | grep :80
    On Wed, Sep 12, 2012 at 11:26 AM, wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,Anfernee Gui写道:
    Can you check if nginx is listening on port 80?
    On Wed, Sep 12, 2012 at 11:20 AM, wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway 7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"




    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<!--
    FileName: index.html\n Language:
    [en]\n-->\n<!--Head-->\n<head>\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif; \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color:
    #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n




    <title>\xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE9\xA1\xB5</title>\n
    <script
    src=\"/mwg-internal/de5fs23hu73ds/files/javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link rel=\"stylesheet\"

    href=\"/mwg-internal/de5fs23hu73ds/files/default/stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!--Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n <tr>\n
    <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n <img
    src='/mwg-internal/de5fs23hu73ds/files/default/img/logo.jpg
    '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\n<!--Contents-->\n<!-- FileName:
    cannotconnect.html\n Language:
    [en]\n-->\n<!--Title-->\n<table
    class='titleTable'




    background='/mwg-internal/de5fs23hu73ds/files/default/img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n




    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE6\xB2\xA1\xE6\x9C\x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n
    </tr>\n</table>\n<!--/Title-->\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td
    class=\"policytData\">\n




    \xE6\x82\xA8\xE6\x8C\x87\xE5\xAE\x9A\xE7\x9A\x84\xE7\xBD\x91\xE9\xA1\xB5\xE6\x97\xA0\xE6\xB3\x95\xE8\xAE\xBF\xE9\x97\xAE\xE3\x80\x82\xE8\xAF\xA5\xE9\x97\xAE\xE9\xA2\x98\xE5\x8F\xAF\xE8\x83\xBD\xE6\x98\xAF\xE7\x94\xB1\xE4\xBA\x8E\xE6\x82\xA8\xE8\xAE\xBF\xE9\x97\xAE\xE7\x9A\x84\xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE9\x83\xA8\xE7\xBD\xB2\xE5\x9C\xA8\xE6\xB5\xB7\xE5\xA4\x96\xEF\xBC\x8C\xE7\x94\xB1\xE4\xBA\x8E\xE4\xB8\x80\xE4\xBA\x9B\xE4\xB8\xB4\xE6\x97\xB6\xE7\x9A\x84\xE7\xBD\x91\xE7\xBB\x9C\xE9\x97\xAE\xE9\xA2\x98\xE8\x80\x8C\xE5\xAF\xBC\xE8\x87\xB4\xE7\x9A\x84\xE3\x80\x82\xE8\xBF\x99\xE7\xB1\xBB\xE9\x97\xAE\xE9\xA2\x98\xE5\xB8\xB8\xE5\x87\xBA\xE7\x8E\xB0\xE4\xBA\x8E\xE6\x82\xA8\xE4\xBD\xBF\xE7\x94\xA8Google\xE8\xBF\x9B\xE8\xA1\x8C\xE4\xBF\xA1\xE6\x81\xAF\xE6\x90\x9C\xE7\xB4\xA2\xE6\x97\xB6\xE3\x80\x82\n
    </td>\n
    </tr>\n</table>\n<!--/Content-->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n



    </tr>\n</table>\n<!--/Info-->\n\n<!--/Contents-->\n<!--Policy-->\n<table
    class='policyTable'>\n <tr>\n <td class='policyHeading'>\n
    <hr>\n




    \xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.




    \xE5\xBC\x80\xE6\x94\xBE\xE4\xBF\xA1\xE6\x81\xAF\xE7\xA7\x91\xE6\x8A\x80\xE3\x80\x81\xE5\x95\x86\xE4\xB8\x9A\xE4\xB8\x8E\xE7\xBB\x8F\xE6\xB5\x8E\xE3\x80\x81\xE6\x96\xB0\xE9\x97\xBB\xE4\xB8\x8E\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81\xE6\x90\x9C\xE7\xB4\xA2\xE5\xBC\x95\xE6\x93\x8E\xE4\xB8\x8E\xE9\x97\xA8\xE6\x88\xB7\xE3\x80\x81\xE6\x94\xBF\xE5\xBA\x9C\xE3\x80\x81\xE6\x95\x99\xE8\x82\xB2\xE3\x80\x81\xE5\x81\xA5\xE5\xBA\xB7\xE3\x80\x81\xE4\xBA\xA4\xE9\x80\x9A\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.




    \xE7\xA6\x81\xE6\xAD\xA2\xE8\xB5\x8C\xE5\x8D\x9A\xE3\x80\x81\xE6\x88\x90\xE4\xBA\xBA\xE3\x80\x81\xE5\xBA\xB8\xE4\xBF\x97\xE3\x80\x81\xE6\x9A\xB4\xE5\x8A\x9B\xE3\x80\x81\xE7\xBD\x91\xE7\xBB\x9C\xE8\x81\x8A\xE5\xA4\xA9\xE3\x80\x81\xE9\x87\x91\xE8\x9E\x8D\xE4\xBF\xA1\xE6\x81\xAF\xE4\xB8\x8E\xE6\x9C\x8D\xE5\x8A\xA1\xE3\x80\x81\xE5\xAE\x97\xE6\x95\x99\xE3\x80\x81\xE6\xB1\x82\xE8\x81\x8C\xE3\x80\x81\xE5\xA8\xB1\xE4\xB9\x90\xE3\x80\x81\xE6\x97\xB6\xE5\xB0\x9A\xE4\xB8\x8E\xE7\x94\x9F\xE6\xB4\xBB\xE3\x80\x81\xE6\xB5\x81\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81Webmail\xE3\x80\x81Blog\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\xE7\xA6\x81\xE6\xAD\xA2\xE9\x80\x9A\xE8\xBF\x87\xE4\xBB\xA3\xE7\x90\x86\xE8\xAE\xBF\xE9\x97\xAE\xE5\x85\xAC\xE5\x8F\xB8\xE5\x86\x85\xE7\xBD\x91\xE8\xB5\x84\xE6\xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.




    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\xB6\xB3\xE5\x91\x98\xE5\xB7\xA5\xE7\x89\xB9\xE6\xAE\x8A\xE9\x9C\x80\xE6\xB1\x82\xEF\xBC\x8C\xE5\x85\xAC\xE5\x8F\xB8\xE6\x8F\x90\xE4\xBE\x9B\xE7\xBD\x91\xE7\xAB\x99\xE5\xBC\x80\xE9\x80\x9A\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xEF\xBC\x8C\xE5\x85\xB7\xE4\xBD\x93\xE8\xAF\xB7\xE5\x8F\x82\xE8\xA7\x81web.neusoft.com->\xE6\x9C\x8D\xE5\x8A\xA1\xE5\xB9\xB3\xE5\x8F\xB0->IT\xE6\x9C\x8D\xE5\x8A\xA1\xE7\xAE\xA1\xE7\x90\x86




    \xE5\x8F\x91\xE5\xB8\x83\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xE5\x92\x8C\xE8\xA1\xA8\xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n
    </tr>\n</table>\n<!--/Policy-->\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData' >\n




    \xE4\xBF\xA1\xE6\x81\xAF\xE8\xA7\x84\xE5\x88\x92\xE4\xB8\x8E\xE7\xAE\xA1\xE7\x90\x86\xE9\x83\xA8\xEF\xBC\x8C\xE6\xB2\x88\xE9\x98\xB3\xE5\x9B\xAD\xE5\x8C\xBAA2\xE6\xA5\xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\xBC\x9A...@neusoft.com\n
    </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n




    \xE7\x94\xB5\xE8\xAF\x9D\xEF\xBC\x9A+86-24-83665512\xE3\x80\x80\xE3\x80\x80\xE4\xBC\xA0\xE7\x9C\x9F\xEF\xBC\x9A+86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\"
    onClick=\"javascript:parent.window.close();\"




    value=\"\xE5\x85\xB3\xE9\x97\xAD\xE9\xA1\xB5\xE9\x9D\xA2\">\n\t\t\t</form>\n\n</u></font></td>\n
    </tr>\n</table>\n<!--/Foot-->\n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body-->\n</html>\n", {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)",
    :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259
    tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Yangzifeng1104 at Sep 12, 2012 at 5:41 am
    Actually I used to run the latest dev_setup.
    But there is a problem which I used to raise a topic

    the information is like below:

    [2012-09-11T13:11:36+08:00] INFO: Processing
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb] action create
    (essentials::default line 22)

    ================================================================================
    Error executing action `create` on resource
    'deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]'
    ================================================================================

    RuntimeError
    ------------
    Checksum mismatch for cf_remote_file
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]

    Cookbook Trace:
    ---------------
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:49:in
    `action_create'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:24:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:21:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:38:in
    `action_create'

    Resource Declaration:
    ---------------------
    # In
    /root/cloudfoundry/vcap/dev_setup/cookbooks/essentials/recipes/default.rb

    21: libpq_deb_path = File.join(node[:deployment][:setup_cache],
    "libpq5_9.2.deb")
    22: cf_remote_file libpq_deb_path do
    23: owner node[:deployment][:user]
    24: id node[:postgresql][:id][:libpq]["#{machine}"]
    25: checksum node[:postgresql][:checksum][:libpq]["#{machine}"]
    26: end
    27:

    Compiled Resource:
    ------------------
    # Declared in
    /root/cloudfoundry/vcap/dev_setup/cookbooks/essentials/recipes/default.rb:22:in
    `from_file'

    deployment_remote_file("/var/cache/dev_setup/libpq5_9.2.deb") do
    id
    "eyJzaWciOiI2Q21GcmhocWpPaTFocEFhMlp2TFpZVlFOMGM9Iiwib2lkIjoi%0ANGU0ZTc4YmNhNTFlMTIyMDA0ZTRlOGVjNjg0MDc3MDUwMmU4NDc0MzFmMDIi%0AfQ==%0A"
    checksum
    "b6a7fe7634c41717757481713b24b0c0d9eeb5937875daea7aba17c7750e3f9e"
    recipe_name "default"
    path #<Pathname:/var/cache/dev_setup/libpq5_9.2.deb>
    retry_delay 2
    owner "root"
    cookbook_name :essentials
    retries 0
    action :create
    end

    [2012-09-11T13:12:02+08:00] ERROR: Running exception handlers
    [2012-09-11T13:12:02+08:00] ERROR: Exception handlers complete
    [2012-09-11T13:12:02+08:00] FATAL: Stacktrace dumped to
    /var/chef/cache/chef-stacktrace.out
    [2012-09-11T13:12:02+08:00] FATAL: RuntimeError:
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]
    (essentials::default line 22) had an error: RuntimeError: Checksum mismatch
    for cf_remote_file
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]

    在 2012年9月12日星期三UTC+8下午1时33分20秒,Anfernee Gui写道:
    That is the wrong config file, which is very out-of-date.
    Please run the following command to start nginx

    $ /etc/init.d/nginx_router restart

    If you don't have that script, please run the latest dev_setup again.

    On Wed, Sep 12, 2012 at 1:10 PM, <yangzif...@gmail.com <javascript:>>
    wrote:
    Hi Anfernee:
    Now I run the nginx.
    netstat -lnp|grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    27125/nginx: master

    The error information changed like below:
    vmc target api.vcap.me
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y
    Error (JSON 404): VCAP ROUTER: 404 - DESTINATION ...

    the vcap.access.log information is :
    api.vcap.me - [12/Sep/2012:05:48:50 -0700] "GET /info HTTP/1.1" 404 311 "-"
    "Ruby" 127.0.0.1 response_time:0.020

    My Nginx.conf is like below, and I see the file /tmp/router.sock
    user www-data;
    worker_processes 1;

    error_log /var/log/nginx/error.log;
    pid /var/run/nginx.pid;

    events {
    worker_connections 2048;
    use epoll;
    # multi_accept on;
    }

    http {
    include /etc/nginx/mime.types;
    access_log /var/log/nginx/access.log;

    log_format main '$host - [$time_local] '
    '"$request" $status $bytes_sent '
    '"$http_referer" "$http_user_agent" '
    '$remote_addr
    response_time:$upstream_response_time';
    default_type text/html;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    keepalive_timeout 75 20;

    gzip on;
    gzip_min_length 1250;
    gzip_buffers 16 8k;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types text/plain text/css application/javascript
    application/x-javascript text/xml application/xml application/xml+rss
    text/javascript;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    client_max_body_size 256M;

    upstream vcap_router {
    server unix:/tmp/router.sock;
    }
    server {
    listen *:80;
    server_name _;

    access_log /var/vcap/sys/log/vcap.access.log main;
    server_name_in_redirect off;

    location / {
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header X-Forwarded_For
    $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded_Proto http;
    proxy_redirect off;
    proxy_connect_timeout 10;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_pass http://vcap_router;
    }
    }
    }



    在 2012年9月12日星期三UTC+8上午11时36分35秒,Anfernee Gui写道:
    apache2 hijacked the http request.
    stop it. and do

    $ service nginx_router start

    instead.

    On Wed, Sep 12, 2012 at 11:32 AM, wrote:
    the out put is
    netstat -lnp | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:*
    LISTEN
    3312/apache2

    在 2012年9月12日星期三UTC+8上午11时30分52秒,Anfernee Gui写道:
    Just do:
    $ sudo netstat -lnp | grep :80
    On Wed, Sep 12, 2012 at 11:26 AM, wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,Anfernee Gui写道:
    Can you check if nginx is listening on port 80?
    On Wed, Sep 12, 2012 at 11:20 AM, wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from
    other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway
    7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging
    script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"




    \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html>\n<!--
    FileName: index.html\n Language:
    [en]\n-->\n<!--Head-->\n<head>\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif; \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color:
    #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n



    <title>\xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE9\xA1\xB5</title>\n
    <script
    src=\"/mwg-internal/de5fs23hu73ds/files/javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link
    rel=\"stylesheet\"
    href=\"/mwg-internal/de5fs23hu73ds/files/default/stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!--Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n <tr>\n
    <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n <img
    src='/mwg-internal/de5fs23hu73ds/files/default/img/logo.jpg
    '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\n<!--Contents-->\n<!--
    FileName:
    cannotconnect.html\n Language:
    [en]\n-->\n<!--Title-->\n<table
    class='titleTable'



    background='/mwg-internal/de5fs23hu73ds/files/default/img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n



    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE6\xB2\xA1\xE6\x9C\x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n
    </tr>\n</table>\n<!--/Title-->\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td
    class=\"policytData\">\n



    \xE6\x82\xA8\xE6\x8C\x87\xE5\xAE\x9A\xE7\x9A\x84\xE7\xBD\x91\xE9\xA1\xB5\xE6\x97\xA0\xE6\xB3\x95\xE8\xAE\xBF\xE9\x97\xAE\xE3\x80\x82\xE8\xAF\xA5\xE9\x97\xAE\xE9\xA2\x98\xE5\x8F\xAF\xE8\x83\xBD\xE6\x98\xAF\xE7\x94\xB1\xE4\xBA\x8E\xE6\x82\xA8\xE8\xAE\xBF\xE9\x97\xAE\xE7\x9A\x84\xE6\x9C\x8D\xE5\x8A\xA1\xE5\x99\xA8\xE9\x83\xA8\xE7\xBD\xB2\xE5\x9C\xA8\xE6\xB5\xB7\xE5\xA4\x96\xEF\xBC\x8C\xE7\x94\xB1\xE4\xBA\x8E\xE4\xB8\x80\xE4\xBA\x9B\xE4\xB8\xB4\xE6\x97\xB6\xE7\x9A\x84\xE7\xBD\x91\xE7\xBB\x9C\xE9\x97\xAE\xE9\xA2\x98\xE8\x80\x8C\xE5\xAF\xBC\xE8\x87\xB4\xE7\x9A\x84\xE3\x80\x82\xE8\xBF\x99\xE7\xB1\xBB\xE9\x97\xAE\xE9\xA2\x98\xE5\xB8\xB8\xE5\x87\xBA\xE7\x8E\xB0\xE4\xBA\x8E\xE6\x82\xA8\xE4\xBD\xBF\xE7\x94\xA8Google\xE8\xBF\x9B\xE8\xA1\x8C\xE4\xBF\xA1\xE6\x81\xAF\xE6\x90\x9C\xE7\xB4\xA2\xE6\x97\xB6\xE3\x80\x82\n
    </td>\n
    </tr>\n</table>\n<!--/Content-->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n


    </tr>\n</table>\n<!--/Info-->\n\n<!--/Contents-->\n<!--Policy-->\n<table
    class='policyTable'>\n <tr>\n <td
    class='policyHeading'>\n
    <hr>\n



    \xE4\xB8\x9C\xE8\xBD\xAFInternet\xE8\xAE\xBF\xE9\x97\xAE\xE7\xAE\xA1\xE7\x90\x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.



    \xE5\xBC\x80\xE6\x94\xBE\xE4\xBF\xA1\xE6\x81\xAF\xE7\xA7\x91\xE6\x8A\x80\xE3\x80\x81\xE5\x95\x86\xE4\xB8\x9A\xE4\xB8\x8E\xE7\xBB\x8F\xE6\xB5\x8E\xE3\x80\x81\xE6\x96\xB0\xE9\x97\xBB\xE4\xB8\x8E\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81\xE6\x90\x9C\xE7\xB4\xA2\xE5\xBC\x95\xE6\x93\x8E\xE4\xB8\x8E\xE9\x97\xA8\xE6\x88\xB7\xE3\x80\x81\xE6\x94\xBF\xE5\xBA\x9C\xE3\x80\x81\xE6\x95\x99\xE8\x82\xB2\xE3\x80\x81\xE5\x81\xA5\xE5\xBA\xB7\xE3\x80\x81\xE4\xBA\xA4\xE9\x80\x9A\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.



    \xE7\xA6\x81\xE6\xAD\xA2\xE8\xB5\x8C\xE5\x8D\x9A\xE3\x80\x81\xE6\x88\x90\xE4\xBA\xBA\xE3\x80\x81\xE5\xBA\xB8\xE4\xBF\x97\xE3\x80\x81\xE6\x9A\xB4\xE5\x8A\x9B\xE3\x80\x81\xE7\xBD\x91\xE7\xBB\x9C\xE8\x81\x8A\xE5\xA4\xA9\xE3\x80\x81\xE9\x87\x91\xE8\x9E\x8D\xE4\xBF\xA1\xE6\x81\xAF\xE4\xB8\x8E\xE6\x9C\x8D\xE5\x8A\xA1\xE3\x80\x81\xE5\xAE\x97\xE6\x95\x99\xE3\x80\x81\xE6\xB1\x82\xE8\x81\x8C\xE3\x80\x81\xE5\xA8\xB1\xE4\xB9\x90\xE3\x80\x81\xE6\x97\xB6\xE5\xB0\x9A\xE4\xB8\x8E\xE7\x94\x9F\xE6\xB4\xBB\xE3\x80\x81\xE6\xB5\x81\xE5\xAA\x92\xE4\xBD\x93\xE3\x80\x81Webmail\xE3\x80\x81Blog\xE7\xAD\x89\xE7\xB1\xBB\xE5\x88\xAB\xEF\xBC\x9B\xE7\xA6\x81\xE6\xAD\xA2\xE9\x80\x9A\xE8\xBF\x87\xE4\xBB\xA3\xE7\x90\x86\xE8\xAE\xBF\xE9\x97\xAE\xE5\x85\xAC\xE5\x8F\xB8\xE5\x86\x85\xE7\xBD\x91\xE8\xB5\x84\xE6\xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.



    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\xB6\xB3\xE5\x91\x98\xE5\xB7\xA5\xE7\x89\xB9\xE6\xAE\x8A\xE9\x9C\x80\xE6\xB1\x82\xEF\xBC\x8C\xE5\x85\xAC\xE5\x8F\xB8\xE6\x8F\x90\xE4\xBE\x9B\xE7\xBD\x91\xE7\xAB\x99\xE5\xBC\x80\xE9\x80\x9A\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xEF\xBC\x8C\xE5\x85\xB7\xE4\xBD\x93\xE8\xAF\xB7\xE5\x8F\x82\xE8\xA7\x81web.neusoft.com->\xE6\x9C\x8D\xE5\x8A\xA1\xE5\xB9\xB3\xE5\x8F\xB0->IT\xE6\x9C\x8D\xE5\x8A\xA1\xE7\xAE\xA1\xE7\x90\x86


    \xE5\x8F\x91\xE5\xB8\x83\xE7\x9A\x84\xE6\xB5\x81\xE7\xA8\x8B\xE5\x92\x8C\xE8\xA1\xA8\xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n
    </tr>\n</table>\n<!--/Policy-->\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData' >\n



    \xE4\xBF\xA1\xE6\x81\xAF\xE8\xA7\x84\xE5\x88\x92\xE4\xB8\x8E\xE7\xAE\xA1\xE7\x90\x86\xE9\x83\xA8\xEF\xBC\x8C\xE6\xB2\x88\xE9\x98\xB3\xE5\x9B\xAD\xE5\x8C\xBAA2\xE6\xA5\xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\xBC\x9A...@neusoft.com\n
    </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n



    \xE7\x94\xB5\xE8\xAF\x9D\xEF\xBC\x9A+86-24-83665512\xE3\x80\x80\xE3\x80\x80\xE4\xBC\xA0\xE7\x9C\x9F\xEF\xBC\x9A+86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\"
    onClick=\"javascript:parent.window.close();\"



    value=\"\xE5\x85\xB3\xE9\x97\xAD\xE9\xA1\xB5\xE9\x9D\xA2\">\n\t\t\t</form>\n\n</u></font></td>\n
    </tr>\n</table>\n<!--/Foot-->\n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body-->\n</html>\n", {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)",
    :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259
    tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Haipeng Wu at Sep 12, 2012 at 6:59 am
    Hi,

    You have to run dev_setup before you start cloud foundry, dev_setup not
    only downloads files, but also does configurations.

    From you previous emails, your main problem is the network issue, which
    make you can't download from cf blobs.
    To continue the dev_setup, you need to download all of the files by
    yourself and put them in the directory "/var/cache/dev_setup/".
    Dev_setup script will not download if it could find those files in that
    directory.

    Also, you need to take a look at the source code in dev_setup if you do so.

    haipeng
    On Wed, Sep 12, 2012 at 1:41 PM, wrote:

    Actually I used to run the latest dev_setup.
    But there is a problem which I used to raise a topic

    the information is like below:

    [2012-09-11T13:11:36+08:00] INFO: Processing
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb] action create
    (essentials::default line 22)


    ================================================================================
    Error executing action `create` on resource
    'deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]'

    ================================================================================

    RuntimeError
    ------------
    Checksum mismatch for cf_remote_file
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]

    Cookbook Trace:
    ---------------
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:49:in
    `action_create'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:24:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:21:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:38:in
    `action_create'

    Resource Declaration:
    ---------------------
    # In
    /root/cloudfoundry/vcap/dev_setup/cookbooks/essentials/recipes/default.rb

    21: libpq_deb_path = File.join(node[:deployment][:setup_cache],
    "libpq5_9.2.deb")
    22: cf_remote_file libpq_deb_path do
    23: owner node[:deployment][:user]
    24: id node[:postgresql][:id][:libpq]["#{machine}"]
    25: checksum node[:postgresql][:checksum][:libpq]["#{machine}"]
    26: end
    27:

    Compiled Resource:
    ------------------
    # Declared in
    /root/cloudfoundry/vcap/dev_setup/cookbooks/essentials/recipes/default.rb:22:in
    `from_file'

    deployment_remote_file("/var/cache/dev_setup/libpq5_9.2.deb") do
    id
    "eyJzaWciOiI2Q21GcmhocWpPaTFocEFhMlp2TFpZVlFOMGM9Iiwib2lkIjoi%0ANGU0ZTc4YmNhNTFlMTIyMDA0ZTRlOGVjNjg0MDc3MDUwMmU4NDc0MzFmMDIi%0AfQ==%0A"
    checksum
    "b6a7fe7634c41717757481713b24b0c0d9eeb5937875daea7aba17c7750e3f9e"
    recipe_name "default"
    path #<Pathname:/var/cache/dev_setup/libpq5_9.2.deb>
    retry_delay 2
    owner "root"
    cookbook_name :essentials
    retries 0
    action :create
    end

    [2012-09-11T13:12:02+08:00] ERROR: Running exception handlers
    [2012-09-11T13:12:02+08:00] ERROR: Exception handlers complete
    [2012-09-11T13:12:02+08:00] FATAL: Stacktrace dumped to
    /var/chef/cache/chef-stacktrace.out
    [2012-09-11T13:12:02+08:00] FATAL: RuntimeError:
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]
    (essentials::default line 22) had an error: RuntimeError: Checksum mismatch
    for cf_remote_file
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]

    在 2012年9月12日星期三UTC+8下午1时33分20秒,Anfernee Gui写道:
    That is the wrong config file, which is very out-of-date.
    Please run the following command to start nginx

    $ /etc/init.d/nginx_router restart

    If you don't have that script, please run the latest dev_setup again.
    On Wed, Sep 12, 2012 at 1:10 PM, wrote:
    Hi Anfernee:
    Now I run the nginx.
    netstat -lnp|grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    27125/nginx: master

    The error information changed like below:
    vmc target api.vcap.me
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y
    Error (JSON 404): VCAP ROUTER: 404 - DESTINATION ...

    the vcap.access.log information is :
    api.vcap.me - [12/Sep/2012:05:48:50 -0700] "GET /info HTTP/1.1" 404 311 "-"
    "Ruby" 127.0.0.1 response_time:0.020

    My Nginx.conf is like below, and I see the file /tmp/router.sock
    user www-data;
    worker_processes 1;

    error_log /var/log/nginx/error.log;
    pid /var/run/nginx.pid;

    events {
    worker_connections 2048;
    use epoll;
    # multi_accept on;
    }

    http {
    include /etc/nginx/mime.types;
    access_log /var/log/nginx/access.log;

    log_format main '$host - [$time_local] '
    '"$request" $status $bytes_sent '
    '"$http_referer" "$http_user_agent" '
    '$remote_addr response_time:$upstream_**response_time';
    default_type text/html;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    keepalive_timeout 75 20;

    gzip on;
    gzip_min_length 1250;
    gzip_buffers 16 8k;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types text/plain text/css application/javascript
    application/x-javascript text/xml application/xml application/xml+rss
    text/javascript;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    client_max_body_size 256M;

    upstream vcap_router {
    server unix:/tmp/router.sock;
    }
    server {
    listen *:80;
    server_name _;

    access_log /var/vcap/sys/log/vcap.access.**log main;
    server_name_in_redirect off;

    location / {
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP $remote_addr;
    proxy_set_header X-Forwarded_For
    $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded_Proto http;
    proxy_redirect off;
    proxy_connect_timeout 10;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_pass http://vcap_router;
    }
    }
    }



    在 2012年9月12日星期三UTC+8上午11时36分35秒,**Anfernee Gui写道:
    apache2 hijacked the http request.
    stop it. and do

    $ service nginx_router start

    instead.

    On Wed, Sep 12, 2012 at 11:32 AM, wrote:
    the out put is
    netstat -lnp | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:*
    LISTEN
    3312/apache2

    在 2012年9月12日星期三UTC+8上午11时30分52秒,**Anfernee Gui写道:
    Just do:
    $ sudo netstat -lnp | grep :80
    On Wed, Sep 12, 2012 at 11:26 AM, wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,**Anfernee Gui写道:
    Can you check if nginx is listening on port 80?

    On Wed, Sep 12, 2012 at 11:20 AM, <yangzif...@gmail.com>
    wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from
    other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,**Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway
    7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, <yangzif...@gmail.com>
    wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging
    script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"




    \"http://www.w3.org/TR/xhtml1/**
    DTD/xhtml1-transitional.dtd\<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%5C>
    ">**\n<html>\n<!--
    FileName: index.html\n Language:
    [en]\n-->\n<!--Head-->\n<head>**\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#**666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color:
    #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n




    <title>\xE4\xB8\x9C\xE8\xBD\**xAFInternet\xE8\xAE\xBF\xE9\*
    *x97\xAE\xE7\xAE\xA1\xE7\x90\**x86\xE9\xA1\xB5</title>\n
    <script
    src=\"/mwg-internal/**de5fs23hu73ds/files/**javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link
    rel=\"stylesheet\"
    href=\"/mwg-internal/**de5fs23hu73ds/files/default/**stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!-**-Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n <tr>\n
    <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n <img
    src='/mwg-internal/**de5fs23hu73ds/files/default/**img/logo.jpg
    '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\**n<!--Contents-->\n<!--
    FileName:
    cannotconnect.html\n Language:
    [en]\n-->\n<!--Title-->\n<**table
    class='titleTable'




    background='/mwg-internal/**de5fs23hu73ds/files/default/**img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n




    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\**x99\xA8\xE6\xB2\xA1\xE6\x9C\
    **x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n
    </tr>\n</table>\n<!--/Title-->**\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td
    class=\"policytData\">\n




    \xE6\x82\xA8\xE6\x8C\x87\xE5\**xAE\x9A\xE7\x9A\x84\xE7\xBD\
    **x91\xE9\xA1\xB5\xE6\x97\xA0\**xE6\xB3\x95\xE8\xAE\xBF\xE9\**
    x97\xAE\xE3\x80\x82\xE8\xAF\**xA5\xE9\x97\xAE\xE9\xA2\x98\**
    xE5\x8F\xAF\xE8\x83\xBD\xE6\**x98\xAF\xE7\x94\xB1\xE4\xBA\**
    x8E\xE6\x82\xA8\xE8\xAE\xBF\**xE9\x97\xAE\xE7\x9A\x84\xE6\**
    x9C\x8D\xE5\x8A\xA1\xE5\x99\**xA8\xE9\x83\xA8\xE7\xBD\xB2\**
    xE5\x9C\xA8\xE6\xB5\xB7\xE5\**xA4\x96\xEF\xBC\x8C\xE7\x94\**
    xB1\xE4\xBA\x8E\xE4\xB8\x80\**xE4\xBA\x9B\xE4\xB8\xB4\xE6\**
    x97\xB6\xE7\x9A\x84\xE7\xBD\**x91\xE7\xBB\x9C\xE9\x97\xAE\**
    xE9\xA2\x98\xE8\x80\x8C\xE5\**xAF\xBC\xE8\x87\xB4\xE7\x9A\**
    x84\xE3\x80\x82\xE8\xBF\x99\**xE7\xB1\xBB\xE9\x97\xAE\xE9\**
    xA2\x98\xE5\xB8\xB8\xE5\x87\**xBA\xE7\x8E\xB0\xE4\xBA\x8E\**
    xE6\x82\xA8\xE4\xBD\xBF\xE7\**x94\xA8Google\xE8\xBF\x9B\xE8\**
    xA1\x8C\xE4\xBF\xA1\xE6\x81\**xAF\xE6\x90\x9C\xE7\xB4\xA2\**xE6\x97\xB6\xE3\x80\x82\n
    </td>\n
    </tr>\n</table>\n<!--/Content-**->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n



    </tr>\n</table>\n<!--/Info-->\**n\n<!--/Contents-->\n<!--**Policy-->\n<table
    class='policyTable'>\n <tr>\n <td
    class='policyHeading'>\n
    <hr>\n




    \xE4\xB8\x9C\xE8\xBD\**xAFInternet\xE8\xAE\xBF\xE9\**
    x97\xAE\xE7\xAE\xA1\xE7\x90\**x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.




    \xE5\xBC\x80\xE6\x94\xBE\xE4\**xBF\xA1\xE6\x81\xAF\xE7\xA7\
    **x91\xE6\x8A\x80\xE3\x80\x81\**xE5\x95\x86\xE4\xB8\x9A\xE4\**
    xB8\x8E\xE7\xBB\x8F\xE6\xB5\**x8E\xE3\x80\x81\xE6\x96\xB0\**
    xE9\x97\xBB\xE4\xB8\x8E\xE5\**xAA\x92\xE4\xBD\x93\xE3\x80\**
    x81\xE6\x90\x9C\xE7\xB4\xA2\**xE5\xBC\x95\xE6\x93\x8E\xE4\**
    xB8\x8E\xE9\x97\xA8\xE6\x88\**xB7\xE3\x80\x81\xE6\x94\xBF\**
    xE5\xBA\x9C\xE3\x80\x81\xE6\**x95\x99\xE8\x82\xB2\xE3\x80\**
    x81\xE5\x81\xA5\xE5\xBA\xB7\**xE3\x80\x81\xE4\xBA\xA4\xE9\**
    x80\x9A\xE7\xAD\x89\xE7\xB1\**xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.




    \xE7\xA6\x81\xE6\xAD\xA2\xE8\**xB5\x8C\xE5\x8D\x9A\xE3\x80\
    **x81\xE6\x88\x90\xE4\xBA\xBA\**xE3\x80\x81\xE5\xBA\xB8\xE4\**
    xBF\x97\xE3\x80\x81\xE6\x9A\**xB4\xE5\x8A\x9B\xE3\x80\x81\**
    xE7\xBD\x91\xE7\xBB\x9C\xE8\**x81\x8A\xE5\xA4\xA9\xE3\x80\**
    x81\xE9\x87\x91\xE8\x9E\x8D\**xE4\xBF\xA1\xE6\x81\xAF\xE4\**
    xB8\x8E\xE6\x9C\x8D\xE5\x8A\**xA1\xE3\x80\x81\xE5\xAE\x97\**
    xE6\x95\x99\xE3\x80\x81\xE6\**xB1\x82\xE8\x81\x8C\xE3\x80\**
    x81\xE5\xA8\xB1\xE4\xB9\x90\**xE3\x80\x81\xE6\x97\xB6\xE5\**
    xB0\x9A\xE4\xB8\x8E\xE7\x94\**x9F\xE6\xB4\xBB\xE3\x80\x81\**
    xE6\xB5\x81\xE5\xAA\x92\xE4\**xBD\x93\xE3\x80\x81Webmail\**
    xE3\x80\x81Blog\xE7\xAD\x89\**xE7\xB1\xBB\xE5\x88\xAB\xEF\**
    xBC\x9B\xE7\xA6\x81\xE6\xAD\**xA2\xE9\x80\x9A\xE8\xBF\x87\**
    xE4\xBB\xA3\xE7\x90\x86\xE8\**xAE\xBF\xE9\x97\xAE\xE5\x85\**
    xAC\xE5\x8F\xB8\xE5\x86\x85\**xE7\xBD\x91\xE8\xB5\x84\xE6\**xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.




    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\**xB6\xB3\xE5\x91\x98\xE5\xB7\
    **xA5\xE7\x89\xB9\xE6\xAE\x8A\**xE9\x9C\x80\xE6\xB1\x82\xEF\**
    xBC\x8C\xE5\x85\xAC\xE5\x8F\**xB8\xE6\x8F\x90\xE4\xBE\x9B\**
    xE7\xBD\x91\xE7\xAB\x99\xE5\**xBC\x80\xE9\x80\x9A\xE7\x9A\**
    x84\xE6\xB5\x81\xE7\xA8\x8B\**xEF\xBC\x8C\xE5\x85\xB7\xE4\**
    xBD\x93\xE8\xAF\xB7\xE5\x8F\**x82\xE8\xA7\x81web.neusoft.**
    com->\xE6\x9C\x8D\xE5\x8A\xA1\**xE5\xB9\xB3\xE5\x8F\xB0->IT\**
    xE6\x9C\x8D\xE5\x8A\xA1\xE7\**xAE\xA1\xE7\x90\x86



    \xE5\x8F\x91\xE5\xB8\x83\xE7\**x9A\x84\xE6\xB5\x81\xE7\xA8\
    **x8B\xE5\x92\x8C\xE8\xA1\xA8\**xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n
    </tr>\n</table>\n<!--/Policy--**>\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData'
    \n



    \xE4\xBF\xA1\xE6\x81\xAF\xE8\**xA7\x84\xE5\x88\x92\xE4\xB8\
    **x8E\xE7\xAE\xA1\xE7\x90\x86\**xE9\x83\xA8\xEF\xBC\x8C\xE6\**
    xB2\x88\xE9\x98\xB3\xE5\x9B\**xAD\xE5\x8C\xBAA2\xE6\xA5\**xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\**xBC\x9A...@neusoft.com\n
    </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n




    \xE7\x94\xB5\xE8\xAF\x9D\xEF\**xBC\x9A+86-24-83665512\xE3\*
    *x80\x80\xE3\x80\x80\xE4\xBC\**xA0\xE7\x9C\x9F\xEF\xBC\x9A+**86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\"
    onClick=\"javascript:parent.**window.close();\"




    value=\"\xE5\x85\xB3\xE9\x97\**
    xAD\xE9\xA1\xB5\xE9\x9D\xA2\">**\n\t\t\t</form>\n\n</u></font>**</td>\n
    </tr>\n</table>\n<!--/Foot-->\**n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body--**>\n</html>\n", {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)",
    :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-**Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259
    tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Haipeng Wu at Sep 12, 2012 at 7:06 am
    I suggest you fix your network problem first.
    Dev-setup succeed is a must to let your cloud foundry working.

    haipeng
    On Wed, Sep 12, 2012 at 2:59 PM, Haipeng Wu wrote:

    Hi,

    You have to run dev_setup before you start cloud foundry, dev_setup not
    only downloads files, but also does configurations.

    From you previous emails, your main problem is the network issue, which
    make you can't download from cf blobs.
    To continue the dev_setup, you need to download all of the files by
    yourself and put them in the directory "/var/cache/dev_setup/".
    Dev_setup script will not download if it could find those files in that
    directory.

    Also, you need to take a look at the source code in dev_setup if you do so.

    haipeng
    On Wed, Sep 12, 2012 at 1:41 PM, wrote:

    Actually I used to run the latest dev_setup.
    But there is a problem which I used to raise a topic

    the information is like below:

    [2012-09-11T13:11:36+08:00] INFO: Processing
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb] action create
    (essentials::default line 22)


    ================================================================================
    Error executing action `create` on resource
    'deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]'

    ================================================================================

    RuntimeError
    ------------
    Checksum mismatch for cf_remote_file
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]

    Cookbook Trace:
    ---------------
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:49:in
    `action_create'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:24:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:21:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:38:in
    `action_create'

    Resource Declaration:
    ---------------------
    # In
    /root/cloudfoundry/vcap/dev_setup/cookbooks/essentials/recipes/default.rb

    21: libpq_deb_path = File.join(node[:deployment][:setup_cache],
    "libpq5_9.2.deb")
    22: cf_remote_file libpq_deb_path do
    23: owner node[:deployment][:user]
    24: id node[:postgresql][:id][:libpq]["#{machine}"]
    25: checksum node[:postgresql][:checksum][:libpq]["#{machine}"]
    26: end
    27:

    Compiled Resource:
    ------------------
    # Declared in
    /root/cloudfoundry/vcap/dev_setup/cookbooks/essentials/recipes/default.rb:22:in
    `from_file'

    deployment_remote_file("/var/cache/dev_setup/libpq5_9.2.deb") do
    id
    "eyJzaWciOiI2Q21GcmhocWpPaTFocEFhMlp2TFpZVlFOMGM9Iiwib2lkIjoi%0ANGU0ZTc4YmNhNTFlMTIyMDA0ZTRlOGVjNjg0MDc3MDUwMmU4NDc0MzFmMDIi%0AfQ==%0A"
    checksum
    "b6a7fe7634c41717757481713b24b0c0d9eeb5937875daea7aba17c7750e3f9e"
    recipe_name "default"
    path #<Pathname:/var/cache/dev_setup/libpq5_9.2.deb>
    retry_delay 2
    owner "root"
    cookbook_name :essentials
    retries 0
    action :create
    end

    [2012-09-11T13:12:02+08:00] ERROR: Running exception handlers
    [2012-09-11T13:12:02+08:00] ERROR: Exception handlers complete
    [2012-09-11T13:12:02+08:00] FATAL: Stacktrace dumped to
    /var/chef/cache/chef-stacktrace.out
    [2012-09-11T13:12:02+08:00] FATAL: RuntimeError:
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]
    (essentials::default line 22) had an error: RuntimeError: Checksum mismatch
    for cf_remote_file
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]

    在 2012年9月12日星期三UTC+8下午1时33分20秒,Anfernee Gui写道:
    That is the wrong config file, which is very out-of-date.
    Please run the following command to start nginx

    $ /etc/init.d/nginx_router restart

    If you don't have that script, please run the latest dev_setup again.
    On Wed, Sep 12, 2012 at 1:10 PM, wrote:
    Hi Anfernee:
    Now I run the nginx.
    netstat -lnp|grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    27125/nginx: master

    The error information changed like below:
    vmc target api.vcap.me
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y
    Error (JSON 404): VCAP ROUTER: 404 - DESTINATION ...

    the vcap.access.log information is :
    api.vcap.me - [12/Sep/2012:05:48:50 -0700] "GET /info HTTP/1.1" 404 311 "-"
    "Ruby" 127.0.0.1 response_time:0.020

    My Nginx.conf is like below, and I see the file /tmp/router.sock
    user www-data;
    worker_processes 1;

    error_log /var/log/nginx/error.log;
    pid /var/run/nginx.pid;

    events {
    worker_connections 2048;
    use epoll;
    # multi_accept on;
    }

    http {
    include /etc/nginx/mime.types;
    access_log /var/log/nginx/access.log;

    log_format main '$host - [$time_local] '
    '"$request" $status $bytes_sent '
    '"$http_referer" "$http_user_agent" '
    '$remote_addr response_time:$upstream_**response_time';
    default_type text/html;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    keepalive_timeout 75 20;

    gzip on;
    gzip_min_length 1250;
    gzip_buffers 16 8k;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types text/plain text/css application/javascript
    application/x-javascript text/xml application/xml application/xml+rss
    text/javascript;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    client_max_body_size 256M;

    upstream vcap_router {
    server unix:/tmp/router.sock;
    }
    server {
    listen *:80;
    server_name _;

    access_log /var/vcap/sys/log/vcap.access.**log main;
    server_name_in_redirect off;

    location / {
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP
    $remote_addr;
    proxy_set_header X-Forwarded_For
    $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded_Proto http;
    proxy_redirect off;
    proxy_connect_timeout 10;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_pass http://vcap_router;
    }
    }
    }



    在 2012年9月12日星期三UTC+8上午11时36分35秒,**Anfernee Gui写道:
    apache2 hijacked the http request.
    stop it. and do

    $ service nginx_router start

    instead.

    On Wed, Sep 12, 2012 at 11:32 AM, wrote:
    the out put is
    netstat -lnp | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:*
    LISTEN
    3312/apache2

    在 2012年9月12日星期三UTC+8上午11时30分52秒,**Anfernee Gui写道:
    Just do:
    $ sudo netstat -lnp | grep :80
    On Wed, Sep 12, 2012 at 11:26 AM, wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,**Anfernee Gui写道:
    Can you check if nginx is listening on port 80?

    On Wed, Sep 12, 2012 at 11:20 AM, <yangzif...@gmail.com>
    wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from
    other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,**Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway
    7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, <yangzif...@gmail.com>
    wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging
    script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"




    \"http://www.w3.org/TR/xhtml1/**
    DTD/xhtml1-transitional.dtd\<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%5C>
    ">**\n<html>\n<!--
    FileName: index.html\n Language:
    [en]\n-->\n<!--Head-->\n<head>**\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#**666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color:
    #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n




    <title>\xE4\xB8\x9C\xE8\xBD\**xAFInternet\xE8\xAE\xBF\xE9\
    **x97\xAE\xE7\xAE\xA1\xE7\x90\**x86\xE9\xA1\xB5</title>\n
    <script
    src=\"/mwg-internal/**de5fs23hu73ds/files/**javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link
    rel=\"stylesheet\"
    href=\"/mwg-internal/**de5fs23hu73ds/files/default/**stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!-**-Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n
    <tr>\n
    <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n
    <img
    src='/mwg-internal/**de5fs23hu73ds/files/default/**img/logo.jpg
    '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\**n<!--Contents-->\n<!--
    FileName:
    cannotconnect.html\n Language:
    [en]\n-->\n<!--Title-->\n<**table
    class='titleTable'




    background='/mwg-internal/**de5fs23hu73ds/files/default/**img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n




    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\**
    x99\xA8\xE6\xB2\xA1\xE6\x9C\**x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n
    </tr>\n</table>\n<!--/Title-->**\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td
    class=\"policytData\">\n




    \xE6\x82\xA8\xE6\x8C\x87\xE5\**
    xAE\x9A\xE7\x9A\x84\xE7\xBD\**x91\xE9\xA1\xB5\xE6\x97\xA0\**
    xE6\xB3\x95\xE8\xAE\xBF\xE9\**x97\xAE\xE3\x80\x82\xE8\xAF\**
    xA5\xE9\x97\xAE\xE9\xA2\x98\**xE5\x8F\xAF\xE8\x83\xBD\xE6\**
    x98\xAF\xE7\x94\xB1\xE4\xBA\**x8E\xE6\x82\xA8\xE8\xAE\xBF\**
    xE9\x97\xAE\xE7\x9A\x84\xE6\**x9C\x8D\xE5\x8A\xA1\xE5\x99\**
    xA8\xE9\x83\xA8\xE7\xBD\xB2\**xE5\x9C\xA8\xE6\xB5\xB7\xE5\**
    xA4\x96\xEF\xBC\x8C\xE7\x94\**xB1\xE4\xBA\x8E\xE4\xB8\x80\**
    xE4\xBA\x9B\xE4\xB8\xB4\xE6\**x97\xB6\xE7\x9A\x84\xE7\xBD\**
    x91\xE7\xBB\x9C\xE9\x97\xAE\**xE9\xA2\x98\xE8\x80\x8C\xE5\**
    xAF\xBC\xE8\x87\xB4\xE7\x9A\**x84\xE3\x80\x82\xE8\xBF\x99\**
    xE7\xB1\xBB\xE9\x97\xAE\xE9\**xA2\x98\xE5\xB8\xB8\xE5\x87\**
    xBA\xE7\x8E\xB0\xE4\xBA\x8E\**xE6\x82\xA8\xE4\xBD\xBF\xE7\**
    x94\xA8Google\xE8\xBF\x9B\xE8\**xA1\x8C\xE4\xBF\xA1\xE6\x81\**
    xAF\xE6\x90\x9C\xE7\xB4\xA2\**xE6\x97\xB6\xE3\x80\x82\n
    </td>\n
    </tr>\n</table>\n<!--/Content-**->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td
    class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n



    </tr>\n</table>\n<!--/Info-->\**n\n<!--/Contents-->\n<!--*
    *Policy-->\n<table
    class='policyTable'>\n <tr>\n <td
    class='policyHeading'>\n
    <hr>\n




    \xE4\xB8\x9C\xE8\xBD\**xAFInternet\xE8\xAE\xBF\xE9\**
    x97\xAE\xE7\xAE\xA1\xE7\x90\**x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.




    \xE5\xBC\x80\xE6\x94\xBE\xE4\**
    xBF\xA1\xE6\x81\xAF\xE7\xA7\**x91\xE6\x8A\x80\xE3\x80\x81\**
    xE5\x95\x86\xE4\xB8\x9A\xE4\**xB8\x8E\xE7\xBB\x8F\xE6\xB5\**
    x8E\xE3\x80\x81\xE6\x96\xB0\**xE9\x97\xBB\xE4\xB8\x8E\xE5\**
    xAA\x92\xE4\xBD\x93\xE3\x80\**x81\xE6\x90\x9C\xE7\xB4\xA2\**
    xE5\xBC\x95\xE6\x93\x8E\xE4\**xB8\x8E\xE9\x97\xA8\xE6\x88\**
    xB7\xE3\x80\x81\xE6\x94\xBF\**xE5\xBA\x9C\xE3\x80\x81\xE6\**
    x95\x99\xE8\x82\xB2\xE3\x80\**x81\xE5\x81\xA5\xE5\xBA\xB7\**
    xE3\x80\x81\xE4\xBA\xA4\xE9\**x80\x9A\xE7\xAD\x89\xE7\xB1\**xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.




    \xE7\xA6\x81\xE6\xAD\xA2\xE8\**
    xB5\x8C\xE5\x8D\x9A\xE3\x80\**x81\xE6\x88\x90\xE4\xBA\xBA\**
    xE3\x80\x81\xE5\xBA\xB8\xE4\**xBF\x97\xE3\x80\x81\xE6\x9A\**
    xB4\xE5\x8A\x9B\xE3\x80\x81\**xE7\xBD\x91\xE7\xBB\x9C\xE8\**
    x81\x8A\xE5\xA4\xA9\xE3\x80\**x81\xE9\x87\x91\xE8\x9E\x8D\**
    xE4\xBF\xA1\xE6\x81\xAF\xE4\**xB8\x8E\xE6\x9C\x8D\xE5\x8A\**
    xA1\xE3\x80\x81\xE5\xAE\x97\**xE6\x95\x99\xE3\x80\x81\xE6\**
    xB1\x82\xE8\x81\x8C\xE3\x80\**x81\xE5\xA8\xB1\xE4\xB9\x90\**
    xE3\x80\x81\xE6\x97\xB6\xE5\**xB0\x9A\xE4\xB8\x8E\xE7\x94\**
    x9F\xE6\xB4\xBB\xE3\x80\x81\**xE6\xB5\x81\xE5\xAA\x92\xE4\**
    xBD\x93\xE3\x80\x81Webmail\**xE3\x80\x81Blog\xE7\xAD\x89\**
    xE7\xB1\xBB\xE5\x88\xAB\xEF\**xBC\x9B\xE7\xA6\x81\xE6\xAD\**
    xA2\xE9\x80\x9A\xE8\xBF\x87\**xE4\xBB\xA3\xE7\x90\x86\xE8\**
    xAE\xBF\xE9\x97\xAE\xE5\x85\**xAC\xE5\x8F\xB8\xE5\x86\x85\**
    xE7\xBD\x91\xE8\xB5\x84\xE6\**xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.




    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\**
    xB6\xB3\xE5\x91\x98\xE5\xB7\**xA5\xE7\x89\xB9\xE6\xAE\x8A\**
    xE9\x9C\x80\xE6\xB1\x82\xEF\**xBC\x8C\xE5\x85\xAC\xE5\x8F\**
    xB8\xE6\x8F\x90\xE4\xBE\x9B\**xE7\xBD\x91\xE7\xAB\x99\xE5\**
    xBC\x80\xE9\x80\x9A\xE7\x9A\**x84\xE6\xB5\x81\xE7\xA8\x8B\**
    xEF\xBC\x8C\xE5\x85\xB7\xE4\**xBD\x93\xE8\xAF\xB7\xE5\x8F\**
    x82\xE8\xA7\x81web.neusoft.**com->\xE6\x9C\x8D\xE5\x8A\xA1\**
    xE5\xB9\xB3\xE5\x8F\xB0->IT\**xE6\x9C\x8D\xE5\x8A\xA1\xE7\**xAE\xA1\xE7\x90\x86



    \xE5\x8F\x91\xE5\xB8\x83\xE7\**
    x9A\x84\xE6\xB5\x81\xE7\xA8\**x8B\xE5\x92\x8C\xE8\xA1\xA8\**xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n
    </tr>\n</table>\n<!--/Policy--**>\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData'
    \n



    \xE4\xBF\xA1\xE6\x81\xAF\xE8\**
    xA7\x84\xE5\x88\x92\xE4\xB8\**x8E\xE7\xAE\xA1\xE7\x90\x86\**
    xE9\x83\xA8\xEF\xBC\x8C\xE6\**xB2\x88\xE9\x98\xB3\xE5\x9B\**
    xAD\xE5\x8C\xBAA2\xE6\xA5\**xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\**xBC\x9A...@neusoft.com\n
    </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n




    \xE7\x94\xB5\xE8\xAF\x9D\xEF\**xBC\x9A+86-24-83665512\xE3\
    **x80\x80\xE3\x80\x80\xE4\xBC\**xA0\xE7\x9C\x9F\xEF\xBC\x9A+**86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\"
    onClick=\"javascript:parent.**window.close();\"




    value=\"\xE5\x85\xB3\xE9\x97\**
    xAD\xE9\xA1\xB5\xE9\x9D\xA2\">**\n\t\t\t</form>\n\n</u></font>**</td>\n
    </tr>\n</table>\n<!--/Foot-->\**n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body--**>\n</html>\n",
    {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)",
    :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-**Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259
    tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Yangzifeng1104 at Sep 12, 2012 at 8:53 am
    Another thing is I think the files have been downloaded from cf blob.
    because below code doesn't raise exception:
    def download_blob(id)
    Tempfile.open('cf-temp') do |tf|
    AtmosBlobstoreClient.new(BLOBSTORE_HOST).get_file(id, tf)
    tf.close
    yield tf.path
    end
    end

    But when do check sum for files, the Error is raised:

    remote_file_checksum = checksum(tempfile)

    if remote_file_checksum == @new_resource.checksum
    Chef::Log.debug "remote file checksum: #{remote_file_checksum},
    validated!"
    FileUtils.cp(tempfile, @new_resource.path)
    Chef::Log.info "#{@new_resource} updated"
    @new_resource.updated_by_last_action(true)
    else
    Chef::Log.debug "remote file checksum: #{remote_file_checksum},
    invalid"
    # TODO: retry?
    raise "Checksum mismatch for cf_remote_file #{@new_resource}"
    end

    在 2012年9月12日星期三UTC+8下午3时06分16秒,Haipeng Wu写道:
    I suggest you fix your network problem first.
    Dev-setup succeed is a must to let your cloud foundry working.

    haipeng

    On Wed, Sep 12, 2012 at 2:59 PM, Haipeng Wu <h...@rbcon.com <javascript:>>wrote:
    Hi,

    You have to run dev_setup before you start cloud foundry, dev_setup not
    only downloads files, but also does configurations.

    From you previous emails, your main problem is the network issue, which
    make you can't download from cf blobs.
    To continue the dev_setup, you need to download all of the files by
    yourself and put them in the directory "/var/cache/dev_setup/".
    Dev_setup script will not download if it could find those files in that
    directory.

    Also, you need to take a look at the source code in dev_setup if you do
    so.

    haipeng

    On Wed, Sep 12, 2012 at 1:41 PM, <yangzif...@gmail.com <javascript:>>wrote:
    Actually I used to run the latest dev_setup.
    But there is a problem which I used to raise a topic

    the information is like below:

    [2012-09-11T13:11:36+08:00] INFO: Processing
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb] action create
    (essentials::default line 22)


    ================================================================================
    Error executing action `create` on resource
    'deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]'

    ================================================================================

    RuntimeError
    ------------
    Checksum mismatch for cf_remote_file
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]

    Cookbook Trace:
    ---------------
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:49:in
    `action_create'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:24:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:21:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:38:in
    `action_create'

    Resource Declaration:
    ---------------------
    # In
    /root/cloudfoundry/vcap/dev_setup/cookbooks/essentials/recipes/default.rb

    21: libpq_deb_path = File.join(node[:deployment][:setup_cache],
    "libpq5_9.2.deb")
    22: cf_remote_file libpq_deb_path do
    23: owner node[:deployment][:user]
    24: id node[:postgresql][:id][:libpq]["#{machine}"]
    25: checksum node[:postgresql][:checksum][:libpq]["#{machine}"]
    26: end
    27:

    Compiled Resource:
    ------------------
    # Declared in
    /root/cloudfoundry/vcap/dev_setup/cookbooks/essentials/recipes/default.rb:22:in
    `from_file'

    deployment_remote_file("/var/cache/dev_setup/libpq5_9.2.deb") do
    id
    "eyJzaWciOiI2Q21GcmhocWpPaTFocEFhMlp2TFpZVlFOMGM9Iiwib2lkIjoi%0ANGU0ZTc4YmNhNTFlMTIyMDA0ZTRlOGVjNjg0MDc3MDUwMmU4NDc0MzFmMDIi%0AfQ==%0A"
    checksum
    "b6a7fe7634c41717757481713b24b0c0d9eeb5937875daea7aba17c7750e3f9e"
    recipe_name "default"
    path #<Pathname:/var/cache/dev_setup/libpq5_9.2.deb>
    retry_delay 2
    owner "root"
    cookbook_name :essentials
    retries 0
    action :create
    end

    [2012-09-11T13:12:02+08:00] ERROR: Running exception handlers
    [2012-09-11T13:12:02+08:00] ERROR: Exception handlers complete
    [2012-09-11T13:12:02+08:00] FATAL: Stacktrace dumped to
    /var/chef/cache/chef-stacktrace.out
    [2012-09-11T13:12:02+08:00] FATAL: RuntimeError:
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]
    (essentials::default line 22) had an error: RuntimeError: Checksum mismatch
    for cf_remote_file
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]

    在 2012年9月12日星期三UTC+8下午1时33分20秒,Anfernee Gui写道:
    That is the wrong config file, which is very out-of-date.
    Please run the following command to start nginx

    $ /etc/init.d/nginx_router restart

    If you don't have that script, please run the latest dev_setup again.
    On Wed, Sep 12, 2012 at 1:10 PM, wrote:
    Hi Anfernee:
    Now I run the nginx.
    netstat -lnp|grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    27125/nginx: master

    The error information changed like below:
    vmc target api.vcap.me
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y
    Error (JSON 404): VCAP ROUTER: 404 - DESTINATION ...

    the vcap.access.log information is :
    api.vcap.me - [12/Sep/2012:05:48:50 -0700] "GET /info HTTP/1.1" 404 311 "-"
    "Ruby" 127.0.0.1 response_time:0.020

    My Nginx.conf is like below, and I see the file /tmp/router.sock
    user www-data;
    worker_processes 1;

    error_log /var/log/nginx/error.log;
    pid /var/run/nginx.pid;

    events {
    worker_connections 2048;
    use epoll;
    # multi_accept on;
    }

    http {
    include /etc/nginx/mime.types;
    access_log /var/log/nginx/access.log;

    log_format main '$host - [$time_local] '
    '"$request" $status $bytes_sent '
    '"$http_referer" "$http_user_agent" '
    '$remote_addr response_time:$upstream_**response_time';
    default_type text/html;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    keepalive_timeout 75 20;

    gzip on;
    gzip_min_length 1250;
    gzip_buffers 16 8k;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types text/plain text/css application/javascript
    application/x-javascript text/xml application/xml application/xml+rss
    text/javascript;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    client_max_body_size 256M;

    upstream vcap_router {
    server unix:/tmp/router.sock;
    }
    server {
    listen *:80;
    server_name _;

    access_log /var/vcap/sys/log/vcap.access.**log main;
    server_name_in_redirect off;

    location / {
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP
    $remote_addr;
    proxy_set_header X-Forwarded_For
    $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded_Proto http;
    proxy_redirect off;
    proxy_connect_timeout 10;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_pass http://vcap_router;
    }
    }
    }



    在 2012年9月12日星期三UTC+8上午11时36分35秒,**Anfernee Gui写道:
    apache2 hijacked the http request.
    stop it. and do

    $ service nginx_router start

    instead.

    On Wed, Sep 12, 2012 at 11:32 AM, wrote:
    the out put is
    netstat -lnp | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:*
    LISTEN
    3312/apache2

    在 2012年9月12日星期三UTC+8上午11时30分52秒,**Anfernee Gui写道:
    Just do:
    $ sudo netstat -lnp | grep :80
    On Wed, Sep 12, 2012 at 11:26 AM, wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,**Anfernee Gui写道:
    Can you check if nginx is listening on port 80?

    On Wed, Sep 12, 2012 at 11:20 AM, <yangzif...@gmail.com>
    wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from
    other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,**Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway
    7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, <yangzif...@gmail.com>
    wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging
    script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"




    \"http://www.w3.org/TR/xhtml1/**
    DTD/xhtml1-transitional.dtd\<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%5C>
    ">**\n<html>\n<!--
    FileName: index.html\n Language:
    [en]\n-->\n<!--Head-->\n<head>**\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\"
    />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#**666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color:
    #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n




    <title>\xE4\xB8\x9C\xE8\xBD\**
    xAFInternet\xE8\xAE\xBF\xE9\**x97\xAE\xE7\xAE\xA1\xE7\x90\**x86\xE9\xA1\xB5</title>\n
    <script
    src=\"/mwg-internal/**de5fs23hu73ds/files/**javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link
    rel=\"stylesheet\"
    href=\"/mwg-internal/**de5fs23hu73ds/files/default/**stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!-**-Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n
    <tr>\n
    <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n
    <img
    src='/mwg-internal/**de5fs23hu73ds/files/default/**img/logo.jpg
    '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\**n<!--Contents-->\n<!--
    FileName:
    cannotconnect.html\n Language:
    [en]\n-->\n<!--Title-->\n<**table
    class='titleTable'




    background='/mwg-internal/**de5fs23hu73ds/files/default/*
    *img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n




    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\**
    x99\xA8\xE6\xB2\xA1\xE6\x9C\**x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n
    </tr>\n</table>\n<!--/Title-->**\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td
    class=\"policytData\">\n




    \xE6\x82\xA8\xE6\x8C\x87\xE5\**
    xAE\x9A\xE7\x9A\x84\xE7\xBD\**x91\xE9\xA1\xB5\xE6\x97\xA0\**
    xE6\xB3\x95\xE8\xAE\xBF\xE9\**x97\xAE\xE3\x80\x82\xE8\xAF\**
    xA5\xE9\x97\xAE\xE9\xA2\x98\**xE5\x8F\xAF\xE8\x83\xBD\xE6\**
    x98\xAF\xE7\x94\xB1\xE4\xBA\**x8E\xE6\x82\xA8\xE8\xAE\xBF\**
    xE9\x97\xAE\xE7\x9A\x84\xE6\**x9C\x8D\xE5\x8A\xA1\xE5\x99\**
    xA8\xE9\x83\xA8\xE7\xBD\xB2\**xE5\x9C\xA8\xE6\xB5\xB7\xE5\**
    xA4\x96\xEF\xBC\x8C\xE7\x94\**xB1\xE4\xBA\x8E\xE4\xB8\x80\**
    xE4\xBA\x9B\xE4\xB8\xB4\xE6\**x97\xB6\xE7\x9A\x84\xE7\xBD\**
    x91\xE7\xBB\x9C\xE9\x97\xAE\**xE9\xA2\x98\xE8\x80\x8C\xE5\**
    xAF\xBC\xE8\x87\xB4\xE7\x9A\**x84\xE3\x80\x82\xE8\xBF\x99\**
    xE7\xB1\xBB\xE9\x97\xAE\xE9\**xA2\x98\xE5\xB8\xB8\xE5\x87\**
    xBA\xE7\x8E\xB0\xE4\xBA\x8E\**xE6\x82\xA8\xE4\xBD\xBF\xE7\**
    x94\xA8Google\xE8\xBF\x9B\xE8\**xA1\x8C\xE4\xBF\xA1\xE6\x81\**
    xAF\xE6\x90\x9C\xE7\xB4\xA2\**xE6\x97\xB6\xE3\x80\x82\n
    </td>\n
    </tr>\n</table>\n<!--/Content-**->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td
    class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n



    </tr>\n</table>\n<!--/Info-->\**n\n<!--/Contents-->\n<!--
    **Policy-->\n<table
    class='policyTable'>\n <tr>\n <td
    class='policyHeading'>\n
    <hr>\n




    \xE4\xB8\x9C\xE8\xBD\**xAFInternet\xE8\xAE\xBF\xE9\**
    x97\xAE\xE7\xAE\xA1\xE7\x90\**x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.




    \xE5\xBC\x80\xE6\x94\xBE\xE4\**
    xBF\xA1\xE6\x81\xAF\xE7\xA7\**x91\xE6\x8A\x80\xE3\x80\x81\**
    xE5\x95\x86\xE4\xB8\x9A\xE4\**xB8\x8E\xE7\xBB\x8F\xE6\xB5\**
    x8E\xE3\x80\x81\xE6\x96\xB0\**xE9\x97\xBB\xE4\xB8\x8E\xE5\**
    xAA\x92\xE4\xBD\x93\xE3\x80\**x81\xE6\x90\x9C\xE7\xB4\xA2\**
    xE5\xBC\x95\xE6\x93\x8E\xE4\**xB8\x8E\xE9\x97\xA8\xE6\x88\**
    xB7\xE3\x80\x81\xE6\x94\xBF\**xE5\xBA\x9C\xE3\x80\x81\xE6\**
    x95\x99\xE8\x82\xB2\xE3\x80\**x81\xE5\x81\xA5\xE5\xBA\xB7\**
    xE3\x80\x81\xE4\xBA\xA4\xE9\**x80\x9A\xE7\xAD\x89\xE7\xB1\**xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.




    \xE7\xA6\x81\xE6\xAD\xA2\xE8\**
    xB5\x8C\xE5\x8D\x9A\xE3\x80\**x81\xE6\x88\x90\xE4\xBA\xBA\**
    xE3\x80\x81\xE5\xBA\xB8\xE4\**xBF\x97\xE3\x80\x81\xE6\x9A\**
    xB4\xE5\x8A\x9B\xE3\x80\x81\**xE7\xBD\x91\xE7\xBB\x9C\xE8\**
    x81\x8A\xE5\xA4\xA9\xE3\x80\**x81\xE9\x87\x91\xE8\x9E\x8D\**
    xE4\xBF\xA1\xE6\x81\xAF\xE4\**xB8\x8E\xE6\x9C\x8D\xE5\x8A\**
    xA1\xE3\x80\x81\xE5\xAE\x97\**xE6\x95\x99\xE3\x80\x81\xE6\**
    xB1\x82\xE8\x81\x8C\xE3\x80\**x81\xE5\xA8\xB1\xE4\xB9\x90\**
    xE3\x80\x81\xE6\x97\xB6\xE5\**xB0\x9A\xE4\xB8\x8E\xE7\x94\**
    x9F\xE6\xB4\xBB\xE3\x80\x81\**xE6\xB5\x81\xE5\xAA\x92\xE4\**
    xBD\x93\xE3\x80\x81Webmail\**xE3\x80\x81Blog\xE7\xAD\x89\**
    xE7\xB1\xBB\xE5\x88\xAB\xEF\**xBC\x9B\xE7\xA6\x81\xE6\xAD\**
    xA2\xE9\x80\x9A\xE8\xBF\x87\**xE4\xBB\xA3\xE7\x90\x86\xE8\**
    xAE\xBF\xE9\x97\xAE\xE5\x85\**xAC\xE5\x8F\xB8\xE5\x86\x85\**
    xE7\xBD\x91\xE8\xB5\x84\xE6\**xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.




    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\**
    xB6\xB3\xE5\x91\x98\xE5\xB7\**xA5\xE7\x89\xB9\xE6\xAE\x8A\**
    xE9\x9C\x80\xE6\xB1\x82\xEF\**xBC\x8C\xE5\x85\xAC\xE5\x8F\**
    xB8\xE6\x8F\x90\xE4\xBE\x9B\**xE7\xBD\x91\xE7\xAB\x99\xE5\**
    xBC\x80\xE9\x80\x9A\xE7\x9A\**x84\xE6\xB5\x81\xE7\xA8\x8B\**
    xEF\xBC\x8C\xE5\x85\xB7\xE4\**xBD\x93\xE8\xAF\xB7\xE5\x8F\**
    x82\xE8\xA7\x81web.neusoft.**com->\xE6\x9C\x8D\xE5\x8A\xA1\**
    xE5\xB9\xB3\xE5\x8F\xB0->IT\**xE6\x9C\x8D\xE5\x8A\xA1\xE7\**xAE\xA1\xE7\x90\x86



    \xE5\x8F\x91\xE5\xB8\x83\xE7\**
    x9A\x84\xE6\xB5\x81\xE7\xA8\**x8B\xE5\x92\x8C\xE8\xA1\xA8\**xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n
    </tr>\n</table>\n<!--/Policy--**>\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData'
    \n



    \xE4\xBF\xA1\xE6\x81\xAF\xE8\**
    xA7\x84\xE5\x88\x92\xE4\xB8\**x8E\xE7\xAE\xA1\xE7\x90\x86\**
    xE9\x83\xA8\xEF\xBC\x8C\xE6\**xB2\x88\xE9\x98\xB3\xE5\x9B\**
    xAD\xE5\x8C\xBAA2\xE6\xA5\**xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\**xBC\x9A...@neusoft.com\n
    </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n




    \xE7\x94\xB5\xE8\xAF\x9D\xEF\**
    xBC\x9A+86-24-83665512\xE3\**x80\x80\xE3\x80\x80\xE4\xBC\**
    xA0\xE7\x9C\x9F\xEF\xBC\x9A+**86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\"
    onClick=\"javascript:parent.**window.close();\"




    value=\"\xE5\x85\xB3\xE9\x97\**
    xAD\xE9\xA1\xB5\xE9\x9D\xA2\">**\n\t\t\t</form>\n\n</u></font>**</td>\n
    </tr>\n</table>\n<!--/Foot-->\**n </td>\n
    </tr>\n
    </table>\n</body>\n<!--/Body--**>\n</html>\n",
    {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)",
    :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-**Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259
    tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Haipeng Wu at Sep 13, 2012 at 7:29 am
    Yes, you got the file, but didn't pass the check, meant the transferring
    was incomplete.
    dev-setup uses sha256sum for checksum checking.

    Here is a small script to download file from cf blob below.
    You can use it, and check if your downloading is complete.

    ========================
    #!/usr/bin/ruby

    require "rubygems"
    require "blobstore_client"

    include Bosh::Blobstore

    unless ARGV.size == 2 then
    puts "/usr/bin/ruby get.rb <id> <path>"
    exit
    end

    options = {
    :url => "http://blob.cfblob.com",
    :uid => "bb6a0c89ef4048a8a0f814e25385d1c5/user1"
    }
    client = Client.create( "atmos", options )

    file = File.new( ARGV[1], "w" )
    client.get( ARGV[0], file )
    file.close

    ==========

    haipeng
    On Wed, Sep 12, 2012 at 4:53 PM, wrote:

    Another thing is I think the files have been downloaded from cf blob.
    because below code doesn't raise exception:
    def download_blob(id)
    Tempfile.open('cf-temp') do |tf|
    AtmosBlobstoreClient.new(BLOBSTORE_HOST).get_file(id, tf)
    tf.close
    yield tf.path
    end
    end

    But when do check sum for files, the Error is raised:

    remote_file_checksum = checksum(tempfile)

    if remote_file_checksum == @new_resource.checksum
    Chef::Log.debug "remote file checksum: #{remote_file_checksum},
    validated!"
    FileUtils.cp(tempfile, @new_resource.path)
    Chef::Log.info "#{@new_resource} updated"
    @new_resource.updated_by_last_action(true)
    else
    Chef::Log.debug "remote file checksum: #{remote_file_checksum},
    invalid"
    # TODO: retry?
    raise "Checksum mismatch for cf_remote_file #{@new_resource}"
    end

    在 2012年9月12日星期三UTC+8下午3时06分16秒,Haipeng Wu写道:
    I suggest you fix your network problem first.
    Dev-setup succeed is a must to let your cloud foundry working.

    haipeng
    On Wed, Sep 12, 2012 at 2:59 PM, Haipeng Wu wrote:

    Hi,

    You have to run dev_setup before you start cloud foundry, dev_setup not
    only downloads files, but also does configurations.

    From you previous emails, your main problem is the network issue, which
    make you can't download from cf blobs.
    To continue the dev_setup, you need to download all of the files by
    yourself and put them in the directory "/var/cache/dev_setup/".
    Dev_setup script will not download if it could find those files in that
    directory.

    Also, you need to take a look at the source code in dev_setup if you do
    so.

    haipeng
    On Wed, Sep 12, 2012 at 1:41 PM, wrote:

    Actually I used to run the latest dev_setup.
    But there is a problem which I used to raise a topic

    the information is like below:

    [2012-09-11T13:11:36+08:00] INFO: Processing
    deployment_remote_file[/var/**cache/dev_setup/libpq5_9.2.**deb] action
    create (essentials::default line 22)

    ==============================**==============================**
    ====================
    Error executing action `create` on resource
    'deployment_remote_file[/var/**cache/dev_setup/libpq5_9.2.**deb]'
    ==============================**==============================**
    ====================

    RuntimeError
    ------------
    Checksum mismatch for cf_remote_file deployment_remote_file[/var/**
    cache/dev_setup/libpq5_9.2.**deb]

    Cookbook Trace:
    ---------------
    /root/cloudfoundry/vcap/dev_**setup/cookbooks/deployment/**providers/remote_file.rb:49:in
    `action_create'
    /root/cloudfoundry/vcap/dev_**setup/cookbooks/deployment/**providers/remote_file.rb:24:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_**setup/cookbooks/deployment/**providers/remote_file.rb:21:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_**setup/cookbooks/deployment/**providers/remote_file.rb:38:in
    `action_create'

    Resource Declaration:
    ---------------------
    # In /root/cloudfoundry/vcap/dev_**setup/cookbooks/essentials/**
    recipes/default.rb

    21: libpq_deb_path = File.join(node[:deployment][:**setup_cache],
    "libpq5_9.2.deb")
    22: cf_remote_file libpq_deb_path do
    23: owner node[:deployment][:user]
    24: id node[:postgresql][:id][:libpq]**["#{machine}"]
    25: checksum node[:postgresql][:checksum][:**libpq]["#{machine}"]
    26: end
    27:

    Compiled Resource:
    ------------------
    # Declared in /root/cloudfoundry/vcap/dev_**setup/cookbooks/essentials/
    **recipes/default.rb:22:in `from_file'

    deployment_remote_file("/var/**cache/dev_setup/libpq5_9.2.**deb") do
    id "**eyJzaWciOiI2Q21GcmhocWpPaTFocE**FhMlp2TFpZVlFOMGM9Iiwib2lkIjoi*
    *%**0ANGU0ZTc4YmNhNTFlMTIyMDA0ZTRl**OGVjNjg0MDc3MDUwMmU4NDc0MzFmMD**
    Ii%0AfQ==%0A"
    checksum "**b6a7fe7634c41717757481713b24b0**
    c0d9eeb5937875daea7aba17c7750e**3f9e"
    recipe_name "default"
    path #<Pathname:/var/cache/dev_**setup/libpq5_9.2.deb>
    retry_delay 2
    owner "root"
    cookbook_name :essentials
    retries 0
    action :create
    end

    [2012-09-11T13:12:02+08:00] ERROR: Running exception handlers
    [2012-09-11T13:12:02+08:00] ERROR: Exception handlers complete
    [2012-09-11T13:12:02+08:00] FATAL: Stacktrace dumped to
    /var/chef/cache/chef-**stacktrace.out
    [2012-09-11T13:12:02+08:00] FATAL: RuntimeError:
    deployment_remote_file[/var/**cache/dev_setup/libpq5_9.2.**deb]
    (essentials::default line 22) had an error: RuntimeError: Checksum mismatch
    for cf_remote_file deployment_remote_file[/var/**
    cache/dev_setup/libpq5_9.2.**deb]

    在 2012年9月12日星期三UTC+8下午1时33分20秒,**Anfernee Gui写道:
    That is the wrong config file, which is very out-of-date.
    Please run the following command to start nginx

    $ /etc/init.d/nginx_router restart

    If you don't have that script, please run the latest dev_setup again.
    On Wed, Sep 12, 2012 at 1:10 PM, wrote:
    Hi Anfernee:
    Now I run the nginx.
    netstat -lnp|grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    27125/nginx: master

    The error information changed like below:
    vmc target api.vcap.me
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y
    Error (JSON 404): VCAP ROUTER: 404 - DESTINATION ...

    the vcap.access.log information is :
    api.vcap.me - [12/Sep/2012:05:48:50 -0700] "GET /info HTTP/1.1" 404 311 "-"
    "Ruby" 127.0.0.1 response_time:0.020

    My Nginx.conf is like below, and I see the file /tmp/router.sock
    user www-data;
    worker_processes 1;

    error_log /var/log/nginx/error.log;
    pid /var/run/nginx.pid;

    events {
    worker_connections 2048;
    use epoll;
    # multi_accept on;
    }

    http {
    include /etc/nginx/mime.types;
    access_log /var/log/nginx/access.log;

    log_format main '$host - [$time_local] '
    '"$request" $status $bytes_sent '
    '"$http_referer" "$http_user_agent" '
    '$remote_addr response_time:$upstream_**respon*
    *se_time';
    default_type text/html;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    keepalive_timeout 75 20;

    gzip on;
    gzip_min_length 1250;
    gzip_buffers 16 8k;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types text/plain text/css application/javascript
    application/x-javascript text/xml application/xml
    application/xml+rss
    text/javascript;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    client_max_body_size 256M;

    upstream vcap_router {
    server unix:/tmp/router.sock;
    }
    server {
    listen *:80;
    server_name _;

    access_log /var/vcap/sys/log/vcap.access.****log main;
    server_name_in_redirect off;

    location / {
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP
    $remote_addr;
    proxy_set_header X-Forwarded_For
    $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded_Proto http;
    proxy_redirect off;
    proxy_connect_timeout 10;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_pass http://vcap_router;
    }
    }
    }



    在 2012年9月12日星期三UTC+8上午11时36分35秒,****Anfernee Gui写道:
    apache2 hijacked the http request.
    stop it. and do

    $ service nginx_router start

    instead.

    On Wed, Sep 12, 2012 at 11:32 AM, wrote:
    the out put is
    netstat -lnp | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:*
    LISTEN
    3312/apache2

    在 2012年9月12日星期三UTC+8上午11时30分52秒,****Anfernee Gui写道:
    Just do:
    $ sudo netstat -lnp | grep :80

    On Wed, Sep 12, 2012 at 11:26 AM, <yangzif...@gmail.com>
    wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,****Anfernee Gui写道:
    Can you check if nginx is listening on port 80?

    On Wed, Sep 12, 2012 at 11:20 AM, <yangzif...@gmail.com>
    wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from
    other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,****Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway
    7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, <yangzif...@gmail.com>
    wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging
    script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"




    \"http://www.w3.org/TR/xhtml1/****
    DTD/xhtml1-transitional.dtd\<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%5C>
    ">****\n<html>\n<!--
    FileName: index.html\n Language:
    [en]\n-->\n<!--Head-->\n<head>****\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\"
    />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#**666666**;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color:
    #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n




    <title>\xE4\xB8\x9C\xE8\xBD\**xA**
    FInternet\xE8\xAE\xBF\xE9\**x97\**xAE\xE7\xAE\xA1\xE7\x90\**x86\**xE9\xA1\xB5</title>\n
    <script
    src=\"/mwg-internal/**de5fs23hu7**3ds/files/**javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link
    rel=\"stylesheet\"
    href=\"/mwg-internal/**de5fs23hu**73ds/files/default/**
    stylesheet.**css\"
    />\n</head>\n<!--/Head-->\n<!-****-Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n
    <tr>\n
    <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n
    <img
    src='/mwg-internal/**de5fs23hu73**ds/files/default/**img/logo.jpg
    '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\****n<!--Contents-->\n<!--
    FileName:
    cannotconnect.html\n Language:
    [en]\n-->\n<!--Title-->\n<**tabl**e
    class='titleTable'




    background='/mwg-internal/**de5f**
    s23hu73ds/files/default/**img/**bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n




    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\**x**
    99\xA8\xE6\xB2\xA1\xE6\x9C\**x89**\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n
    </tr>\n</table>\n<!--/Title-->****\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td
    class=\"policytData\">\n




    \xE6\x82\xA8\xE6\x8C\x87\xE5\**x**
    AE\x9A\xE7\x9A\x84\xE7\xBD\**x91**\xE9\xA1\xB5\xE6\x97\xA0\**xE6\**
    xB3\x95\xE8\xAE\xBF\xE9\**x97\**xAE\xE3\x80\x82\xE8\xAF\**xA5\**
    xE9\x97\xAE\xE9\xA2\x98\**xE5\**x8F\xAF\xE8\x83\xBD\xE6\**x98\**
    xAF\xE7\x94\xB1\xE4\xBA\**x8E\**xE6\x82\xA8\xE8\xAE\xBF\**xE9\**
    x97\xAE\xE7\x9A\x84\xE6\**x9C\**x8D\xE5\x8A\xA1\xE5\x99\**xA8\**
    xE9\x83\xA8\xE7\xBD\xB2\**xE5\**x9C\xA8\xE6\xB5\xB7\xE5\**xA4\**
    x96\xEF\xBC\x8C\xE7\x94\**xB1\**xE4\xBA\x8E\xE4\xB8\x80\**xE4\**
    xBA\x9B\xE4\xB8\xB4\xE6\**x97\**xB6\xE7\x9A\x84\xE7\xBD\**x91\**
    xE7\xBB\x9C\xE9\x97\xAE\**xE9\**xA2\x98\xE8\x80\x8C\xE5\**xAF\**
    xBC\xE8\x87\xB4\xE7\x9A\**x84\**xE3\x80\x82\xE8\xBF\x99\**xE7\**
    xB1\xBB\xE9\x97\xAE\xE9\**xA2\**x98\xE5\xB8\xB8\xE5\x87\**xBA\**
    xE7\x8E\xB0\xE4\xBA\x8E\**xE6\**x82\xA8\xE4\xBD\xBF\xE7\**x94\**
    xA8Google\xE8\xBF\x9B\xE8\**xA1\**x8C\xE4\xBF\xA1\xE6\x81\**xAF\**
    xE6\x90\x9C\xE7\xB4\xA2\**xE6\**x97\xB6\xE3\x80\x82\n
    </td>\n
    </tr>\n</table>\n<!--/Content-****->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td
    class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n



    </tr>\n</table>\n<!--/Info-->\****
    n\n<!--/Contents-->\n<!--**Polic**y-->\n<table
    class='policyTable'>\n <tr>\n <td
    class='policyHeading'>\n
    <hr>\n




    \xE4\xB8\x9C\xE8\xBD\**xAFIntern**et\xE8\xAE\xBF\xE9\**
    x97\xAE\**xE7\xAE\xA1\xE7\x90\**x86\xE5\**x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.




    \xE5\xBC\x80\xE6\x94\xBE\xE4\**x**
    BF\xA1\xE6\x81\xAF\xE7\xA7\**x91**\xE6\x8A\x80\xE3\x80\x81\**xE5\**
    x95\x86\xE4\xB8\x9A\xE4\**xB8\**x8E\xE7\xBB\x8F\xE6\xB5\**x8E\**
    xE3\x80\x81\xE6\x96\xB0\**xE9\**x97\xBB\xE4\xB8\x8E\xE5\**xAA\**
    x92\xE4\xBD\x93\xE3\x80\**x81\**xE6\x90\x9C\xE7\xB4\xA2\**xE5\**
    xBC\x95\xE6\x93\x8E\xE4\**xB8\**x8E\xE9\x97\xA8\xE6\x88\**xB7\**
    xE3\x80\x81\xE6\x94\xBF\**xE5\**xBA\x9C\xE3\x80\x81\xE6\**x95\**
    x99\xE8\x82\xB2\xE3\x80\**x81\**xE5\x81\xA5\xE5\xBA\xB7\**xE3\**
    x80\x81\xE4\xBA\xA4\xE9\**x80\**x9A\xE7\xAD\x89\xE7\xB1\**xBB\**xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.




    \xE7\xA6\x81\xE6\xAD\xA2\xE8\**x**
    B5\x8C\xE5\x8D\x9A\xE3\x80\**x81**\xE6\x88\x90\xE4\xBA\xBA\**xE3\**
    x80\x81\xE5\xBA\xB8\xE4\**xBF\**x97\xE3\x80\x81\xE6\x9A\**xB4\**
    xE5\x8A\x9B\xE3\x80\x81\**xE7\**xBD\x91\xE7\xBB\x9C\xE8\**x81\**
    x8A\xE5\xA4\xA9\xE3\x80\**x81\**xE9\x87\x91\xE8\x9E\x8D\**xE4\**
    xBF\xA1\xE6\x81\xAF\xE4\**xB8\**x8E\xE6\x9C\x8D\xE5\x8A\**xA1\**
    xE3\x80\x81\xE5\xAE\x97\**xE6\**x95\x99\xE3\x80\x81\xE6\**xB1\**
    x82\xE8\x81\x8C\xE3\x80\**x81\**xE5\xA8\xB1\xE4\xB9\x90\**xE3\**
    x80\x81\xE6\x97\xB6\xE5\**xB0\**x9A\xE4\xB8\x8E\xE7\x94\**x9F\**
    xE6\xB4\xBB\xE3\x80\x81\**xE6\**xB5\x81\xE5\xAA\x92\xE4\**xBD\**
    x93\xE3\x80\x81Webmail\**xE3\**x80\x81Blog\xE7\xAD\x89\**xE7\**
    xB1\xBB\xE5\x88\xAB\xEF\**xBC\**x9B\xE7\xA6\x81\xE6\xAD\**xA2\**
    xE9\x80\x9A\xE8\xBF\x87\**xE4\**xBB\xA3\xE7\x90\x86\xE8\**xAE\**
    xBF\xE9\x97\xAE\xE5\x85\**xAC\**xE5\x8F\xB8\xE5\x86\x85\**xE7\**
    xBD\x91\xE8\xB5\x84\xE6\**xBA\**x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td
    class='policyData'>\n3.



    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\**x**
    B6\xB3\xE5\x91\x98\xE5\xB7\**xA5**\xE7\x89\xB9\xE6\xAE\x8A\**xE9\**
    x9C\x80\xE6\xB1\x82\xEF\**xBC\**x8C\xE5\x85\xAC\xE5\x8F\**xB8\**
    xE6\x8F\x90\xE4\xBE\x9B\**xE7\**xBD\x91\xE7\xAB\x99\xE5\**xBC\**
    x80\xE9\x80\x9A\xE7\x9A\**x84\**xE6\xB5\x81\xE7\xA8\x8B\**xEF\**
    xBC\x8C\xE5\x85\xB7\xE4\**xBD\**x93\xE8\xAF\xB7\xE5\x8F\**x82\**
    xE8\xA7\x81web.neusoft.**com->\**xE6\x9C\x8D\xE5\x8A\xA1\**xE5\**
    xB9\xB3\xE5\x8F\xB0->IT\**xE6\**x9C\x8D\xE5\x8A\xA1\xE7\**xAE\**xA1\xE7\x90\x86



    \xE5\x8F\x91\xE5\xB8\x83\xE7\**x**
    9A\x84\xE6\xB5\x81\xE7\xA8\**x8B**\xE5\x92\x8C\xE8\xA1\xA8\**xE6\**xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n
    </tr>\n</table>\n<!--/Policy--****>\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData'
    \n



    \xE4\xBF\xA1\xE6\x81\xAF\xE8\**x**
    A7\x84\xE5\x88\x92\xE4\xB8\**x8E**\xE7\xAE\xA1\xE7\x90\x86\**xE9\**
    x83\xA8\xEF\xBC\x8C\xE6\**xB2\**x88\xE9\x98\xB3\xE5\x9B\**xAD\**
    xE5\x8C\xBAA2\xE6\xA5\**xBC231\**xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\**x**BC\x9A...@neusoft.com\n
    </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n




    \xE7\x94\xB5\xE8\xAF\x9D\xEF\**x**
    BC\x9A+86-24-83665512\xE3\**x80\**x80\xE3\x80\x80\xE4\xBC\**xA0\**
    xE7\x9C\x9F\xEF\xBC\x9A+**86-24-**83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\"
    onClick=\"javascript:parent.**wi**ndow.close();\"




    value=\"\xE5\x85\xB3\xE9\x97\**x**
    AD\xE9\xA1\xB5\xE9\x9D\xA2\">**\**n\t\t\t</form>\n\n</u></font>**<**/td>\n
    </tr>\n</table>\n<!--/Foot-->\****n </td>\n
    </tr>\n
    </table>\n</body>\n<!--/Body--****>\n</html>\n",
    {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)",
    :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-**Alive**"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259
    tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Yangzifeng1104 at Sep 13, 2012 at 7:49 am
    Yes, Haipeng.
    I have overcome this issue by download files manually.:) thanks a lot.
    Now I have finished the installation without any ERROR:

    But when I use it, another problem comes:
    root@arch3:~/cloudfoundry/vcap/dev_setup/bin# ./vcap_dev -n rest start
    Targeting deployment "rest" with cloudfoundry home ""
    Setting up cloud controller environment
    Using cloudfoundry config from /root/cloudfoundry/.deployments/rest/config
    Executing
    /root/cloudfoundry/.deployments/rest/deploy/rubies/ruby-1.9.2-p180/bin/ruby
    /root/cloudfoundry/vcap/dev_setup/bin/vcap start cloud_controller
    mysql_gateway redis_gateway mongodb_node redis_node health_manager
    mongodb_gateway router -c /root/cloudfoundry/.deployments/rest/config -v
    /root/cloudfoundry -l /root/cloudfoundry/.deployments/rest/log
    cloud_controller : RUNNING
    health_manager : RUNNING
    router : RUNNING

    only 3 processes are running. I see the document "Single/Multi Node VCAP
    Deployment using dev_setup". there are much more processes.

    and when I use vmc to test, the result is

    root@arch3:~/cloudfoundry/vcap/dev_setup/bin# vmc target api.vcap.me
    Successfully targeted to [http://api.vcap.me]
    root@arch3:~/cloudfoundry/vcap/dev_setup/bin# vmc register
    Email: y@gmail.com
    Password: ***
    Verify Password: ***
    Creating New User: OK
    Attempting login to [http://api.vcap.me]
    Problem with login to 'http://api.vcap.me', 404: entity not found or
    inaccessible, try again or register for an account.


    在 2012年9月13日星期四UTC+8下午2时26分33秒,Haipeng Wu写道:
    Yes, you got the file, but didn't pass the check, meant the transferring
    was incomplete.
    dev-setup uses sha256sum for checksum checking.

    Here is a small script to download file from cf blob below.
    You can use it, and check if your downloading is complete.

    ========================
    #!/usr/bin/ruby

    require "rubygems"
    require "blobstore_client"

    include Bosh::Blobstore

    unless ARGV.size == 2 then
    puts "/usr/bin/ruby get.rb <id> <path>"
    exit
    end

    options = {
    :url => "http://blob.cfblob.com",
    :uid => "bb6a0c89ef4048a8a0f814e25385d1c5/user1"
    }
    client = Client.create( "atmos", options )

    file = File.new( ARGV[1], "w" )
    client.get( ARGV[0], file )
    file.close

    ==========

    haipeng

    On Wed, Sep 12, 2012 at 4:53 PM, <yangzif...@gmail.com <javascript:>>wrote:
    Another thing is I think the files have been downloaded from cf blob.
    because below code doesn't raise exception:
    def download_blob(id)
    Tempfile.open('cf-temp') do |tf|
    AtmosBlobstoreClient.new(BLOBSTORE_HOST).get_file(id, tf)
    tf.close
    yield tf.path
    end
    end

    But when do check sum for files, the Error is raised:

    remote_file_checksum = checksum(tempfile)

    if remote_file_checksum == @new_resource.checksum
    Chef::Log.debug "remote file checksum: #{remote_file_checksum},
    validated!"
    FileUtils.cp(tempfile, @new_resource.path)
    Chef::Log.info "#{@new_resource} updated"
    @new_resource.updated_by_last_action(true)
    else
    Chef::Log.debug "remote file checksum: #{remote_file_checksum},
    invalid"
    # TODO: retry?
    raise "Checksum mismatch for cf_remote_file #{@new_resource}"
    end

    在 2012年9月12日星期三UTC+8下午3时06分16秒,Haipeng Wu写道:
    I suggest you fix your network problem first.
    Dev-setup succeed is a must to let your cloud foundry working.

    haipeng
    On Wed, Sep 12, 2012 at 2:59 PM, Haipeng Wu wrote:

    Hi,

    You have to run dev_setup before you start cloud foundry, dev_setup not
    only downloads files, but also does configurations.

    From you previous emails, your main problem is the network issue, which
    make you can't download from cf blobs.
    To continue the dev_setup, you need to download all of the files by
    yourself and put them in the directory "/var/cache/dev_setup/".
    Dev_setup script will not download if it could find those files in that
    directory.

    Also, you need to take a look at the source code in dev_setup if you do
    so.

    haipeng
    On Wed, Sep 12, 2012 at 1:41 PM, wrote:

    Actually I used to run the latest dev_setup.
    But there is a problem which I used to raise a topic

    the information is like below:

    [2012-09-11T13:11:36+08:00] INFO: Processing
    deployment_remote_file[/var/**cache/dev_setup/libpq5_9.2.**deb]
    action create (essentials::default line 22)

    ==============================**==============================**
    ====================
    Error executing action `create` on resource
    'deployment_remote_file[/var/**cache/dev_setup/libpq5_9.2.**deb]'
    ==============================**==============================**
    ====================

    RuntimeError
    ------------
    Checksum mismatch for cf_remote_file deployment_remote_file[/var/**
    cache/dev_setup/libpq5_9.2.**deb]

    Cookbook Trace:
    ---------------
    /root/cloudfoundry/vcap/dev_**setup/cookbooks/deployment/**providers/remote_file.rb:49:in
    `action_create'
    /root/cloudfoundry/vcap/dev_**setup/cookbooks/deployment/**providers/remote_file.rb:24:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_**setup/cookbooks/deployment/**providers/remote_file.rb:21:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_**setup/cookbooks/deployment/**providers/remote_file.rb:38:in
    `action_create'

    Resource Declaration:
    ---------------------
    # In /root/cloudfoundry/vcap/dev_**setup/cookbooks/essentials/**
    recipes/default.rb

    21: libpq_deb_path = File.join(node[:deployment][:**setup_cache],
    "libpq5_9.2.deb")
    22: cf_remote_file libpq_deb_path do
    23: owner node[:deployment][:user]
    24: id node[:postgresql][:id][:libpq]**["#{machine}"]
    25: checksum node[:postgresql][:checksum][:**libpq]["#{machine}"]
    26: end
    27:

    Compiled Resource:
    ------------------
    # Declared in /root/cloudfoundry/vcap/dev_**
    setup/cookbooks/essentials/**recipes/default.rb:22:in `from_file'

    deployment_remote_file("/var/**cache/dev_setup/libpq5_9.2.**deb") do
    id "**eyJzaWciOiI2Q21GcmhocWpPaTFocE**FhMlp2TFpZVlFOMGM9Iiwib2lkIjoi
    **%**0ANGU0ZTc4YmNhNTFlMTIyMDA0ZTRl**OGVjNjg0MDc3MDUwMmU4NDc0MzFmMD**
    Ii%0AfQ==%0A"
    checksum "**b6a7fe7634c41717757481713b24b0**
    c0d9eeb5937875daea7aba17c7750e**3f9e"
    recipe_name "default"
    path #<Pathname:/var/cache/dev_**setup/libpq5_9.2.deb>
    retry_delay 2
    owner "root"
    cookbook_name :essentials
    retries 0
    action :create
    end

    [2012-09-11T13:12:02+08:00] ERROR: Running exception handlers
    [2012-09-11T13:12:02+08:00] ERROR: Exception handlers complete
    [2012-09-11T13:12:02+08:00] FATAL: Stacktrace dumped to
    /var/chef/cache/chef-**stacktrace.out
    [2012-09-11T13:12:02+08:00] FATAL: RuntimeError:
    deployment_remote_file[/var/**cache/dev_setup/libpq5_9.2.**deb]
    (essentials::default line 22) had an error: RuntimeError: Checksum mismatch
    for cf_remote_file deployment_remote_file[/var/**
    cache/dev_setup/libpq5_9.2.**deb]

    在 2012年9月12日星期三UTC+8下午1时33分20秒,**Anfernee Gui写道:
    That is the wrong config file, which is very out-of-date.
    Please run the following command to start nginx

    $ /etc/init.d/nginx_router restart

    If you don't have that script, please run the latest dev_setup again.
    On Wed, Sep 12, 2012 at 1:10 PM, wrote:
    Hi Anfernee:
    Now I run the nginx.
    netstat -lnp|grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    27125/nginx: master

    The error information changed like below:
    vmc target api.vcap.me
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y
    Error (JSON 404): VCAP ROUTER: 404 - DESTINATION ...

    the vcap.access.log information is :
    api.vcap.me - [12/Sep/2012:05:48:50 -0700] "GET /info HTTP/1.1"
    404 311 "-"
    "Ruby" 127.0.0.1 response_time:0.020

    My Nginx.conf is like below, and I see the file /tmp/router.sock
    user www-data;
    worker_processes 1;

    error_log /var/log/nginx/error.log;
    pid /var/run/nginx.pid;

    events {
    worker_connections 2048;
    use epoll;
    # multi_accept on;
    }

    http {
    include /etc/nginx/mime.types;
    access_log /var/log/nginx/access.log;

    log_format main '$host - [$time_local] '
    '"$request" $status $bytes_sent '
    '"$http_referer" "$http_user_agent" '
    '$remote_addr response_time:$upstream_**respon
    **se_time';
    default_type text/html;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    keepalive_timeout 75 20;

    gzip on;
    gzip_min_length 1250;
    gzip_buffers 16 8k;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types text/plain text/css application/javascript
    application/x-javascript text/xml application/xml
    application/xml+rss
    text/javascript;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    client_max_body_size 256M;

    upstream vcap_router {
    server unix:/tmp/router.sock;
    }
    server {
    listen *:80;
    server_name _;

    access_log /var/vcap/sys/log/vcap.access.****log main;
    server_name_in_redirect off;

    location / {
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP
    $remote_addr;
    proxy_set_header X-Forwarded_For
    $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded_Proto http;
    proxy_redirect off;
    proxy_connect_timeout 10;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_pass http://vcap_router;
    }
    }
    }



    在 2012年9月12日星期三UTC+8上午11时36分35秒,****Anfernee Gui写道:
    apache2 hijacked the http request.
    stop it. and do

    $ service nginx_router start

    instead.

    On Wed, Sep 12, 2012 at 11:32 AM, wrote:
    the out put is
    netstat -lnp | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:*
    LISTEN
    3312/apache2

    在 2012年9月12日星期三UTC+8上午11时30分52秒,****Anfernee Gui写道:
    Just do:
    $ sudo netstat -lnp | grep :80

    On Wed, Sep 12, 2012 at 11:26 AM, <yangzif...@gmail.com>
    wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,****Anfernee Gui写道:
    Can you check if nginx is listening on port 80?

    On Wed, Sep 12, 2012 at 11:20 AM, <yangzif...@gmail.com>
    wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from
    other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,****Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway
    7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, <yangzif...@gmail.com>
    wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging
    script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"




    \"http://www.w3.org/TR/xhtml1/****
    DTD/xhtml1-transitional.dtd\<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%5C>
    ">****\n<html>\n<!--
    FileName: index.html\n Language:
    [en]\n-->\n<!--Head-->\n<head>****\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\"
    />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#**666666**;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color:
    #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n




    <title>\xE4\xB8\x9C\xE8\xBD\**xA**
    FInternet\xE8\xAE\xBF\xE9\**x97\**xAE\xE7\xAE\xA1\xE7\x90\**x86\**xE9\xA1\xB5</title>\n
    <script
    src=\"/mwg-internal/**de5fs23hu7**3ds/files/**javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link
    rel=\"stylesheet\"
    href=\"/mwg-internal/**de5fs23hu**73ds/files/default/**
    stylesheet.**css\"
    />\n</head>\n<!--/Head-->\n<!-****-Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n
    <tr>\n
    <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n
    <img
    src='/mwg-internal/**de5fs23hu73**ds/files/default/**img/logo.jpg
    '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\****n<!--Contents-->\n<!--
    FileName:
    cannotconnect.html\n Language:
    [en]\n-->\n<!--Title-->\n<**tabl**e
    class='titleTable'




    background='/mwg-internal/**de5f**
    s23hu73ds/files/default/**img/**bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n




    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\**x**
    99\xA8\xE6\xB2\xA1\xE6\x9C\**x89**\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n
    </tr>\n</table>\n<!--/Title-->****\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td
    class=\"policytData\">\n




    \xE6\x82\xA8\xE6\x8C\x87\xE5\**x**
    AE\x9A\xE7\x9A\x84\xE7\xBD\**x91**\xE9\xA1\xB5\xE6\x97\xA0\**xE6\**
    xB3\x95\xE8\xAE\xBF\xE9\**x97\**xAE\xE3\x80\x82\xE8\xAF\**xA5\**
    xE9\x97\xAE\xE9\xA2\x98\**xE5\**x8F\xAF\xE8\x83\xBD\xE6\**x98\**
    xAF\xE7\x94\xB1\xE4\xBA\**x8E\**xE6\x82\xA8\xE8\xAE\xBF\**xE9\**
    x97\xAE\xE7\x9A\x84\xE6\**x9C\**x8D\xE5\x8A\xA1\xE5\x99\**xA8\**
    xE9\x83\xA8\xE7\xBD\xB2\**xE5\**x9C\xA8\xE6\xB5\xB7\xE5\**xA4\**
    x96\xEF\xBC\x8C\xE7\x94\**xB1\**xE4\xBA\x8E\xE4\xB8\x80\**xE4\**
    xBA\x9B\xE4\xB8\xB4\xE6\**x97\**xB6\xE7\x9A\x84\xE7\xBD\**x91\**
    xE7\xBB\x9C\xE9\x97\xAE\**xE9\**xA2\x98\xE8\x80\x8C\xE5\**xAF\**
    xBC\xE8\x87\xB4\xE7\x9A\**x84\**xE3\x80\x82\xE8\xBF\x99\**xE7\**
    xB1\xBB\xE9\x97\xAE\xE9\**xA2\**x98\xE5\xB8\xB8\xE5\x87\**xBA\**
    xE7\x8E\xB0\xE4\xBA\x8E\**xE6\**x82\xA8\xE4\xBD\xBF\xE7\**x94\**
    xA8Google\xE8\xBF\x9B\xE8\**xA1\**x8C\xE4\xBF\xA1\xE6\x81\**xAF\**
    xE6\x90\x9C\xE7\xB4\xA2\**xE6\**x97\xB6\xE3\x80\x82\n
    </td>\n
    </tr>\n</table>\n<!--/Content-****->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td
    class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n



    </tr>\n</table>\n<!--/Info-->\****
    n\n<!--/Contents-->\n<!--**Polic**y-->\n<table
    class='policyTable'>\n <tr>\n <td
    class='policyHeading'>\n
    <hr>\n




    \xE4\xB8\x9C\xE8\xBD\**xAFIntern**et\xE8\xAE\xBF\xE9\**
    x97\xAE\**xE7\xAE\xA1\xE7\x90\**x86\xE5\**x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.




    \xE5\xBC\x80\xE6\x94\xBE\xE4\**x**
    BF\xA1\xE6\x81\xAF\xE7\xA7\**x91**\xE6\x8A\x80\xE3\x80\x81\**xE5\**
    x95\x86\xE4\xB8\x9A\xE4\**xB8\**x8E\xE7\xBB\x8F\xE6\xB5\**x8E\**
    xE3\x80\x81\xE6\x96\xB0\**xE9\**x97\xBB\xE4\xB8\x8E\xE5\**xAA\**
    x92\xE4\xBD\x93\xE3\x80\**x81\**xE6\x90\x9C\xE7\xB4\xA2\**xE5\**
    xBC\x95\xE6\x93\x8E\xE4\**xB8\**x8E\xE9\x97\xA8\xE6\x88\**xB7\**
    xE3\x80\x81\xE6\x94\xBF\**xE5\**xBA\x9C\xE3\x80\x81\xE6\**x95\**
    x99\xE8\x82\xB2\xE3\x80\**x81\**xE5\x81\xA5\xE5\xBA\xB7\**xE3\**
    x80\x81\xE4\xBA\xA4\xE9\**x80\**x9A\xE7\xAD\x89\xE7\xB1\**xBB\**xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.




    \xE7\xA6\x81\xE6\xAD\xA2\xE8\**x**
    B5\x8C\xE5\x8D\x9A\xE3\x80\**x81**\xE6\x88\x90\xE4\xBA\xBA\**xE3\**
    x80\x81\xE5\xBA\xB8\xE4\**xBF\**x97\xE3\x80\x81\xE6\x9A\**xB4\**
    xE5\x8A\x9B\xE3\x80\x81\**xE7\**xBD\x91\xE7\xBB\x9C\xE8\**x81\**
    x8A\xE5\xA4\xA9\xE3\x80\**x81\**xE9\x87\x91\xE8\x9E\x8D\**xE4\**
    xBF\xA1\xE6\x81\xAF\xE4\**xB8\**x8E\xE6\x9C\x8D\xE5\x8A\**xA1\**
    xE3\x80\x81\xE5\xAE\x97\**xE6\**x95\x99\xE3\x80\x81\xE6\**xB1\**
    x82\xE8\x81\x8C\xE3\x80\**x81\**xE5\xA8\xB1\xE4\xB9\x90\**xE3\**
    x80\x81\xE6\x97\xB6\xE5\**xB0\**x9A\xE4\xB8\x8E\xE7\x94\**x9F\**
    xE6\xB4\xBB\xE3\x80\x81\**xE6\**xB5\x81\xE5\xAA\x92\xE4\**xBD\**
    x93\xE3\x80\x81Webmail\**xE3\**x80\x81Blog\xE7\xAD\x89\**xE7\**
    xB1\xBB\xE5\x88\xAB\xEF\**xBC\**x9B\xE7\xA6\x81\xE6\xAD\**xA2\**
    xE9\x80\x9A\xE8\xBF\x87\**xE4\**xBB\xA3\xE7\x90\x86\xE8\**xAE\**
    xBF\xE9\x97\xAE\xE5\x85\**xAC\**xE5\x8F\xB8\xE5\x86\x85\**xE7\**
    xBD\x91\xE8\xB5\x84\xE6\**xBA\**x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td
    class='policyData'>\n3.



    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\**x**
    B6\xB3\xE5\x91\x98\xE5\xB7\**xA5**\xE7\x89\xB9\xE6\xAE\x8A\**xE9\**
    x9C\x80\xE6\xB1\x82\xEF\**xBC\**x8C\xE5\x85\xAC\xE5\x8F\**xB8\**
    xE6\x8F\x90\xE4\xBE\x9B\**xE7\**xBD\x91\xE7\xAB\x99\xE5\**xBC\**
    x80\xE9\x80\x9A\xE7\x9A\**x84\**xE6\xB5\x81\xE7\xA8\x8B\**xEF\**
    xBC\x8C\xE5\x85\xB7\xE4\**xBD\**x93\xE8\xAF\xB7\xE5\x8F\**x82\**
    xE8\xA7\x81web.neusoft.**com->\**xE6\x9C\x8D\xE5\x8A\xA1\**xE5\**
    xB9\xB3\xE5\x8F\xB0->IT\**xE6\**x9C\x8D\xE5\x8A\xA1\xE7\**xAE\**xA1\xE7\x90\x86



    \xE5\x8F\x91\xE5\xB8\x83\xE7\**x**
    9A\x84\xE6\xB5\x81\xE7\xA8\**x8B**\xE5\x92\x8C\xE8\xA1\xA8\**xE6\**xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n
    </tr>\n</table>\n<!--/Policy--****>\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData'
    \n



    \xE4\xBF\xA1\xE6\x81\xAF\xE8\**x**
    A7\x84\xE5\x88\x92\xE4\xB8\**x8E**\xE7\xAE\xA1\xE7\x90\x86\**xE9\**
    x83\xA8\xEF\xBC\x8C\xE6\**xB2\**x88\xE9\x98\xB3\xE5\x9B\**xAD\**
    xE5\x8C\xBAA2\xE6\xA5\**xBC231\**xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\**x**BC\x9A...@neusoft.com\n
    </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n




    \xE7\x94\xB5\xE8\xAF\x9D\xEF\**x**
    BC\x9A+86-24-83665512\xE3\**x80\**x80\xE3\x80\x80\xE4\xBC\**xA0\**
    xE7\x9C\x9F\xEF\xBC\x9A+**86-24-**83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\"
    onClick=\"javascript:parent.**wi**ndow.close();\"




    value=\"\xE5\x85\xB3\xE9\x97\**x**
    AD\xE9\xA1\xB5\xE9\x9D\xA2\">**\**n\t\t\t</form>\n\n</u></font>**<**/td>\n
    </tr>\n</table>\n<!--/Foot-->\****n </td>\n
    </tr>\n
    </table>\n</body>\n<!--/Body--****>\n</html>\n",
    {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)",
    :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-**Alive**"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router -
    pid=30259
    tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259
    tid=abb1
    fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259
    tid=abb1
    fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259
    tid=abb1
    fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259
    tid=abb1
    fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259
    tid=abb1
    fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259
    tid=abb1
    fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Yangzifeng1104 at Sep 13, 2012 at 8:35 am
    Hi haipeng:
    Thank you for helping me out about this issue.
    As for vmc issue, I have started another topic to discuss with you
    guys.
    This topic could been closed.:)

    在 2012年9月13日星期四UTC+8下午2时26分33秒,Haipeng Wu写道:
    Yes, you got the file, but didn't pass the check, meant the transferring
    was incomplete.
    dev-setup uses sha256sum for checksum checking.

    Here is a small script to download file from cf blob below.
    You can use it, and check if your downloading is complete.

    ========================
    #!/usr/bin/ruby

    require "rubygems"
    require "blobstore_client"

    include Bosh::Blobstore

    unless ARGV.size == 2 then
    puts "/usr/bin/ruby get.rb <id> <path>"
    exit
    end

    options = {
    :url => "http://blob.cfblob.com",
    :uid => "bb6a0c89ef4048a8a0f814e25385d1c5/user1"
    }
    client = Client.create( "atmos", options )

    file = File.new( ARGV[1], "w" )
    client.get( ARGV[0], file )
    file.close

    ==========

    haipeng

    On Wed, Sep 12, 2012 at 4:53 PM, <yangzif...@gmail.com <javascript:>>wrote:
    Another thing is I think the files have been downloaded from cf blob.
    because below code doesn't raise exception:
    def download_blob(id)
    Tempfile.open('cf-temp') do |tf|
    AtmosBlobstoreClient.new(BLOBSTORE_HOST).get_file(id, tf)
    tf.close
    yield tf.path
    end
    end

    But when do check sum for files, the Error is raised:

    remote_file_checksum = checksum(tempfile)

    if remote_file_checksum == @new_resource.checksum
    Chef::Log.debug "remote file checksum: #{remote_file_checksum},
    validated!"
    FileUtils.cp(tempfile, @new_resource.path)
    Chef::Log.info "#{@new_resource} updated"
    @new_resource.updated_by_last_action(true)
    else
    Chef::Log.debug "remote file checksum: #{remote_file_checksum},
    invalid"
    # TODO: retry?
    raise "Checksum mismatch for cf_remote_file #{@new_resource}"
    end

    在 2012年9月12日星期三UTC+8下午3时06分16秒,Haipeng Wu写道:
    I suggest you fix your network problem first.
    Dev-setup succeed is a must to let your cloud foundry working.

    haipeng
    On Wed, Sep 12, 2012 at 2:59 PM, Haipeng Wu wrote:

    Hi,

    You have to run dev_setup before you start cloud foundry, dev_setup not
    only downloads files, but also does configurations.

    From you previous emails, your main problem is the network issue, which
    make you can't download from cf blobs.
    To continue the dev_setup, you need to download all of the files by
    yourself and put them in the directory "/var/cache/dev_setup/".
    Dev_setup script will not download if it could find those files in that
    directory.

    Also, you need to take a look at the source code in dev_setup if you do
    so.

    haipeng
    On Wed, Sep 12, 2012 at 1:41 PM, wrote:

    Actually I used to run the latest dev_setup.
    But there is a problem which I used to raise a topic

    the information is like below:

    [2012-09-11T13:11:36+08:00] INFO: Processing
    deployment_remote_file[/var/**cache/dev_setup/libpq5_9.2.**deb]
    action create (essentials::default line 22)

    ==============================**==============================**
    ====================
    Error executing action `create` on resource
    'deployment_remote_file[/var/**cache/dev_setup/libpq5_9.2.**deb]'
    ==============================**==============================**
    ====================

    RuntimeError
    ------------
    Checksum mismatch for cf_remote_file deployment_remote_file[/var/**
    cache/dev_setup/libpq5_9.2.**deb]

    Cookbook Trace:
    ---------------
    /root/cloudfoundry/vcap/dev_**setup/cookbooks/deployment/**providers/remote_file.rb:49:in
    `action_create'
    /root/cloudfoundry/vcap/dev_**setup/cookbooks/deployment/**providers/remote_file.rb:24:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_**setup/cookbooks/deployment/**providers/remote_file.rb:21:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_**setup/cookbooks/deployment/**providers/remote_file.rb:38:in
    `action_create'

    Resource Declaration:
    ---------------------
    # In /root/cloudfoundry/vcap/dev_**setup/cookbooks/essentials/**
    recipes/default.rb

    21: libpq_deb_path = File.join(node[:deployment][:**setup_cache],
    "libpq5_9.2.deb")
    22: cf_remote_file libpq_deb_path do
    23: owner node[:deployment][:user]
    24: id node[:postgresql][:id][:libpq]**["#{machine}"]
    25: checksum node[:postgresql][:checksum][:**libpq]["#{machine}"]
    26: end
    27:

    Compiled Resource:
    ------------------
    # Declared in /root/cloudfoundry/vcap/dev_**
    setup/cookbooks/essentials/**recipes/default.rb:22:in `from_file'

    deployment_remote_file("/var/**cache/dev_setup/libpq5_9.2.**deb") do
    id "**eyJzaWciOiI2Q21GcmhocWpPaTFocE**FhMlp2TFpZVlFOMGM9Iiwib2lkIjoi
    **%**0ANGU0ZTc4YmNhNTFlMTIyMDA0ZTRl**OGVjNjg0MDc3MDUwMmU4NDc0MzFmMD**
    Ii%0AfQ==%0A"
    checksum "**b6a7fe7634c41717757481713b24b0**
    c0d9eeb5937875daea7aba17c7750e**3f9e"
    recipe_name "default"
    path #<Pathname:/var/cache/dev_**setup/libpq5_9.2.deb>
    retry_delay 2
    owner "root"
    cookbook_name :essentials
    retries 0
    action :create
    end

    [2012-09-11T13:12:02+08:00] ERROR: Running exception handlers
    [2012-09-11T13:12:02+08:00] ERROR: Exception handlers complete
    [2012-09-11T13:12:02+08:00] FATAL: Stacktrace dumped to
    /var/chef/cache/chef-**stacktrace.out
    [2012-09-11T13:12:02+08:00] FATAL: RuntimeError:
    deployment_remote_file[/var/**cache/dev_setup/libpq5_9.2.**deb]
    (essentials::default line 22) had an error: RuntimeError: Checksum mismatch
    for cf_remote_file deployment_remote_file[/var/**
    cache/dev_setup/libpq5_9.2.**deb]

    在 2012年9月12日星期三UTC+8下午1时33分20秒,**Anfernee Gui写道:
    That is the wrong config file, which is very out-of-date.
    Please run the following command to start nginx

    $ /etc/init.d/nginx_router restart

    If you don't have that script, please run the latest dev_setup again.
    On Wed, Sep 12, 2012 at 1:10 PM, wrote:
    Hi Anfernee:
    Now I run the nginx.
    netstat -lnp|grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    27125/nginx: master

    The error information changed like below:
    vmc target api.vcap.me
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y
    Error (JSON 404): VCAP ROUTER: 404 - DESTINATION ...

    the vcap.access.log information is :
    api.vcap.me - [12/Sep/2012:05:48:50 -0700] "GET /info HTTP/1.1"
    404 311 "-"
    "Ruby" 127.0.0.1 response_time:0.020

    My Nginx.conf is like below, and I see the file /tmp/router.sock
    user www-data;
    worker_processes 1;

    error_log /var/log/nginx/error.log;
    pid /var/run/nginx.pid;

    events {
    worker_connections 2048;
    use epoll;
    # multi_accept on;
    }

    http {
    include /etc/nginx/mime.types;
    access_log /var/log/nginx/access.log;

    log_format main '$host - [$time_local] '
    '"$request" $status $bytes_sent '
    '"$http_referer" "$http_user_agent" '
    '$remote_addr response_time:$upstream_**respon
    **se_time';
    default_type text/html;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    keepalive_timeout 75 20;

    gzip on;
    gzip_min_length 1250;
    gzip_buffers 16 8k;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types text/plain text/css application/javascript
    application/x-javascript text/xml application/xml
    application/xml+rss
    text/javascript;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    client_max_body_size 256M;

    upstream vcap_router {
    server unix:/tmp/router.sock;
    }
    server {
    listen *:80;
    server_name _;

    access_log /var/vcap/sys/log/vcap.access.****log main;
    server_name_in_redirect off;

    location / {
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP
    $remote_addr;
    proxy_set_header X-Forwarded_For
    $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded_Proto http;
    proxy_redirect off;
    proxy_connect_timeout 10;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_pass http://vcap_router;
    }
    }
    }



    在 2012年9月12日星期三UTC+8上午11时36分35秒,****Anfernee Gui写道:
    apache2 hijacked the http request.
    stop it. and do

    $ service nginx_router start

    instead.

    On Wed, Sep 12, 2012 at 11:32 AM, wrote:
    the out put is
    netstat -lnp | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:*
    LISTEN
    3312/apache2

    在 2012年9月12日星期三UTC+8上午11时30分52秒,****Anfernee Gui写道:
    Just do:
    $ sudo netstat -lnp | grep :80

    On Wed, Sep 12, 2012 at 11:26 AM, <yangzif...@gmail.com>
    wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,****Anfernee Gui写道:
    Can you check if nginx is listening on port 80?

    On Wed, Sep 12, 2012 at 11:20 AM, <yangzif...@gmail.com>
    wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from
    other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,****Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway
    7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, <yangzif...@gmail.com>
    wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging
    script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"




    \"http://www.w3.org/TR/xhtml1/****
    DTD/xhtml1-transitional.dtd\<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%5C>
    ">****\n<html>\n<!--
    FileName: index.html\n Language:
    [en]\n-->\n<!--Head-->\n<head>****\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\"
    />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#**666666**;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color:
    #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n




    <title>\xE4\xB8\x9C\xE8\xBD\**xA**
    FInternet\xE8\xAE\xBF\xE9\**x97\**xAE\xE7\xAE\xA1\xE7\x90\**x86\**xE9\xA1\xB5</title>\n
    <script
    src=\"/mwg-internal/**de5fs23hu7**3ds/files/**javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link
    rel=\"stylesheet\"
    href=\"/mwg-internal/**de5fs23hu**73ds/files/default/**
    stylesheet.**css\"
    />\n</head>\n<!--/Head-->\n<!-****-Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n
    <tr>\n
    <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n
    <img
    src='/mwg-internal/**de5fs23hu73**ds/files/default/**img/logo.jpg
    '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\****n<!--Contents-->\n<!--
    FileName:
    cannotconnect.html\n Language:
    [en]\n-->\n<!--Title-->\n<**tabl**e
    class='titleTable'




    background='/mwg-internal/**de5f**
    s23hu73ds/files/default/**img/**bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n




    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\**x**
    99\xA8\xE6\xB2\xA1\xE6\x9C\**x89**\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n
    </tr>\n</table>\n<!--/Title-->****\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td
    class=\"policytData\">\n




    \xE6\x82\xA8\xE6\x8C\x87\xE5\**x**
    AE\x9A\xE7\x9A\x84\xE7\xBD\**x91**\xE9\xA1\xB5\xE6\x97\xA0\**xE6\**
    xB3\x95\xE8\xAE\xBF\xE9\**x97\**xAE\xE3\x80\x82\xE8\xAF\**xA5\**
    xE9\x97\xAE\xE9\xA2\x98\**xE5\**x8F\xAF\xE8\x83\xBD\xE6\**x98\**
    xAF\xE7\x94\xB1\xE4\xBA\**x8E\**xE6\x82\xA8\xE8\xAE\xBF\**xE9\**
    x97\xAE\xE7\x9A\x84\xE6\**x9C\**x8D\xE5\x8A\xA1\xE5\x99\**xA8\**
    xE9\x83\xA8\xE7\xBD\xB2\**xE5\**x9C\xA8\xE6\xB5\xB7\xE5\**xA4\**
    x96\xEF\xBC\x8C\xE7\x94\**xB1\**xE4\xBA\x8E\xE4\xB8\x80\**xE4\**
    xBA\x9B\xE4\xB8\xB4\xE6\**x97\**xB6\xE7\x9A\x84\xE7\xBD\**x91\**
    xE7\xBB\x9C\xE9\x97\xAE\**xE9\**xA2\x98\xE8\x80\x8C\xE5\**xAF\**
    xBC\xE8\x87\xB4\xE7\x9A\**x84\**xE3\x80\x82\xE8\xBF\x99\**xE7\**
    xB1\xBB\xE9\x97\xAE\xE9\**xA2\**x98\xE5\xB8\xB8\xE5\x87\**xBA\**
    xE7\x8E\xB0\xE4\xBA\x8E\**xE6\**x82\xA8\xE4\xBD\xBF\xE7\**x94\**
    xA8Google\xE8\xBF\x9B\xE8\**xA1\**x8C\xE4\xBF\xA1\xE6\x81\**xAF\**
    xE6\x90\x9C\xE7\xB4\xA2\**xE6\**x97\xB6\xE3\x80\x82\n
    </td>\n
    </tr>\n</table>\n<!--/Content-****->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td
    class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n



    </tr>\n</table>\n<!--/Info-->\****
    n\n<!--/Contents-->\n<!--**Polic**y-->\n<table
    class='policyTable'>\n <tr>\n <td
    class='policyHeading'>\n
    <hr>\n




    \xE4\xB8\x9C\xE8\xBD\**xAFIntern**et\xE8\xAE\xBF\xE9\**
    x97\xAE\**xE7\xAE\xA1\xE7\x90\**x86\xE5\**x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.




    \xE5\xBC\x80\xE6\x94\xBE\xE4\**x**
    BF\xA1\xE6\x81\xAF\xE7\xA7\**x91**\xE6\x8A\x80\xE3\x80\x81\**xE5\**
    x95\x86\xE4\xB8\x9A\xE4\**xB8\**x8E\xE7\xBB\x8F\xE6\xB5\**x8E\**
    xE3\x80\x81\xE6\x96\xB0\**xE9\**x97\xBB\xE4\xB8\x8E\xE5\**xAA\**
    x92\xE4\xBD\x93\xE3\x80\**x81\**xE6\x90\x9C\xE7\xB4\xA2\**xE5\**
    xBC\x95\xE6\x93\x8E\xE4\**xB8\**x8E\xE9\x97\xA8\xE6\x88\**xB7\**
    xE3\x80\x81\xE6\x94\xBF\**xE5\**xBA\x9C\xE3\x80\x81\xE6\**x95\**
    x99\xE8\x82\xB2\xE3\x80\**x81\**xE5\x81\xA5\xE5\xBA\xB7\**xE3\**
    x80\x81\xE4\xBA\xA4\xE9\**x80\**x9A\xE7\xAD\x89\xE7\xB1\**xBB\**xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.




    \xE7\xA6\x81\xE6\xAD\xA2\xE8\**x**
    B5\x8C\xE5\x8D\x9A\xE3\x80\**x81**\xE6\x88\x90\xE4\xBA\xBA\**xE3\**
    x80\x81\xE5\xBA\xB8\xE4\**xBF\**x97\xE3\x80\x81\xE6\x9A\**xB4\**
    xE5\x8A\x9B\xE3\x80\x81\**xE7\**xBD\x91\xE7\xBB\x9C\xE8\**x81\**
    x8A\xE5\xA4\xA9\xE3\x80\**x81\**xE9\x87\x91\xE8\x9E\x8D\**xE4\**
    xBF\xA1\xE6\x81\xAF\xE4\**xB8\**x8E\xE6\x9C\x8D\xE5\x8A\**xA1\**
    xE3\x80\x81\xE5\xAE\x97\**xE6\**x95\x99\xE3\x80\x81\xE6\**xB1\**
    x82\xE8\x81\x8C\xE3\x80\**x81\**xE5\xA8\xB1\xE4\xB9\x90\**xE3\**
    x80\x81\xE6\x97\xB6\xE5\**xB0\**x9A\xE4\xB8\x8E\xE7\x94\**x9F\**
    xE6\xB4\xBB\xE3\x80\x81\**xE6\**xB5\x81\xE5\xAA\x92\xE4\**xBD\**
    x93\xE3\x80\x81Webmail\**xE3\**x80\x81Blog\xE7\xAD\x89\**xE7\**
    xB1\xBB\xE5\x88\xAB\xEF\**xBC\**x9B\xE7\xA6\x81\xE6\xAD\**xA2\**
    xE9\x80\x9A\xE8\xBF\x87\**xE4\**xBB\xA3\xE7\x90\x86\xE8\**xAE\**
    xBF\xE9\x97\xAE\xE5\x85\**xAC\**xE5\x8F\xB8\xE5\x86\x85\**xE7\**
    xBD\x91\xE8\xB5\x84\xE6\**xBA\**x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td
    class='policyData'>\n3.



    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\**x**
    B6\xB3\xE5\x91\x98\xE5\xB7\**xA5**\xE7\x89\xB9\xE6\xAE\x8A\**xE9\**
    x9C\x80\xE6\xB1\x82\xEF\**xBC\**x8C\xE5\x85\xAC\xE5\x8F\**xB8\**
    xE6\x8F\x90\xE4\xBE\x9B\**xE7\**xBD\x91\xE7\xAB\x99\xE5\**xBC\**
    x80\xE9\x80\x9A\xE7\x9A\**x84\**xE6\xB5\x81\xE7\xA8\x8B\**xEF\**
    xBC\x8C\xE5\x85\xB7\xE4\**xBD\**x93\xE8\xAF\xB7\xE5\x8F\**x82\**
    xE8\xA7\x81web.neusoft.**com->\**xE6\x9C\x8D\xE5\x8A\xA1\**xE5\**
    xB9\xB3\xE5\x8F\xB0->IT\**xE6\**x9C\x8D\xE5\x8A\xA1\xE7\**xAE\**xA1\xE7\x90\x86



    \xE5\x8F\x91\xE5\xB8\x83\xE7\**x**
    9A\x84\xE6\xB5\x81\xE7\xA8\**x8B**\xE5\x92\x8C\xE8\xA1\xA8\**xE6\**xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n
    </tr>\n</table>\n<!--/Policy--****>\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData'
    \n



    \xE4\xBF\xA1\xE6\x81\xAF\xE8\**x**
    A7\x84\xE5\x88\x92\xE4\xB8\**x8E**\xE7\xAE\xA1\xE7\x90\x86\**xE9\**
    x83\xA8\xEF\xBC\x8C\xE6\**xB2\**x88\xE9\x98\xB3\xE5\x9B\**xAD\**
    xE5\x8C\xBAA2\xE6\xA5\**xBC231\**xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\**x**BC\x9A...@neusoft.com\n
    </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n




    \xE7\x94\xB5\xE8\xAF\x9D\xEF\**x**
    BC\x9A+86-24-83665512\xE3\**x80\**x80\xE3\x80\x80\xE4\xBC\**xA0\**
    xE7\x9C\x9F\xEF\xBC\x9A+**86-24-**83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\"
    onClick=\"javascript:parent.**wi**ndow.close();\"




    value=\"\xE5\x85\xB3\xE9\x97\**x**
    AD\xE9\xA1\xB5\xE9\x9D\xA2\">**\**n\t\t\t</form>\n\n</u></font>**<**/td>\n
    </tr>\n</table>\n<!--/Foot-->\****n </td>\n
    </tr>\n
    </table>\n</body>\n<!--/Body--****>\n</html>\n",
    {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)",
    :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-**Alive**"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router -
    pid=30259
    tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259
    tid=abb1
    fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259
    tid=abb1
    fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259
    tid=abb1
    fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259
    tid=abb1
    fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259
    tid=abb1
    fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259
    tid=abb1
    fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee
  • Yangzifeng1104 at Sep 12, 2012 at 8:21 am
    Hi Haipeng:
    Yes, I download lots of files, but some files I can't find.
    such as pcre-8.12.tar.gz , zero_byte_in_cstr_20120315.patch:)

    what protocol is used to download cf blobs files. HTTP or something
    else.??
    By using my http_proxy, git or apt-get are OK. I can't figure out why
    cf blobs can't work



    在 2012年9月12日星期三UTC+8下午2时59分54秒,Haipeng Wu写道:
    Hi,

    You have to run dev_setup before you start cloud foundry, dev_setup not
    only downloads files, but also does configurations.

    From you previous emails, your main problem is the network issue, which
    make you can't download from cf blobs.
    To continue the dev_setup, you need to download all of the files by
    yourself and put them in the directory "/var/cache/dev_setup/".
    Dev_setup script will not download if it could find those files in that
    directory.

    Also, you need to take a look at the source code in dev_setup if you do so.

    haipeng

    On Wed, Sep 12, 2012 at 1:41 PM, <yangzif...@gmail.com <javascript:>>wrote:
    Actually I used to run the latest dev_setup.
    But there is a problem which I used to raise a topic

    the information is like below:

    [2012-09-11T13:11:36+08:00] INFO: Processing
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb] action create
    (essentials::default line 22)


    ================================================================================
    Error executing action `create` on resource
    'deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]'

    ================================================================================

    RuntimeError
    ------------
    Checksum mismatch for cf_remote_file
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]

    Cookbook Trace:
    ---------------
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:49:in
    `action_create'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:24:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:21:in
    `download_blob'
    /root/cloudfoundry/vcap/dev_setup/cookbooks/deployment/providers/remote_file.rb:38:in
    `action_create'

    Resource Declaration:
    ---------------------
    # In
    /root/cloudfoundry/vcap/dev_setup/cookbooks/essentials/recipes/default.rb

    21: libpq_deb_path = File.join(node[:deployment][:setup_cache],
    "libpq5_9.2.deb")
    22: cf_remote_file libpq_deb_path do
    23: owner node[:deployment][:user]
    24: id node[:postgresql][:id][:libpq]["#{machine}"]
    25: checksum node[:postgresql][:checksum][:libpq]["#{machine}"]
    26: end
    27:

    Compiled Resource:
    ------------------
    # Declared in
    /root/cloudfoundry/vcap/dev_setup/cookbooks/essentials/recipes/default.rb:22:in
    `from_file'

    deployment_remote_file("/var/cache/dev_setup/libpq5_9.2.deb") do
    id
    "eyJzaWciOiI2Q21GcmhocWpPaTFocEFhMlp2TFpZVlFOMGM9Iiwib2lkIjoi%0ANGU0ZTc4YmNhNTFlMTIyMDA0ZTRlOGVjNjg0MDc3MDUwMmU4NDc0MzFmMDIi%0AfQ==%0A"
    checksum
    "b6a7fe7634c41717757481713b24b0c0d9eeb5937875daea7aba17c7750e3f9e"
    recipe_name "default"
    path #<Pathname:/var/cache/dev_setup/libpq5_9.2.deb>
    retry_delay 2
    owner "root"
    cookbook_name :essentials
    retries 0
    action :create
    end

    [2012-09-11T13:12:02+08:00] ERROR: Running exception handlers
    [2012-09-11T13:12:02+08:00] ERROR: Exception handlers complete
    [2012-09-11T13:12:02+08:00] FATAL: Stacktrace dumped to
    /var/chef/cache/chef-stacktrace.out
    [2012-09-11T13:12:02+08:00] FATAL: RuntimeError:
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]
    (essentials::default line 22) had an error: RuntimeError: Checksum mismatch
    for cf_remote_file
    deployment_remote_file[/var/cache/dev_setup/libpq5_9.2.deb]

    在 2012年9月12日星期三UTC+8下午1时33分20秒,Anfernee Gui写道:
    That is the wrong config file, which is very out-of-date.
    Please run the following command to start nginx

    $ /etc/init.d/nginx_router restart

    If you don't have that script, please run the latest dev_setup again.
    On Wed, Sep 12, 2012 at 1:10 PM, wrote:
    Hi Anfernee:
    Now I run the nginx.
    netstat -lnp|grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
    27125/nginx: master

    The error information changed like below:
    vmc target api.vcap.me
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y
    Error (JSON 404): VCAP ROUTER: 404 - DESTINATION ...

    the vcap.access.log information is :
    api.vcap.me - [12/Sep/2012:05:48:50 -0700] "GET /info HTTP/1.1" 404 311 "-"
    "Ruby" 127.0.0.1 response_time:0.020

    My Nginx.conf is like below, and I see the file /tmp/router.sock
    user www-data;
    worker_processes 1;

    error_log /var/log/nginx/error.log;
    pid /var/run/nginx.pid;

    events {
    worker_connections 2048;
    use epoll;
    # multi_accept on;
    }

    http {
    include /etc/nginx/mime.types;
    access_log /var/log/nginx/access.log;

    log_format main '$host - [$time_local] '
    '"$request" $status $bytes_sent '
    '"$http_referer" "$http_user_agent" '
    '$remote_addr response_time:$upstream_**response_time';
    default_type text/html;

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;

    keepalive_timeout 75 20;

    gzip on;
    gzip_min_length 1250;
    gzip_buffers 16 8k;
    gzip_comp_level 2;
    gzip_proxied any;
    gzip_types text/plain text/css application/javascript
    application/x-javascript text/xml application/xml application/xml+rss
    text/javascript;
    gzip_vary on;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    client_max_body_size 256M;

    upstream vcap_router {
    server unix:/tmp/router.sock;
    }
    server {
    listen *:80;
    server_name _;

    access_log /var/vcap/sys/log/vcap.access.**log main;
    server_name_in_redirect off;

    location / {
    proxy_buffering off;
    proxy_set_header Host $host;
    proxy_set_header X-Real_IP
    $remote_addr;
    proxy_set_header X-Forwarded_For
    $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded_Proto http;
    proxy_redirect off;
    proxy_connect_timeout 10;
    proxy_send_timeout 30;
    proxy_read_timeout 30;
    proxy_pass http://vcap_router;
    }
    }
    }



    在 2012年9月12日星期三UTC+8上午11时36分35秒,**Anfernee Gui写道:
    apache2 hijacked the http request.
    stop it. and do

    $ service nginx_router start

    instead.

    On Wed, Sep 12, 2012 at 11:32 AM, wrote:
    the out put is
    netstat -lnp | grep :80
    tcp 0 0 0.0.0.0:80 0.0.0.0:*
    LISTEN
    3312/apache2

    在 2012年9月12日星期三UTC+8上午11时30分52秒,**Anfernee Gui写道:
    Just do:
    $ sudo netstat -lnp | grep :80
    On Wed, Sep 12, 2012 at 11:26 AM, wrote:
    can you tell me how to check this?

    在 2012年9月12日星期三UTC+8上午11时22分42秒,**Anfernee Gui写道:
    Can you check if nginx is listening on port 80?

    On Wed, Sep 12, 2012 at 11:20 AM, <yangzif...@gmail.com>
    wrote:
    what's wrong with this?
    By the way, I run vmc on the cloud foundry sever, not from
    other
    mechine.

    在 2012年9月12日星期三UTC+8上午11时12分45秒,**Anfernee Gui写道:
    Keyword found in the response ..
    {:via=>"1.1 192.168.107.28 (McAfee Web Gateway
    7.2.0.1.0.13253)"
    On Wed, Sep 12, 2012 at 10:32 AM, <yangzif...@gmail.com>
    wrote:
    Hi All
    I find the run log:)
    The problem is solved by removing a check staging
    script.
    Although
    I
    don't know what could be impact.
    Anyway , cloud foundry is running now.
    ./vcap status
    router : RUNNING
    cloud_controller : RUNNING
    dea : RUNNING
    health_manager : RUNNING

    But another issue raised:
    I can't vmc target api.vcap.me
    The Error Message is :
    Host is not valid: 'http://api.vcap.me'
    Would you like see the response [yN]? y

    <<<
    [502, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
    Transitional//EN\"




    \"http://www.w3.org/TR/xhtml1/**
    DTD/xhtml1-transitional.dtd\<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd%5C>
    ">**\n<html>\n<!--
    FileName: index.html\n Language:
    [en]\n-->\n<!--Head-->\n<head>**\n
    <meta
    http-equiv=\"X-UA-Compatible\" content=\"IE=7\" />\n<style
    type=\"text/css\">\n<!--\ntd
    {\n\t\xE3\x80\x80color:#**666666;font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    \n}\nbody
    {\n\tbackground-color: #999999;\n}\n.STYLE1 {color:
    #666666}\n.style8
    {\tFONT-WEIGHT: bold\n}\n.style9 {color:
    #555555}\n\n-->\n</style>\n\n
    <meta content=\"text/html; charset=UTF-8\"
    http-equiv=\"Content-Type\">\n




    <title>\xE4\xB8\x9C\xE8\xBD\**xAFInternet\xE8\xAE\xBF\xE9\
    **x97\xAE\xE7\xAE\xA1\xE7\x90\**x86\xE9\xA1\xB5</title>\n
    <script
    src=\"/mwg-internal/**de5fs23hu73ds/files/**javascript/sw.js\"
    type=\"text/javascript\" ></script>\n <link
    rel=\"stylesheet\"
    href=\"/mwg-internal/**de5fs23hu73ds/files/default/**stylesheet.css\"
    />\n</head>\n<!--/Head-->\n<!-**-Body-->\n<body
    onload=\"swOnLoad();\">\n
    <table class='bodyTable' bgcolor=\"#FFFFFF\">\n
    <tr>\n
    <td
    class='bodyData' background=' '>\n<!--Logo-->\n<table
    class='logoTable'>\n
    <tr>\n <td class='logoData ' align=right>\n
    <img
    src='/mwg-internal/**de5fs23hu73ds/files/default/**img/logo.jpg
    '>\n
    </td>\n
    </tr>\n</table>\n<!--/Logo-->\**n<!--Contents-->\n<!--
    FileName:
    cannotconnect.html\n Language:
    [en]\n-->\n<!--Title-->\n<**table
    class='titleTable'




    background='/mwg-internal/**de5fs23hu73ds/files/default/**img/bg_navbar.jpg'>\n
    <tr>\n <td class='titleData'>\n




    \xE6\x9C\x8D\xE5\x8A\xA1\xE5\**
    x99\xA8\xE6\xB2\xA1\xE6\x9C\**x89\xE5\x93\x8D\xE5\xBA\x94\n
    </td>\n
    </tr>\n</table>\n<!--/Title-->**\n\n<!--Content-->\n<table
    class=\"contentTable\">\n <tr>\n <td
    class=\"policytData\">\n




    \xE6\x82\xA8\xE6\x8C\x87\xE5\**
    xAE\x9A\xE7\x9A\x84\xE7\xBD\**x91\xE9\xA1\xB5\xE6\x97\xA0\**
    xE6\xB3\x95\xE8\xAE\xBF\xE9\**x97\xAE\xE3\x80\x82\xE8\xAF\**
    xA5\xE9\x97\xAE\xE9\xA2\x98\**xE5\x8F\xAF\xE8\x83\xBD\xE6\**
    x98\xAF\xE7\x94\xB1\xE4\xBA\**x8E\xE6\x82\xA8\xE8\xAE\xBF\**
    xE9\x97\xAE\xE7\x9A\x84\xE6\**x9C\x8D\xE5\x8A\xA1\xE5\x99\**
    xA8\xE9\x83\xA8\xE7\xBD\xB2\**xE5\x9C\xA8\xE6\xB5\xB7\xE5\**
    xA4\x96\xEF\xBC\x8C\xE7\x94\**xB1\xE4\xBA\x8E\xE4\xB8\x80\**
    xE4\xBA\x9B\xE4\xB8\xB4\xE6\**x97\xB6\xE7\x9A\x84\xE7\xBD\**
    x91\xE7\xBB\x9C\xE9\x97\xAE\**xE9\xA2\x98\xE8\x80\x8C\xE5\**
    xAF\xBC\xE8\x87\xB4\xE7\x9A\**x84\xE3\x80\x82\xE8\xBF\x99\**
    xE7\xB1\xBB\xE9\x97\xAE\xE9\**xA2\x98\xE5\xB8\xB8\xE5\x87\**
    xBA\xE7\x8E\xB0\xE4\xBA\x8E\**xE6\x82\xA8\xE4\xBD\xBF\xE7\**
    x94\xA8Google\xE8\xBF\x9B\xE8\**xA1\x8C\xE4\xBF\xA1\xE6\x81\**
    xAF\xE6\x90\x9C\xE7\xB4\xA2\**xE6\x97\xB6\xE3\x80\x82\n
    </td>\n
    </tr>\n</table>\n<!--/Content-**->\n\n<!--Info-->\n<table
    class=\"infoTable\">\n <tr>\n <td
    class=\"infoData\">\n
    <b>URL:
    </b>http://api.vcap.me/info<br />\n </td>\n



    </tr>\n</table>\n<!--/Info-->\**n\n<!--/Contents-->\n<!--*
    *Policy-->\n<table
    class='policyTable'>\n <tr>\n <td
    class='policyHeading'>\n
    <hr>\n




    \xE4\xB8\x9C\xE8\xBD\**xAFInternet\xE8\xAE\xBF\xE9\**
    x97\xAE\xE7\xAE\xA1\xE7\x90\**x86\xE5\x8A\x9E\xE6\xB3\x95\n
    </td>\n </tr>\n <tr>\n <td class='policyData'>\n1.




    \xE5\xBC\x80\xE6\x94\xBE\xE4\**
    xBF\xA1\xE6\x81\xAF\xE7\xA7\**x91\xE6\x8A\x80\xE3\x80\x81\**
    xE5\x95\x86\xE4\xB8\x9A\xE4\**xB8\x8E\xE7\xBB\x8F\xE6\xB5\**
    x8E\xE3\x80\x81\xE6\x96\xB0\**xE9\x97\xBB\xE4\xB8\x8E\xE5\**
    xAA\x92\xE4\xBD\x93\xE3\x80\**x81\xE6\x90\x9C\xE7\xB4\xA2\**
    xE5\xBC\x95\xE6\x93\x8E\xE4\**xB8\x8E\xE9\x97\xA8\xE6\x88\**
    xB7\xE3\x80\x81\xE6\x94\xBF\**xE5\xBA\x9C\xE3\x80\x81\xE6\**
    x95\x99\xE8\x82\xB2\xE3\x80\**x81\xE5\x81\xA5\xE5\xBA\xB7\**
    xE3\x80\x81\xE4\xBA\xA4\xE9\**x80\x9A\xE7\xAD\x89\xE7\xB1\**xBB\xE5\x88\xAB\xEF\xBC\x9B\n
    </td>\n <tr>\n <td class='policyData'>\n2.




    \xE7\xA6\x81\xE6\xAD\xA2\xE8\**
    xB5\x8C\xE5\x8D\x9A\xE3\x80\**x81\xE6\x88\x90\xE4\xBA\xBA\**
    xE3\x80\x81\xE5\xBA\xB8\xE4\**xBF\x97\xE3\x80\x81\xE6\x9A\**
    xB4\xE5\x8A\x9B\xE3\x80\x81\**xE7\xBD\x91\xE7\xBB\x9C\xE8\**
    x81\x8A\xE5\xA4\xA9\xE3\x80\**x81\xE9\x87\x91\xE8\x9E\x8D\**
    xE4\xBF\xA1\xE6\x81\xAF\xE4\**xB8\x8E\xE6\x9C\x8D\xE5\x8A\**
    xA1\xE3\x80\x81\xE5\xAE\x97\**xE6\x95\x99\xE3\x80\x81\xE6\**
    xB1\x82\xE8\x81\x8C\xE3\x80\**x81\xE5\xA8\xB1\xE4\xB9\x90\**
    xE3\x80\x81\xE6\x97\xB6\xE5\**xB0\x9A\xE4\xB8\x8E\xE7\x94\**
    x9F\xE6\xB4\xBB\xE3\x80\x81\**xE6\xB5\x81\xE5\xAA\x92\xE4\**
    xBD\x93\xE3\x80\x81Webmail\**xE3\x80\x81Blog\xE7\xAD\x89\**
    xE7\xB1\xBB\xE5\x88\xAB\xEF\**xBC\x9B\xE7\xA6\x81\xE6\xAD\**
    xA2\xE9\x80\x9A\xE8\xBF\x87\**xE4\xBB\xA3\xE7\x90\x86\xE8\**
    xAE\xBF\xE9\x97\xAE\xE5\x85\**xAC\xE5\x8F\xB8\xE5\x86\x85\**
    xE7\xBD\x91\xE8\xB5\x84\xE6\**xBA\x90\xEF\xBC\x9B
    \n\n </td>\n</tr>\n<tr>\n <td class='policyData'>\n3.




    \xE4\xB8\xBA\xE6\xBB\xA1\xE8\**
    xB6\xB3\xE5\x91\x98\xE5\xB7\**xA5\xE7\x89\xB9\xE6\xAE\x8A\**
    xE9\x9C\x80\xE6\xB1\x82\xEF\**xBC\x8C\xE5\x85\xAC\xE5\x8F\**
    xB8\xE6\x8F\x90\xE4\xBE\x9B\**xE7\xBD\x91\xE7\xAB\x99\xE5\**
    xBC\x80\xE9\x80\x9A\xE7\x9A\**x84\xE6\xB5\x81\xE7\xA8\x8B\**
    xEF\xBC\x8C\xE5\x85\xB7\xE4\**xBD\x93\xE8\xAF\xB7\xE5\x8F\**
    x82\xE8\xA7\x81web.neusoft.**com->\xE6\x9C\x8D\xE5\x8A\xA1\**
    xE5\xB9\xB3\xE5\x8F\xB0->IT\**xE6\x9C\x8D\xE5\x8A\xA1\xE7\**xAE\xA1\xE7\x90\x86



    \xE5\x8F\x91\xE5\xB8\x83\xE7\**
    x9A\x84\xE6\xB5\x81\xE7\xA8\**x8B\xE5\x92\x8C\xE8\xA1\xA8\**xE6\xA0\xBC\xE3\x80\x82\n
    </td>\n</tr>\n
    </tr>\n</table>\n<!--/Policy--**>\n<!--Foot-->\n<table
    class='footTable'>\n <tr>\n <td class='policyData'
    \n



    \xE4\xBF\xA1\xE6\x81\xAF\xE8\**
    xA7\x84\xE5\x88\x92\xE4\xB8\**x8E\xE7\xAE\xA1\xE7\x90\x86\**
    xE9\x83\xA8\xEF\xBC\x8C\xE6\**xB2\x88\xE9\x98\xB3\xE5\x9B\**
    xAD\xE5\x8C\xBAA2\xE6\xA5\**xBC231\xE6\x88\xBF\xE9\x97\xB4
    \xE9\x82\xAE\xE4\xBB\xB6\xEF\**xBC\x9A...@neusoft.com\n
    </td>\n
    </tr>\n
    <tr>\n <td class='policyData' >\n




    \xE7\x94\xB5\xE8\xAF\x9D\xEF\**xBC\x9A+86-24-83665512\xE3\
    **x80\x80\xE3\x80\x80\xE4\xBC\**xA0\xE7\x9C\x9F\xEF\xBC\x9A+**86-24-83669548
    \n </td>\n </tr>\n <tr>\n <td
    align=\"right\"><font
    color=\"#0088cc\" style=\"font-size:12px\"><u>\n <form
    target=\"_top\"
    \n
    <input type=\"button\"
    onClick=\"javascript:parent.**window.close();\"




    value=\"\xE5\x85\xB3\xE9\x97\**
    xAD\xE9\xA1\xB5\xE9\x9D\xA2\">**\n\t\t\t</form>\n\n</u></font>**</td>\n
    </tr>\n</table>\n<!--/Foot-->\**n </td>\n </tr>\n
    </table>\n</body>\n<!--/Body--**>\n</html>\n",
    {:via=>"1.1
    192.168.107.28
    (McAfee Web Gateway 7.2.0.1.0.13253)",
    :content_type=>"text/html",
    :cache_control=>"no-cache", :content_length=>"3460",
    :proxy_connection=>"Keep-**Alive"}]
    I see the router log, It seems OK
    [2012-09-12 03:06:16.695290] router - pid=30259
    tid=abb1
    fid=a955
    INFO -- Starting VCAP Router (0.98)
    [2012-09-12 03:06:16.695652] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on: 0.0.0.0:2222
    [2012-09-12 03:06:16.695718] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Listening on unix domain socket: '/tmp/router.sock'
    [2012-09-12 03:06:16.695770] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Socket Limit:32768
    [2012-09-12 03:06:16.695804] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Pid file: /var/vcap/sys/run/router.pid
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on 0.0.0.0:2222, CTRL+C to stop
    Thin web server (v1.3.1 codename Triple Espresso)
    Maximum connections set to 1024
    Listening on /tmp/router.sock, CTRL+C to stop
    [2012-09-12 03:06:22.908999] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    Registering api.vcap.me at 127.0.0.1:9022
    [2012-09-12 03:06:22.909199] router - pid=30259 tid=abb1
    fid=a955
    INFO
    --
    1 servers available for api.vcap.me


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee


    --
    Cheers,
    Anfernee

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupvcap-dev @
postedSep 12, '12 at 1:03a
activeSep 13, '12 at 8:35a
posts20
users3

People

Translate

site design / logo © 2021 Grokbase