PUSHING_SAMPLE_JAVA_APP

464 views
Skip to first unread message

Parthiban Annadurai

unread,
Apr 20, 2015, 1:47:23 AM4/20/15
to vcap...@cloudfoundry.org
Hi All,
          After so many hurdles, I had successfully deployed CF on vSphere with all your kind help. Now, am facing some issue when try to push some sample JAVA Application. CF PUSH throws the following,

cf push HelloWorld -p ./HelloWorld.war
Using manifest file /root/HelloWorld/manifest.yml

Updating app HelloWorld in org pivotal / space FIEDEL as admin...
OK

Uploading HelloWorld...
Uploading app files from: ./HelloWorld.war
Uploading 570, 3 files
Done uploading
OK

Stopping app HelloWorld in org pivotal / space FIEDEL as admin...
OK

Warning: error tailing logs
Unauthorized error: You are not authorized. Error: Invalid authorization
Starting app HelloWorld in org pivotal / space FIEDEL as admin...

FAILED
Server error, status code: 400, error code: 170003, message: An app was not successfully detected by any available buildpack

TIP: use 'cf logs HelloWorld --recent' for more information


Could anyone on this issue??

Any Help is Greatly Appreciated..

Thanks in Well Advance..

Johannes Hiemer

unread,
Apr 20, 2015, 2:20:46 AM4/20/15
to vcap...@cloudfoundry.org
Could you provide your manifest?

Parthiban Annadurai

unread,
Apr 20, 2015, 2:32:42 AM4/20/15
to vcap...@cloudfoundry.org
FYI,

---
applications:
- name: HelloWorld
  memory: 512M
  instances: 1
  url: api.192.168.33.54.xip.io
  path: ./HelloWorld.war


Thanks..

--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/eb13807a-7a76-4b6e-a061-f33dee0a77dd%40cloudfoundry.org.

To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.

Johannes Hiemer

unread,
Apr 20, 2015, 2:34:33 AM4/20/15
to vcap...@cloudfoundry.org
Please add:

host: helloworld

and run it again.

Parthiban Annadurai

unread,
Apr 20, 2015, 2:43:25 AM4/20/15
to vcap...@cloudfoundry.org
Johannes, now after modification, it throws the following,


cf push HelloWorld -p ./HelloWorld.war
Using manifest file /root/HelloWorld/manifest.yml

Updating app HelloWorld in org pivotal / space FIEDEL as admin...
OK

Creating route helloworld4.192.168.33.54.xip.io...
OK

Binding helloworld4.192.168.33.54.xip.io to HelloWorld...

OK

Uploading HelloWorld...
Uploading app files from: ./HelloWorld.war
Uploading 570, 3 files
Done uploading
OK

Stopping app HelloWorld in org pivotal / space FIEDEL as admin...
OK

Warning: error tailing logs
Unauthorized error: You are not authorized. Error: Invalid authorization
Starting app HelloWorld in org pivotal / space FIEDEL as admin...

FAILED
Server error, status code: 400, error code: 170004, message: App staging failed in the buildpack compile phase


TIP: use 'cf logs HelloWorld --recent' for more information

Thanks in Well Advance..


Johannes Hiemer

unread,
Apr 20, 2015, 2:47:02 AM4/20/15
to vcap...@cloudfoundry.org
Run: cf logs HelloWorld --recent

Parthiban Annadurai

unread,
Apr 20, 2015, 2:51:08 AM4/20/15
to vcap...@cloudfoundry.org
Johannes, FYI,

cf logs HelloWorld --recent
Connected, dumping recent logs for app HelloWorld in org pivotal / space FIEDEL as admin...

FAILED

Unauthorized error: You are not authorized. Error: Invalid authorization

Confusing error about authentication.. But, I have given the exact credentials only..
Thanks..

Johannes Hiemer

unread,
Apr 20, 2015, 2:52:59 AM4/20/15
to vcap...@cloudfoundry.org
Did you log in? And if, with which credentials?

Parthiban Annadurai

unread,
Apr 20, 2015, 2:54:16 AM4/20/15
to vcap...@cloudfoundry.org
Johannes, following shows about the login steps,

cf api
API endpoint: https://api.192.168.33.54.xip.io (API version: 2.22.0)
[root@ie1aul0414 HelloWorld]# cf login
API endpoint: https://api.192.168.33.54.xip.io

Email> admin

Password>
Authenticating...
OK

Targeted org pivotal

Targeted space FIEDEL



API endpoint:   https://api.192.168.33.54.xip.io (API version: 2.22.0)
User:           admin
Org:            pivotal
Space:          FIEDEL

This is what the steps i followed to login..

Thanks..

narendra

unread,
Apr 20, 2015, 2:57:16 AM4/20/15
to vcap...@cloudfoundry.org
Hi ,

Please check with your user credentials being given to the space to upload the application.
 

Johannes Hiemer

unread,
Apr 20, 2015, 2:57:40 AM4/20/15
to vcap...@cloudfoundry.org
Execute the cf push with CF_TRACE=true in front.

Parthiban Annadurai

unread,
Apr 20, 2015, 3:05:39 AM4/20/15
to vcap...@cloudfoundry.org
@Narendra.. What is that space credentials?? I have set the api and logged in successfully also with my credentials.. Or How to know the SPACE Credentials??

Thanks..

Parthiban Annadurai

unread,
Apr 20, 2015, 3:06:56 AM4/20/15
to vcap...@cloudfoundry.org
@Johannes, FYI,

    "updated_at": "2015-04-20T07:18:50Z"
  },
  "entity": {
    "name": "HelloWorld",
    "production": false,
    "space_guid": "a1aef548-4b79-4ccd-9125-2282736e4fb5",
    "stack_guid": "c2d4dd6c-4ea4-4c43-8833-5bb731d6a34d",
    "buildpack": "https://github.com/cloudfoundry/java-buildpack.git",
    "detected_buildpack": null,
    "environment_json": {
      "JBP_LOG_LEVEL": "debug"
    },
    "memory": 512,
    "instances": 1,
    "disk_quota": 1024,
    "state": "STARTED",
    "version": "876a06c6-0582-41ce-816c-f42cdc9046de",
    "command": null,
    "console": false,
    "debug": null,
    "staging_task_id": "1e7b84d9ab1a45e38f8024aa651735ad",
    "package_state": "PENDING",
    "health_check_type": "port",
    "health_check_timeout": null,
    "staging_failed_reason": null,
    "diego": false,
    "docker_image": null,
    "package_updated_at": "2015-04-20T07:18:46Z",
    "detected_start_command": "",
    "space_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5",
    "space": {
      "metadata": {
        "guid": "a1aef548-4b79-4ccd-9125-2282736e4fb5",
        "url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5",
        "created_at": "2015-04-16T06:42:04Z",
        "updated_at": null
      },
      "entity": {
        "name": "FIEDEL",
        "organization_guid": "a56433c4-4b22-45e7-88a8-a5c1cf688185",
        "space_quota_definition_guid": null,
        "organization_url": "/v2/organizations/a56433c4-4b22-45e7-88a8-a5c1cf688185",
        "developers_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5/developers",
        "managers_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5/managers",
        "auditors_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5/auditors",
        "apps_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5/apps",
        "routes_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5/routes",
        "domains_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5/domains",
        "service_instances_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5/service_instances",
        "app_events_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5/app_events",
        "events_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5/events",
        "security_groups_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5/security_groups"
      }
    },
    "stack_url": "/v2/stacks/c2d4dd6c-4ea4-4c43-8833-5bb731d6a34d",
    "stack": {
      "metadata": {
        "guid": "c2d4dd6c-4ea4-4c43-8833-5bb731d6a34d",
        "url": "/v2/stacks/c2d4dd6c-4ea4-4c43-8833-5bb731d6a34d",
        "created_at": "2015-04-15T15:21:30Z",
        "updated_at": null
      },
      "entity": {
        "name": "lucid64",
        "description": "Ubuntu 10.04 on x86-64"
      }
    },
    "events_url": "/v2/apps/92472403-cbb5-4c8c-b9e8-569f5c6d8091/events",
    "service_bindings_url": "/v2/apps/92472403-cbb5-4c8c-b9e8-569f5c6d8091/service_bindings",
    "service_bindings": [

    ],
    "routes_url": "/v2/apps/92472403-cbb5-4c8c-b9e8-569f5c6d8091/routes",
    "routes": [
      {
        "metadata": {
          "guid": "609bf930-d94d-4df1-8d7c-3fdd823c822f",
          "url": "/v2/routes/609bf930-d94d-4df1-8d7c-3fdd823c822f",
          "created_at": "2015-04-17T04:14:16Z",
          "updated_at": null
        },
        "entity": {
          "host": "HelloWorld-wheelless-liturgism",
          "domain_guid": "9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_guid": "a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "domain_url": "/v2/domains/9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "apps_url": "/v2/routes/609bf930-d94d-4df1-8d7c-3fdd823c822f/apps"
        }
      },
      {
        "metadata": {
          "guid": "73a079ec-c36d-4d89-b32e-f8de851a1b2e",
          "url": "/v2/routes/73a079ec-c36d-4d89-b32e-f8de851a1b2e",
          "created_at": "2015-04-17T04:23:46Z",
          "updated_at": null
        },
        "entity": {
          "host": "HelloWorld-nontenable-tippet",
          "domain_guid": "9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_guid": "a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "domain_url": "/v2/domains/9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "apps_url": "/v2/routes/73a079ec-c36d-4d89-b32e-f8de851a1b2e/apps"
        }
      },
      {
        "metadata": {
          "guid": "7c0fa0a6-feeb-413f-af41-cdd948ea672e",
          "url": "/v2/routes/7c0fa0a6-feeb-413f-af41-cdd948ea672e",
          "created_at": "2015-04-17T04:41:02Z",
          "updated_at": null
        },
        "entity": {
          "host": "HelloWorld-subsatirical-dbl",
          "domain_guid": "9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_guid": "a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "domain_url": "/v2/domains/9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "apps_url": "/v2/routes/7c0fa0a6-feeb-413f-af41-cdd948ea672e/apps"
        }
      },
      {
        "metadata": {
          "guid": "8d5130bb-fc5c-4d12-a3f3-ba0c6724c8c3",
          "url": "/v2/routes/8d5130bb-fc5c-4d12-a3f3-ba0c6724c8c3",
          "created_at": "2015-04-17T05:09:17Z",
          "updated_at": null
        },
        "entity": {
          "host": "HelloWorld-unstaunchable-commensurability",
          "domain_guid": "9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_guid": "a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "domain_url": "/v2/domains/9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "apps_url": "/v2/routes/8d5130bb-fc5c-4d12-a3f3-ba0c6724c8c3/apps"
        }
      },
      {
        "metadata": {
          "guid": "ed513e42-1149-4572-a203-800c42ff522d",
          "url": "/v2/routes/ed513e42-1149-4572-a203-800c42ff522d",
          "created_at": "2015-04-17T06:26:23Z",
          "updated_at": null
        },
        "entity": {
          "host": "HelloWorld",
          "domain_guid": "9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_guid": "a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "domain_url": "/v2/domains/9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "apps_url": "/v2/routes/ed513e42-1149-4572-a203-800c42ff522d/apps"
        }
      },
      {
        "metadata": {
          "guid": "51037c9e-f9a3-49cc-8ac9-823d5d80c9a4",
          "url": "/v2/routes/51037c9e-f9a3-49cc-8ac9-823d5d80c9a4",
          "created_at": "2015-04-17T07:15:22Z",
          "updated_at": null
        },
        "entity": {
          "host": "cloudfoundry",
          "domain_guid": "9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_guid": "a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "domain_url": "/v2/domains/9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "apps_url": "/v2/routes/51037c9e-f9a3-49cc-8ac9-823d5d80c9a4/apps"
        }
      },
      {
        "metadata": {
          "guid": "abc89a66-aece-4032-9a65-c3313d52925a",
          "url": "/v2/routes/abc89a66-aece-4032-9a65-c3313d52925a",
          "created_at": "2015-04-20T06:54:46Z",
          "updated_at": null
        },
        "entity": {
          "host": "helloworld4",
          "domain_guid": "9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_guid": "a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "domain_url": "/v2/domains/9367cf88-2fab-48ab-9110-7a4f4ae9587d",
          "space_url": "/v2/spaces/a1aef548-4b79-4ccd-9125-2282736e4fb5",
          "apps_url": "/v2/routes/abc89a66-aece-4032-9a65-c3313d52925a/apps"
        }
      }
    ]
  }
}

REQUEST: [2015-04-20T07:18:07Z]
GET /v2/apps/92472403-cbb5-4c8c-b9e8-569f5c6d8091/instances HTTP/1.1
Host: api.192.168.33.54.xip.io
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: go-cli 6.10.0-b78bf10 / linux



RESPONSE: [2015-04-20T07:18:07Z]
HTTP/1.1 400 Bad Request
Content-Length: 102
Content-Type: application/json;charset=utf-8
Date: Mon, 20 Apr 2015 07:20:28 GMT
Server: nginx
X-Cf-Requestid: 31692138-6352-4f1b-437e-df84bb1b0336
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: 0bd9b04e-f79f-418f-6fd7-dc74e9fccfb2::e23102cd-43f1-4607-9a7e-4444ffb9dc8f

{
  "code": 170002,
  "description": "App has not finished staging",
  "error_code": "CF-NotStaged"
}


REQUEST: [2015-04-20T07:18:12Z]
GET /v2/apps/92472403-cbb5-4c8c-b9e8-569f5c6d8091/instances HTTP/1.1
Host: api.192.168.33.54.xip.io
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: go-cli 6.10.0-b78bf10 / linux



RESPONSE: [2015-04-20T07:18:12Z]
HTTP/1.1 400 Bad Request
Content-Length: 136
Content-Type: application/json;charset=utf-8
Date: Mon, 20 Apr 2015 06:37:08 GMT
Server: nginx
X-Cf-Requestid: a05cbdd4-deb5-44ec-73b4-0cbfd5c3bd09
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: 48e22e5f-413b-4b52-66aa-c76be2e0126a::56576e08-1718-4f86-8aab-de90b6495aab

{
  "code": 170004,
  "description": "App staging failed in the buildpack compile phase",
  "error_code": "CF-BuildpackCompileFailed"

}


FAILED
Server error, status code: 400, error code: 170004, message: App staging failed in the buildpack compile phase

TIP: use 'cf logs HelloWorld --recent' for more information
FAILED
Server error, status code: 400, error code: 170004, message: App staging failed in the buildpack compile phase

TIP: use 'cf logs HelloWorld --recent' for more information

Thanks..

Johannes Hiemer

unread,
Apr 20, 2015, 3:11:25 AM4/20/15
to vcap...@cloudfoundry.org
Hm,

and cf logs HelloWorld --recent still returns the authentication error? You already logged out and in again?

Parthiban Annadurai

unread,
Apr 20, 2015, 3:15:25 AM4/20/15
to vcap...@cloudfoundry.org
@Johannes, still logged in only..

Thanks..

Johannes Hiemer

unread,
Apr 20, 2015, 3:20:19 AM4/20/15
to vcap...@cloudfoundry.org
Parthiban I asked two questions:

"cf logs HelloWorld --recent still returns the authentication error?"

Parthiban Annadurai

unread,
Apr 20, 2015, 3:23:50 AM4/20/15
to vcap...@cloudfoundry.org
@Johannes.. Sorry for the confusion.. Yes, still it shows the authentication error only for cf logs HelloWorld --recent and am still logged in only..

Thanks..

Parthiban Annadurai

unread,
Apr 20, 2015, 3:24:57 AM4/20/15
to vcap...@cloudfoundry.org
@Johannes.. FYI,


cf logs HelloWorld --recent
Connected, dumping recent logs for app HelloWorld in org pivotal / space FIEDEL as admin...

FAILED
Unauthorized error: You are not authorized. Error: Invalid authorization

Thanks..
Message has been deleted

brian...@gmail.com

unread,
Apr 20, 2015, 4:02:48 AM4/20/15
to vcap...@cloudfoundry.org
You can check your space credentials by looking at your space or org with cf org-users and cf space-users.

I have found however this does not give proper output on my system.  Alternatively you can check this via the developer console / apps manager web interface, which is at console.192.168.33.54.xip.io from there you can check on your members to the org or space and see there roles. 


"admin" however should automatically have SpaceDeveloper role set in all created spaces, which should allow you to push apps.

Brian

Parthiban Annadurai

unread,
Apr 20, 2015, 4:38:50 AM4/20/15
to vcap...@cloudfoundry.org, brian...@gmail.com
@Brian.. Thanks for your reply.. In my case, cf org-users throws the following,

cf org-users pivotal -a
Getting users in org pivotal as admin...

USERS
FAILED
Failed fetching org-users for role USERS.
Server error, status code: 500, error code: 10001, message: An unknown error occurred.


and cf space-users throws the following,

cf space-users pivotal FIEDEL
Getting users in org pivotal / space FIEDEL as admin

SPACE MANAGER
FAILED
Failed fetching space-users for role SPACE MANAGER.
Server error, status code: 500, error code: 10001, message: An unknown error occurred.

Seriously, I dont know what wrong i did..

Could you please help on this issue??

FYI,

CF : 202(Version)
IaaS: vSphere

Thanks in Well Advance..

--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.

Parthiban Annadurai

unread,
Apr 20, 2015, 4:40:56 AM4/20/15
to vcap...@cloudfoundry.org, brian...@gmail.com
@Brain.. This is what the steps i followed after deploying the CF to login and push,


cf api
API endpoint: https://api.192.168.33.54.xip.io (API version: 2.22.0)
[root@ie1aul0414 HelloWorld]# cf login
API endpoint: https://api.192.168.33.54.xip.io

Email> admin

Password>
Authenticating...
OK

Targeted org pivotal

Targeted space FIEDEL



API endpoint:   https://api.192.168.33.54.xip.io (API version: 2.22.0)
User:           admin
Org:            pivotal
Space:          FIEDEL


cf push HelloWorld -p ./HelloWorld.war
Using manifest file /root/HelloWorld/manifest.yml

Updating app HelloWorld in org pivotal / space FIEDEL as admin...
OK

Using route helloworld4.192.168.33.54.xip.io

Uploading HelloWorld...
Uploading app files from: ./HelloWorld.war
Uploading 570, 3 files
Done uploading
OK

Stopping app HelloWorld in org pivotal / space FIEDEL as admin...
OK

Warning: error tailing logs
Unauthorized error: You are not authorized. Error: Invalid authorization
Starting app HelloWorld in org pivotal / space FIEDEL as admin...

FAILED
Server error, status code: 400, error code: 170004, message: App staging failed in the buildpack compile phase

TIP: use 'cf logs HelloWorld --recent' for more information


Thanks..

brian...@gmail.com

unread,
Apr 20, 2015, 4:42:03 AM4/20/15
to vcap...@cloudfoundry.org
I am assuming your using self-signed certificate for HAProxy.

When you did your original cf api and cf login commands did you add --skip-ssl-validation?  It is recommended to do this when using self-signed certificates.

Brian

Parthiban Annadurai

unread,
Apr 20, 2015, 4:45:51 AM4/20/15
to vcap...@cloudfoundry.org, brian...@gmail.com
@Brian.. I am using self-signed certificate only but after modification also its not working..

cf api https://api.192.168.33.54.xip.io --skip-ssl-validation
Setting api endpoint to https://api.192.168.33.54.xip.io...
OK



API endpoint:   https://api.192.168.33.54.xip.io (API version: 2.22.0)
User:           admin
Org:            pivotal
Space:          FIEDEL
[root@ie1aul0414 HelloWorld]# cf login --skip-ssl-validation

API endpoint: https://api.192.168.33.54.xip.io

Email> admin

Password>
Authenticating...
OK

Targeted org pivotal

Targeted space FIEDEL



API endpoint:   https://api.192.168.33.54.xip.io (API version: 2.22.0)
User:           admin
Org:            pivotal
Space:          FIEDEL
[root@ie1aul0414 HelloWorld]# cf push HelloWorld -p ./HelloWorld.war

Using manifest file /root/HelloWorld/manifest.yml

Updating app HelloWorld in org pivotal / space FIEDEL as admin...
OK


Uploading HelloWorld...
Uploading app files from: ./HelloWorld.war
Uploading 570, 3 files
Done uploading
OK

Stopping app HelloWorld in org pivotal / space FIEDEL as admin...
OK

Warning: error tailing logs
Unauthorized error: You are not authorized. Error: Invalid authorization
Starting app HelloWorld in org pivotal / space FIEDEL as admin...

FAILED
Server error, status code: 400, error code: 170004, message: App staging failed in the buildpack compile phase

TIP: use 'cf logs HelloWorld --recent' for more information

Thanks..

--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.

Brian Feeny

unread,
Apr 20, 2015, 1:16:21 PM4/20/15
to vcap...@cloudfoundry.org, brian...@gmail.com
I am not sure what is wrong.  But the fact that you can't use cf logs, cf org-users, cf-space users and that you get other permissions issues, tells me that some component of your installation is not able to talk to another.  I thought the culprit may be SSL, you mentioned you were using a self-signed cert, so I simply suggested you add --skip-ssl-validation to your api and login commands.  I wonder if you have a password or secret set wrong somewhere.

Parthiban Annadurai

unread,
Apr 20, 2015, 11:57:04 PM4/20/15
to vcap...@cloudfoundry.org, Brian Feeny
Thanks Brian for your valuable suggestions.. But, if the password wrong means how am able to login to the CF using CF LOGIN?? In login no problems am facing, while pushing application only am facing the issue..

Any Help is appreciated..

Regards

Parthiban A
 

On 20 April 2015 at 22:46, Brian Feeny <bfe...@mac.com> wrote:
I am not sure what is wrong.  But the fact that you can't use cf logs, cf org-users, cf-space users and that you get other permissions issues, tells me that some component of your installation is not able to talk to another.  I thought the culprit may be SSL, you mentioned you were using a self-signed cert, so I simply suggested you add --skip-ssl-validation to your api and login commands.  I wonder if you have a password or secret set wrong somewhere.

--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.

Johannes Hiemer

unread,
Apr 21, 2015, 1:15:43 AM4/21/15
to vcap...@cloudfoundry.org, brian...@gmail.com
Parthiban I think Brian is right. There is not only one password to log you in (this password for admin for example is used via login against uaa to authenticate you). In the backend of CF you have your cloud_controller coordinating the work against api and api_worker, which need also be authenticated during execution. So what you should do, is ssh in your cloud_controller and take a look at your looks. Afterwards we can continue debugging. What you can check as well is the fact if in your deployment.yml all your endpoints are prefixed with https.

Brian Feeny

unread,
Apr 21, 2015, 2:09:20 AM4/21/15
to vcap...@cloudfoundry.org, brian...@gmail.com
Parthiban shared his ~/.cf/config.json with me and I noticed his UAA endpoint was http not https.  I thought this was odd, because he said he set up self-signed certificates, which I would think that would mean SSL for the UAA.  

Originally his commands weren't using --skip-ssl-validation, and he had no errors.  If UAA was indeed using SSL it would likely have errored, forcing him to add --skip-ssl-validation.  

It may be best to start off using the same secret/password everywhere, and configure only what is required, no extra bells/whistles until you have a working deployment.

Brian

Johannes Hiemer

unread,
Apr 21, 2015, 2:10:32 AM4/21/15
to vcap...@cloudfoundry.org, brian...@gmail.com
Totally agree Brian.

Parthiban Annadurai

unread,
Apr 21, 2015, 2:42:11 AM4/21/15
to vcap...@cloudfoundry.org, Johannes Hiemer, Brian Feeny
@Johannes and @Brian.. Thanks a Lot for your replies.. Let me check my deployment again..

Regards

Parthiban A

--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.

Parthiban Annadurai

unread,
Apr 21, 2015, 4:45:04 AM4/21/15
to vcap...@cloudfoundry.org, Johannes Hiemer, Brian Feeny
@Brian and @Johannes.. Now I need to change all the password to same password on manifest,also the domain endpoint as https and again i need to do the fresh deployment right??

Or something else?? Since, this is the first time i have successfully deployed CF, so am very cautious about the re-deploy..

Thanks in Well Advance..

Johannes Hiemer

unread,
Apr 21, 2015, 4:53:36 AM4/21/15
to vcap...@cloudfoundry.org, jvhi...@gmail.com, brian...@gmail.com
Hi Parthiban,
this is correct. Just change the values and do a bosh deploy.

Be aware that you need to change the following settings as well:

ssl: skip_cert_verify: (( merge || true )) and no_ssl: false

Regards,
Johannes

Parthiban Annadurai

unread,
Apr 21, 2015, 4:56:12 AM4/21/15
to vcap...@cloudfoundry.org, Johannes Hiemer, Brian Feeny
Thanks Johannes for your instant clarifications. Let me try..

Regards

Parthiban A

Parthiban Annadurai

unread,
Apr 21, 2015, 5:58:52 AM4/21/15
to vcap...@cloudfoundry.org, Johannes Hiemer, Brian Feeny
After modifying the manifest and tried to deploy again, but it throws the following,

Director task 66
  Started preparing deployment
  Started preparing deployment > Binding deployment. Done (00:00:00)
  Started preparing deployment > Binding releases. Done (00:00:00)
  Started preparing deployment > Binding existing deployment. Done (00:00:01)
  Started preparing deployment > Binding resource pools. Done (00:00:00)
  Started preparing deployment > Binding stemcells. Done (00:00:00)
  Started preparing deployment > Binding templates. Done (00:00:00)
  Started preparing deployment > Binding properties. Done (00:00:00)
  Started preparing deployment > Binding unallocated VMs. Done (00:00:00)
  Started preparing deployment > Binding instance networks. Done (00:00:00)
     Done preparing deployment (00:00:01)

  Started preparing package compilation > Finding packages to compile. Done (00:00:00)

  Started preparing dns > Binding DNS. Done (00:00:00)

  Started preparing configuration > Binding configuration. Done (00:00:02)

  Started updating job uaa_z1 > uaa_z1/0 (canary). Done (00:01:42)
  Started updating job uaa_z2 > uaa_z2/0 (canary). Done (00:01:12)
  Started updating job api_z1 > api_z1/0 (canary). Failed: `api_z1/0' is not running after update (00:10:29)

Error 400007: `api_z1/0' is not running after update

Task 66 error

For a more detailed error report, run: bosh task 66 --debug


Previously for this issue, bosh cck will solve the problem but now its not able to solve..

Could anyone on this??

Thanks..

narendra

unread,
Apr 21, 2015, 6:22:14 AM4/21/15
to vcap...@cloudfoundry.org
Please check the logs of api_z1/0 or bosh debug task ....



Parthiban Annadurai

unread,
Apr 24, 2015, 8:23:09 AM4/24/15
to vcap...@cloudfoundry.org
Hi All,
          Seriously, i dont know whats the problem in pushing a sample Java App on to CF. It throws the following,

cf push HelloWorld -b https://github.com/cloudfoundry/java-buildpack.git -f /root/HelloWorld/manifest.yml -i 2 -k 128M -m 128M
Using manifest file /root/HelloWorld/manifest.yml

Updating app HelloWorld in org pivotal / space fiedel as admin...
OK

Using route helloworld.192.168.33.54.xip.io
Uploading HelloWorld...
Uploading app files from: /root/HelloWorld/HelloWorld.war
Uploading 1.1K, 4 files
Done uploading
OK

Stopping app HelloWorld in org pivotal / space fiedel as admin...
OK

Starting app HelloWorld in org pivotal / space fiedel as admin...
FAILED
Server error, status code: 400, error code: 170001, message: Staging error: no available stagers


Could anyone on this??

I have pushed a sample Ruby App, which is Up and Running..

Thanks..

Parthiban Annadurai

unread,
Apr 27, 2015, 1:57:35 AM4/27/15
to vcap...@cloudfoundry.org
Hi All,
         When am trying to push a sample Java HelloWorld App, it throws the following,

[root@ie1aul0414 HelloWorld]# cf push HelloWorld -b https://github.com/cloudfoundry/java-buildpack.git -k 512M
Using manifest file /root/HelloWorld/manifest.yml

Creating app HelloWorld in org pivotal / space fiedel as admin...
OK

Using route helloworld.192.168.33.54.xip.io
Binding helloworld.192.168.33.54.xip.io to HelloWorld...
OK


Uploading HelloWorld...
Uploading app files from: /root/HelloWorld/HelloWorld.war
Uploading 1.1K, 4 files
Done uploading
OK

Starting app HelloWorld in org pivotal / space fiedel as admin...

FAILED
Server error, status code: 400, error code: 170004, message: App staging failed in the buildpack compile phase

TIP: use 'cf logs HelloWorld --recent' for more information


[root@ie1aul0414 ~]# cf logs HelloWorld --recent
Connected, dumping recent logs for app HelloWorld in org pivotal / space fiedel as admin...

2015-04-27T05:11:18.71+0000 [API/0]      OUT Updated app with guid bbd5e4d2-469e-4c1b-a295-3ac240bc09d5 ({"state"=>"STARTED"})
2015-04-27T05:11:23.03+0000 [API/0]      ERR encountered error: App staging failed in the buildpack compile phase
2015-04-27T05:15:05.78+0000 [DEA/0]      OUT Got staging request for app with id bbd5e4d2-469e-4c1b-a295-3ac240bc09d5
2015-04-27T05:15:06.50+0000 [STG/0]      OUT -----> Downloaded app package (4.0K)
2015-04-27T05:15:06.57+0000 [STG/0]      ERR Cloning into '/tmp/buildpacks/java-buildpack'...
2015-04-27T05:15:10.63+0000 [STG/0]      OUT -----> Java Buildpack Version: 98e178c | https://github.com/cloudfoundry/java-buildpack.git#98e178c
2015-04-27T05:15:10.63+0000 [STG/0]      ERR [Buildpack]                      ERROR Compile failed with exception #<RuntimeError: No container can run this application>
2015-04-27T05:15:10.63+0000 [STG/0]      ERR No container can run this application
2015-04-27T05:15:10.64+0000 [STG/0]      OUT Staging failed: Buildpack compilation step failed
2015-04-27T05:59:00.03+0000 [API/0]      OUT Created app with guid bbd5e4d2-469e-4c1b-a295-3ac240bc09d5
2015-04-27T05:59:00.20+0000 [API/0]      OUT Updated app with guid bbd5e4d2-469e-4c1b-a295-3ac240bc09d5 ({"route"=>"e4014ac5-cffc-4b9b-9662-10c0bc36a4f7"})


Could anyone on this??

Thanks in Well Advance..

Pravin Mishra

unread,
Apr 27, 2015, 4:51:19 AM4/27/15
to vcap...@cloudfoundry.org
Hello,

Looks like issues with your Java buildpack and internet connectivities inside your Platform. 

 ERR Cloning into '/tmp/buildpacks/java-buildpack'...

Seems, you need offline Java build pack. Once, create and upload offline Java buildpack and deploy your application. I hope, it will fix your issues. 

Below are the command to compile and create offline buildpack

$ bundle install
$ bundle exec rake package OFFLINE=true

$ cf create-buildpack BUILDPACK PATH POSITION [--enable|--disable]

Note: Make sure to set position 1.  

Best Regards,
Pravin Mishra


Parthiban Annadurai

unread,
Apr 27, 2015, 9:32:01 AM4/27/15
to vcap...@cloudfoundry.org, pravinm...@gmail.com
Hi Pranav,
               Thanks for coming out to help. But, when i execute the command bundle exec rake package OFFLINE=true, it throws the following,

[root@ie1aul0414 java-buildpack]# bundle exec rake package OFFLINE=true
[DownloadCache]                  WARN  Unable to download /index.yml into cache build/staging/resources/cache: undefined method `request_uri' for #<URI::Generic /index.yml>
rake aborted!
Unable to find cached file for /index.yml
/root/bp/java-buildpack/lib/java_buildpack/util/cache/download_cache.rb:67:in `get'
/root/bp/java-buildpack/rakelib/dependency_cache_task.rb:162:in `get_from_cache'
/root/bp/java-buildpack/rakelib/dependency_cache_task.rb:154:in `block (2 levels) in uris'
/root/bp/java-buildpack/rakelib/dependency_cache_task.rb:151:in `each'
/root/bp/java-buildpack/rakelib/dependency_cache_task.rb:151:in `block in uris'
/root/bp/java-buildpack/rakelib/dependency_cache_task.rb:150:in `each'
/root/bp/java-buildpack/rakelib/dependency_cache_task.rb:150:in `uris'
/root/bp/java-buildpack/rakelib/dependency_cache_task.rb:43:in `initialize'
/root/bp/java-buildpack/Rakefile:40:in `new'
/root/bp/java-buildpack/Rakefile:40:in `<top (required)>'
/usr/local/rvm/gems/ruby-...@rails-4.2.1/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-...@rails-4.2.1/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

Could you please??

Thanks in Well Advance..

Ben Hale

unread,
Apr 27, 2015, 10:25:36 AM4/27/15
to vcap...@cloudfoundry.org
Actually, this line doesn't imply that there is a problem cloning a buildpack, it simply means that this line is written to stderr.  The fact that you've seen the following demonstrates that the clone was successful:

2015-04-27T05:15:06.57+0000 [STG/0]      ERR Cloning into '/tmp/buildpacks/java-buildpack'...
2015-04-27T05:15:10.63+0000 [STG/0]      OUT -----> Java Buildpack Version: 98e178c | https://github.com/cloudfoundry/java-buildpack.git#98e178c

So heading down the path of adding the buildpack again is a red herring and should be abandoned.  What you're actually seeing is that the buildpack doesn't recognize the binary that you're giving it as a web application:

2015-04-27T05:15:10.63+0000 [STG/0]      ERR [Buildpack]                      ERROR Compile failed with exception #<RuntimeError: No container can run this application>

2015-04-27T05:15:10.63+0000 [STG/0]      ERR No container can run this application

As you can see in the documentation, the only requirement for an application to be treated as a web application is the existence of the WEB-INF/ directory.  You should take a look into the contents of your application's binary and ensure that it meets the detection criteria for Tomcat or one of the other containers.


-Ben Hale
Cloud Foundry Java Experience

Pravin Mishra

unread,
Apr 27, 2015, 1:42:37 PM4/27/15
to Parthiban Annadurai, vcap...@cloudfoundry.org
Hello,

Here is small workaround you have to do for compiling and creating offline buildpack.

1. Ruby: ruby-1.9.3-p547
-> You must have ruby 1.9.3 installed on your system.

2. git checkout 7a8ab5114ded6a2b897365724db1c1b0d4eacfce
-> Checkout to above commit. Master code is broken, even it not work for me. 

3. Bundle install
4. JBP_LOG_LEVEL=debug bundle exec rake package OFFLINE=true


Best Regards,
Pravin Mishra 

Pravin Mishra

unread,
Apr 27, 2015, 1:52:54 PM4/27/15
to vcap...@cloudfoundry.org
Hello Ban,

You have missed one critical Error: ERR encountered error: App staging failed in the buildpack compile phase

That's the place where application deploy starts throwing Error. 

ERR Cloning into '/tmp/buildpacks/java-buildpack'... 
2015-04-27T05:15:10.63+0000 [STG/0]      OUT -----> Java Buildpack Version: 98e178c | https://github.com/cloudfoundry/java-buildpack.git#98e178c
2015-04-27T05:15:10.63+0000 [STG/0]      ERR [Buildpack]                      ERROR Compile failed with exception #<RuntimeError: No container can run this application>


Some how, clone has not done and it's not finding dependent libraries and compilation has failed. 

Best Regards,
Pravin Mishra

Daniel Mikusa

unread,
Apr 27, 2015, 2:49:41 PM4/27/15
to vcap...@cloudfoundry.org
On Mon, Apr 27, 2015 at 1:52 PM, Pravin Mishra <pravinm...@gmail.com> wrote:
Hello Ban,

You have missed one critical Error: ERR encountered error: App staging failed in the buildpack compile phase

That's the place where application deploy starts throwing Error. 

ERR Cloning into '/tmp/buildpacks/java-buildpack'... 
2015-04-27T05:15:10.63+0000 [STG/0]      OUT -----> Java Buildpack Version: 98e178c | https://github.com/cloudfoundry/java-buildpack.git#98e178c
2015-04-27T05:15:10.63+0000 [STG/0]      ERR [Buildpack]                      ERROR Compile failed with exception #<RuntimeError: No container can run this application>


Some how, clone has not done and it's not finding dependent libraries and compilation has failed. 

The clone is fine, git just writes that line to STDERR which is why it shows up in red.  It does *not* mean it's an error.  Furthermore, if the clone failed the build pack would not run which you can clearly see it is doing on the following lines. 

The problem is as Ben explained, the build pack runs but cannot figure out how to deploy the application.  95% of the time when that happens it is because the Java application was pushed incorrectly (i.e. user forgot the `-p` argument to `cf push`).  Make sure that you've set the `-p` argument or have set the `path` attribute in manifest.yml and it points to your WAR file or an executable JAR file.  After checking that, if you're still having trouble post a sample application that replicates the problem.  I'm sure someone can help troubleshoot further with that.

Dan

 

Best Regards,
Pravin Mishra

On 27 April 2015 at 19:55, Ben Hale <bh...@pivotal.io> wrote:
Actually, this line doesn't imply that there is a problem cloning a buildpack, it simply means that this line is written to stderr.  The fact that you've seen the following demonstrates that the clone was successful:

2015-04-27T05:15:06.57+0000 [STG/0]      ERR Cloning into '/tmp/buildpacks/java-buildpack'...
2015-04-27T05:15:10.63+0000 [STG/0]      OUT -----> Java Buildpack Version: 98e178c | https://github.com/cloudfoundry/java-buildpack.git#98e178c

So heading down the path of adding the buildpack again is a red herring and should be abandoned.  What you're actually seeing is that the buildpack doesn't recognize the binary that you're giving it as a web application:

2015-04-27T05:15:10.63+0000 [STG/0]      ERR [Buildpack]                      ERROR Compile failed with exception #<RuntimeError: No container can run this application>
2015-04-27T05:15:10.63+0000 [STG/0]      ERR No container can run this application

As you can see in the documentation, the only requirement for an application to be treated as a web application is the existence of the WEB-INF/ directory.  You should take a look into the contents of your application's binary and ensure that it meets the detection criteria for Tomcat or one of the other containers.


-Ben Hale
Cloud Foundry Java Experience


--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.

Parthiban Annadurai

unread,
Apr 28, 2015, 5:15:58 AM4/28/15
to vcap...@cloudfoundry.org, Johannes Hiemer, Pravin Mishra, Brian Feeny
Hi All,
          Now, am able to push some sample java applications onto the deployed Cloud Foundry, but the problem is not more than two apps. It shows the No stagers available. For this, if i increase DEA size means how much to increase and in which parameters to be increased(only disk_mb or both memory_mb), if am modified in manifest file, again i need to re deploy or??

Could anyone on this issue??

Thanks a Ton All..

Regards

Parthiban A



narendra

unread,
Apr 28, 2015, 5:38:40 AM4/28/15
to vcap...@cloudfoundry.org

Hi
All depends up the following parameters is the plan which you are using for the organisation how much space you are allocating to the users and dea ... could you please share the plan or default plan for ur organisation ...

Alan Moran

unread,
Jun 2, 2015, 4:19:57 PM6/2/15
to vcap...@cloudfoundry.org
I am experiencing a similar issue myself on a bosh lite.
If I am using the admin user and I created de org and space with that same user, Why I am getting unauthorised only when retrieving the logs?

for example, I can perform app related activities but I am not able to stream the logs due to authorisation issues.

Thanks,
Alan 
On Apr 20, 2015, at 03:52, Johannes Hiemer <jvhi...@gmail.com> wrote:

Did you log in? And if, with which credentials?

On Monday, April 20, 2015 at 8:51:08 AM UTC+2, Parthiban Annadurai wrote:
Johannes, FYI,

cf logs HelloWorld --recent
Connected, dumping recent logs for app HelloWorld in org pivotal / space FIEDEL as admin...

FAILED

Unauthorized error: You are not authorized. Error: Invalid authorization

Confusing error about authentication.. But, I have given the exact credentials only..
Thanks..

On 20 April 2015 at 12:17, Johannes Hiemer <jvhi...@gmail.com> wrote:
Run: cf logs HelloWorld --recent

On Monday, April 20, 2015 at 8:43:25 AM UTC+2, Parthiban Annadurai wrote:
Johannes, now after modification, it throws the following,

cf push HelloWorld -p ./HelloWorld.war
Using manifest file /root/HelloWorld/manifest.yml

Updating app HelloWorld in org pivotal / space FIEDEL as admin...
OK

Creating route helloworld4.192.168.33.54.xip.io...
OK

Binding helloworld4.192.168.33.54.xip.io to HelloWorld...
OK

Uploading HelloWorld...
Uploading app files from: ./HelloWorld.war
Uploading 570, 3 files
Done uploading
OK

Stopping app HelloWorld in org pivotal / space FIEDEL as admin...
OK

Warning: error tailing logs
Unauthorized error: You are not authorized. Error: Invalid authorization
Starting app HelloWorld in org pivotal / space FIEDEL as admin...


FAILED
Server error, status code: 400, error code: 170004, message: App staging failed in the buildpack compile phase

TIP: use 'cf logs HelloWorld --recent' for more information

Thanks in Well Advance..


On 20 April 2015 at 12:04, Johannes Hiemer <jvhi...@gmail.com> wrote:
Please add:

host: helloworld

and run it again.

On Monday, April 20, 2015 at 8:32:42 AM UTC+2, Parthiban Annadurai wrote:
FYI,

---
applications:
- name: HelloWorld
  memory: 512M
  instances: 1
  url: api.192.168.33.54.xip.io
  path: ./HelloWorld.war


Thanks..

On 20 April 2015 at 11:50, Johannes Hiemer <jvhi...@gmail.com> wrote:
Could you provide your manifest?


On Monday, April 20, 2015 at 7:47:23 AM UTC+2, Parthiban Annadurai wrote:
Hi All,
          After so many hurdles, I had successfully deployed CF on vSphere with all your kind help. Now, am facing some issue when try to push some sample JAVA Application. CF PUSH throws the following,

cf push HelloWorld -p ./HelloWorld.war
Using manifest file /root/HelloWorld/manifest.yml

Updating app HelloWorld in org pivotal / space FIEDEL as admin...
OK

Uploading HelloWorld...
Uploading app files from: ./HelloWorld.war
Uploading 570, 3 files
Done uploading
OK

Stopping app HelloWorld in org pivotal / space FIEDEL as admin...
OK

Warning: error tailing logs
Unauthorized error: You are not authorized. Error: Invalid authorization
Starting app HelloWorld in org pivotal / space FIEDEL as admin...

FAILED
Server error, status code: 400, error code: 170003, message: An app was not successfully detected by any available buildpack


TIP: use 'cf logs HelloWorld --recent' for more information


Could anyone on this issue??

Any Help is Greatly Appreciated..

Thanks in Well Advance..

--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.


To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.

--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.


To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.

--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.


To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.

--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
Reply all
Reply to author
Forward
0 new messages