0
votes

Can Anyone explain how can i deploy my drop-wizard application on cloud foundry? currently i am able to deploy war files. but i have no idea how to deploy drop-wizard jar file?

this is my main method

public static void main(String args[]) throws Exception {

    if (args == null || args.length == 0) {
        args = new String[] { "server" };
    }

    new HelloWorlApplication().run(args);

}

command used to run application locally

java -jar filename.jar

LOGS

2015-09-18T10:32:45.89+0530 [App/0] OUT INFO [2015-09-18 05:02:45,890] org.eclipse.jetty.server.ServerConnector: Started application@7113b13f{HTTP/1.1}{0.0.0.0:8080} 2015-09-18T10:32:45.89+0530 [App/0] OUT INFO [2015-09-18 05:02:45,893] org.eclipse.jetty.server.ServerConnector: Started admin@45820e51{HTTP/1.1}{0.0.0.0:8081} 2015-09-18T10:32:45.89+0530 [App/0] OUT INFO [2015-09-18 05:02:45,893] org.eclipse.jetty.server.Server: Started @1710ms 2015-09-18T10:33:44.23+0530 [DEA/31] ERR Instance (index 0) failed to start accepting connections 2015-09-18T10:33:44.25+0530 [App/0] ERR 2015-09-18T10:33:44.26+0530 [API/3] OUT App instance exited with guid 7b9b30c4-41af-4d24-b274-64ab29652c39 payload: {"cc_partition"=>"default", "droplet"=>"7b9b30c4-41af-4d24-b274-64ab29652c39", "version"=>"8e4eb59c-4127-4263-bd5d-358850581883", "instance"=>"22f5e43cb9d7490e9d96722f7ecf83af", "index"=>0, "reason"=>"CRASHED", "exit_status"=>-1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1442552624} 2015-09-18T10:34:06.42+0530 [DEA/35] OUT Starting app instance (index 0) with guid 7b9b30c4-41af-4d24-b274-64ab29652c39 2015-09-18T10:34:11.12+0530 [App/0] OUT INFO [2015-09-18 05:04:11,117] org.eclipse.jetty.util.log: Logging initialized @1281ms 2015-09-18T10:34:11.19+0530 [App/0] OUT INFO [2015-09-18 05:04:11,196] io.dropwizard.server.ServerFactory: Starting HelloWorlApplication 2015-09-18T10:34:11.26+0530 [App/0] OUT INFO [2015-09-18 05:04:11,260] org.eclipse.jetty.setuid.SetUIDListener: Opened application@7113b13f{HTTP/1.1}{0.0.0.0:8080} 2015-09-18T10:34:11.26+0530 [App/0] OUT INFO [2015-09-18 05:04:11,260] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@45820e51{HTTP/1.1}{0.0.0.0:8081} 2015-09-18T10:34:11.26+0530 [App/0] OUT INFO [2015-09-18 05:04:11,262] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT 2015-09-18T10:34:11.83+0530 [App/0] OUT INFO [2015-09-18 05:04:11,832] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: 2015-09-18T10:34:11.83+0530 [App/0] OUT GET /hello-world (com.dropwizard.HelloWorldResource) 2015-09-18T10:34:11.83+0530 [App/0] OUT INFO [2015-09-18 05:04:11,836] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3c419631{/,null,AVAILABLE} 2015-09-18T10:34:11.84+0530 [App/0] OUT INFO [2015-09-18 05:04:11,849] io.dropwizard.setup.AdminEnvironment: tasks = 2015-09-18T10:34:11.84+0530 [App/0] OUT POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) 2015-09-18T10:34:11.84+0530 [App/0] OUT POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) 2015-09-18T10:34:11.84+0530 [App/0] OUT WARN [2015-09-18 05:04:11,849] io.dropwizard.setup.AdminEnvironment: 2015-09-18T10:34:11.84+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:34:11.84+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:34:11.84+0530 [App/0] OUT ! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! 2015-09-18T10:34:11.84+0530 [App/0] OUT ! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! 2015-09-18T10:34:11.84+0530 [App/0] OUT ! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! 2015-09-18T10:34:11.84+0530 [App/0] OUT ! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! 2015-09-18T10:34:11.84+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:34:11.85+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:34:11.85+0530 [App/0] OUT INFO [2015-09-18 05:04:11,854] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@63021689{/,null,AVAILABLE} 2015-09-18T10:34:11.86+0530 [App/0] OUT INFO [2015-09-18 05:04:11,865] org.eclipse.jetty.server.ServerConnector: Started application@7113b13f{HTTP/1.1}{0.0.0.0:8080} 2015-09-18T10:34:11.86+0530 [App/0] OUT INFO [2015-09-18 05:04:11,866] org.eclipse.jetty.server.ServerConnector: Started admin@45820e51{HTTP/1.1}{0.0.0.0:8081} 2015-09-18T10:34:11.86+0530 [App/0] OUT INFO [2015-09-18 05:04:11,866] org.eclipse.jetty.server.Server: Started @2032ms 2015-09-18T10:35:09.89+0530 [DEA/35] ERR Instance (index 0) failed to start accepting connections 2015-09-18T10:35:09.89+0530 [API/3] OUT App instance exited with guid 7b9b30c4-41af-4d24-b274-64ab29652c39 payload: {"cc_partition"=>"default", "droplet"=>"7b9b30c4-41af-4d24-b274-64ab29652c39", "version"=>"8e4eb59c-4127-4263-bd5d-358850581883", "instance"=>"709a514014004ab0930a8536d4798c12", "index"=>0, "reason"=>"CRASHED", "exit_status"=>-1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1442552709} 2015-09-18T10:35:09.90+0530 [App/0] ERR 2015-09-18T10:35:26.41+0530 [DEA/25] OUT Starting app instance (index 0) with guid 7b9b30c4-41af-4d24-b274-64ab29652c39 2015-09-18T10:35:30.47+0530 [App/0] OUT INFO [2015-09-18 05:05:30,469] org.eclipse.jetty.util.log: Logging initialized @1080ms 2015-09-18T10:35:30.53+0530 [App/0] OUT INFO [2015-09-18 05:05:30,537] io.dropwizard.server.ServerFactory: Starting HelloWorlApplication 2015-09-18T10:35:30.59+0530 [App/0] OUT INFO [2015-09-18 05:05:30,593] org.eclipse.jetty.setuid.SetUIDListener: Opened application@7113b13f{HTTP/1.1}{0.0.0.0:8080} 2015-09-18T10:35:30.59+0530 [App/0] OUT INFO [2015-09-18 05:05:30,594] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@45820e51{HTTP/1.1}{0.0.0.0:8081} 2015-09-18T10:35:30.59+0530 [App/0] OUT INFO [2015-09-18 05:05:30,596] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT 2015-09-18T10:35:31.03+0530 [App/0] OUT INFO [2015-09-18 05:05:31,032] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: 2015-09-18T10:35:31.03+0530 [App/0] OUT GET /hello-world (com.dropwizard.HelloWorldResource) 2015-09-18T10:35:31.03+0530 [App/0] OUT INFO [2015-09-18 05:05:31,036] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3c419631{/,null,AVAILABLE} 2015-09-18T10:35:31.04+0530 [App/0] OUT INFO [2015-09-18 05:05:31,046] io.dropwizard.setup.AdminEnvironment: tasks = 2015-09-18T10:35:31.04+0530 [App/0] OUT POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) 2015-09-18T10:35:31.04+0530 [App/0] OUT POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) 2015-09-18T10:35:31.04+0530 [App/0] OUT WARN [2015-09-18 05:05:31,047] io.dropwizard.setup.AdminEnvironment: 2015-09-18T10:35:31.04+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:35:31.04+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:35:31.04+0530 [App/0] OUT ! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! 2015-09-18T10:35:31.04+0530 [App/0] OUT ! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! 2015-09-18T10:35:31.04+0530 [App/0] OUT ! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! 2015-09-18T10:35:31.04+0530 [App/0] OUT ! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! 2015-09-18T10:35:31.04+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:35:31.04+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:35:31.05+0530 [App/0] OUT INFO [2015-09-18 05:05:31,051] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@63021689{/,null,AVAILABLE} 2015-09-18T10:35:31.05+0530 [App/0] OUT INFO [2015-09-18 05:05:31,057] org.eclipse.jetty.server.ServerConnector: Started application@7113b13f{HTTP/1.1}{0.0.0.0:8080} 2015-09-18T10:35:31.05+0530 [App/0] OUT INFO [2015-09-18 05:05:31,058] org.eclipse.jetty.server.ServerConnector: Started admin@45820e51{HTTP/1.1}{0.0.0.0:8081} 2015-09-18T10:35:31.05+0530 [App/0] OUT INFO [2015-09-18 05:05:31,058] org.eclipse.jetty.server.Server: Started @1670ms 2015-09-18T10:36:29.43+0530 [DEA/25] ERR Instance (index 0) failed to start accepting connections 2015-09-18T10:36:29.45+0530 [App/0] ERR 2015-09-18T10:36:29.45+0530 [API/4] OUT App instance exited with guid 7b9b30c4-41af-4d24-b274-64ab29652c39 payload: {"cc_partition"=>"default", "droplet"=>"7b9b30c4-41af-4d24-b274-64ab29652c39", "version"=>"8e4eb59c-4127-4263-bd5d-358850581883", "instance"=>"aeead7ae377d41e48af16f1a27480b56", "index"=>0, "reason"=>"CRASHED", "exit_status"=>-1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1442552789} 2015-09-18T10:36:46.56+0530 [DEA/21] OUT Starting app instance (index 0) with guid 7b9b30c4-41af-4d24-b274-64ab29652c39 2015-09-18T10:36:51.72+0530 [App/0] OUT INFO [2015-09-18 05:06:51,716] org.eclipse.jetty.util.log: Logging initialized @1741ms 2015-09-18T10:36:51.82+0530 [App/0] OUT INFO [2015-09-18 05:06:51,824] io.dropwizard.server.ServerFactory: Starting HelloWorlApplication 2015-09-18T10:36:51.90+0530 [App/0] OUT INFO [2015-09-18 05:06:51,903] org.eclipse.jetty.setuid.SetUIDListener: Opened application@7113b13f{HTTP/1.1}{0.0.0.0:8080} 2015-09-18T10:36:51.90+0530 [App/0] OUT INFO [2015-09-18 05:06:51,904] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@45820e51{HTTP/1.1}{0.0.0.0:8081} 2015-09-18T10:36:51.90+0530 [App/0] OUT INFO [2015-09-18 05:06:51,907] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT 2015-09-18T10:36:52.45+0530 [App/0] OUT INFO [2015-09-18 05:06:52,454] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: 2015-09-18T10:36:52.45+0530 [App/0] OUT GET /hello-world (com.dropwizard.HelloWorldResource) 2015-09-18T10:36:52.45+0530 [App/0] OUT INFO [2015-09-18 05:06:52,459] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3c419631{/,null,AVAILABLE} 2015-09-18T10:36:52.47+0530 [App/0] OUT INFO [2015-09-18 05:06:52,472] io.dropwizard.setup.AdminEnvironment: tasks = 2015-09-18T10:36:52.47+0530 [App/0] OUT POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) 2015-09-18T10:36:52.47+0530 [App/0] OUT POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) 2015-09-18T10:36:52.47+0530 [App/0] OUT WARN [2015-09-18 05:06:52,472] io.dropwizard.setup.AdminEnvironment: 2015-09-18T10:36:52.47+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:36:52.47+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:36:52.47+0530 [App/0] OUT ! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! 2015-09-18T10:36:52.47+0530 [App/0] OUT ! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! 2015-09-18T10:36:52.47+0530 [App/0] OUT ! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! 2015-09-18T10:36:52.47+0530 [App/0] OUT ! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! 2015-09-18T10:36:52.47+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:36:52.47+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:36:52.47+0530 [App/0] OUT INFO [2015-09-18 05:06:52,477] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@63021689{/,null,AVAILABLE} 2015-09-18T10:36:52.49+0530 [App/0] OUT INFO [2015-09-18 05:06:52,487] org.eclipse.jetty.server.ServerConnector: Started application@7113b13f{HTTP/1.1}{0.0.0.0:8080} 2015-09-18T10:36:52.49+0530 [App/0] OUT INFO [2015-09-18 05:06:52,487] org.eclipse.jetty.server.ServerConnector: Started admin@45820e51{HTTP/1.1}{0.0.0.0:8081} 2015-09-18T10:36:52.49+0530 [App/0] OUT INFO [2015-09-18 05:06:52,488] org.eclipse.jetty.server.Server: Started @2514ms 2015-09-18T10:37:50.04+0530 [DEA/21] ERR Instance (index 0) failed to start accepting connections 2015-09-18T10:37:50.05+0530 [API/3] OUT App instance exited with guid 7b9b30c4-41af-4d24-b274-64ab29652c39 payload: {"cc_partition"=>"default", "droplet"=>"7b9b30c4-41af-4d24-b274-64ab29652c39", "version"=>"8e4eb59c-4127-4263-bd5d-358850581883", "instance"=>"19d8761b392548c0a64a15dbeda310e7", "index"=>0, "reason"=>"CRASHED", "exit_status"=>-1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1442552870} 2015-09-18T10:37:50.05+0530 [App/0] ERR 2015-09-18T10:38:36.66+0530 [DEA/16] OUT Starting app instance (index 0) with guid 7b9b30c4-41af-4d24-b274-64ab29652c39 2015-09-18T10:38:40.73+0530 [App/0] OUT INFO [2015-09-18 05:08:40,733] org.eclipse.jetty.util.log: Logging initialized @1067ms 2015-09-18T10:38:40.84+0530 [App/0] OUT INFO [2015-09-18 05:08:40,840] io.dropwizard.server.ServerFactory: Starting HelloWorlApplication 2015-09-18T10:38:40.90+0530 [App/0] OUT INFO [2015-09-18 05:08:40,905] org.eclipse.jetty.setuid.SetUIDListener: Opened application@7113b13f{HTTP/1.1}{0.0.0.0:8080} 2015-09-18T10:38:40.90+0530 [App/0] OUT INFO [2015-09-18 05:08:40,905] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@45820e51{HTTP/1.1}{0.0.0.0:8081} 2015-09-18T10:38:40.90+0530 [App/0] OUT INFO [2015-09-18 05:08:40,908] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT 2015-09-18T10:38:41.40+0530 [App/0] OUT INFO [2015-09-18 05:08:41,403] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: 2015-09-18T10:38:41.40+0530 [App/0] OUT GET /hello-world (com.dropwizard.HelloWorldResource) 2015-09-18T10:38:41.40+0530 [App/0] OUT INFO [2015-09-18 05:08:41,406] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3c419631{/,null,AVAILABLE} 2015-09-18T10:38:41.41+0530 [App/0] OUT INFO [2015-09-18 05:08:41,418] io.dropwizard.setup.AdminEnvironment: tasks = 2015-09-18T10:38:41.41+0530 [App/0] OUT POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) 2015-09-18T10:38:41.41+0530 [App/0] OUT POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) 2015-09-18T10:38:41.41+0530 [App/0] OUT WARN [2015-09-18 05:08:41,419] io.dropwizard.setup.AdminEnvironment: 2015-09-18T10:38:41.41+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:38:41.41+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:38:41.41+0530 [App/0] OUT ! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! 2015-09-18T10:38:41.41+0530 [App/0] OUT ! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! 2015-09-18T10:38:41.41+0530 [App/0] OUT ! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! 2015-09-18T10:38:41.41+0530 [App/0] OUT ! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! 2015-09-18T10:38:41.41+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:38:41.41+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:38:41.42+0530 [App/0] OUT INFO [2015-09-18 05:08:41,424] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@63021689{/,null,AVAILABLE} 2015-09-18T10:38:41.43+0530 [App/0] OUT INFO [2015-09-18 05:08:41,433] org.eclipse.jetty.server.ServerConnector: Started application@7113b13f{HTTP/1.1}{0.0.0.0:8080} 2015-09-18T10:38:41.43+0530 [App/0] OUT INFO [2015-09-18 05:08:41,434] org.eclipse.jetty.server.ServerConnector: Started admin@45820e51{HTTP/1.1}{0.0.0.0:8081} 2015-09-18T10:38:41.43+0530 [App/0] OUT INFO [2015-09-18 05:08:41,434] org.eclipse.jetty.server.Server: Started @1769ms 2015-09-18T10:39:39.72+0530 [DEA/16] ERR Instance (index 0) failed to start accepting connections 2015-09-18T10:39:39.73+0530 [API/0] OUT App instance exited with guid 7b9b30c4-41af-4d24-b274-64ab29652c39 payload: {"cc_partition"=>"default", "droplet"=>"7b9b30c4-41af-4d24-b274-64ab29652c39", "version"=>"8e4eb59c-4127-4263-bd5d-358850581883", "instance"=>"f3d0d963ac7643b7a1d81e80388161df", "index"=>0, "reason"=>"CRASHED", "exit_status"=>-1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1442552979} 2015-09-18T10:39:39.73+0530 [App/0] ERR 2015-09-18T10:40:56.42+0530 [DEA/36] OUT Starting app instance (index 0) with guid 7b9b30c4-41af-4d24-b274-64ab29652c39 2015-09-18T10:41:01.30+0530 [App/0] OUT INFO [2015-09-18 05:11:01,299] org.eclipse.jetty.util.log: Logging initialized @1082ms 2015-09-18T10:41:01.38+0530 [App/0] OUT INFO [2015-09-18 05:11:01,389] io.dropwizard.server.ServerFactory: Starting HelloWorlApplication 2015-09-18T10:41:01.45+0530 [App/0] OUT INFO [2015-09-18 05:11:01,458] org.eclipse.jetty.setuid.SetUIDListener: Opened application@7113b13f{HTTP/1.1}{0.0.0.0:8080} 2015-09-18T10:41:01.45+0530 [App/0] OUT INFO [2015-09-18 05:11:01,459] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@45820e51{HTTP/1.1}{0.0.0.0:8081} 2015-09-18T10:41:01.46+0530 [App/0] OUT INFO [2015-09-18 05:11:01,462] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT 2015-09-18T10:41:02.01+0530 [App/0] OUT INFO [2015-09-18 05:11:02,014] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: 2015-09-18T10:41:02.01+0530 [App/0] OUT GET /hello-world (com.dropwizard.HelloWorldResource) 2015-09-18T10:41:02.01+0530 [App/0] OUT INFO [2015-09-18 05:11:02,018] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3c419631{/,null,AVAILABLE} 2015-09-18T10:41:02.03+0530 [App/0] OUT INFO [2015-09-18 05:11:02,032] io.dropwizard.setup.AdminEnvironment: tasks = 2015-09-18T10:41:02.03+0530 [App/0] OUT POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) 2015-09-18T10:41:02.03+0530 [App/0] OUT POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) 2015-09-18T10:41:02.03+0530 [App/0] OUT WARN [2015-09-18 05:11:02,033] io.dropwizard.setup.AdminEnvironment: 2015-09-18T10:41:02.03+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:41:02.03+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:41:02.03+0530 [App/0] OUT ! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! 2015-09-18T10:41:02.03+0530 [App/0] OUT ! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! 2015-09-18T10:41:02.03+0530 [App/0] OUT ! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! 2015-09-18T10:41:02.03+0530 [App/0] OUT ! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! 2015-09-18T10:41:02.03+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:41:02.03+0530 [App/0] OUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2015-09-18T10:41:02.03+0530 [App/0] OUT INFO [2015-09-18 05:11:02,038] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@63021689{/,null,AVAILABLE} 2015-09-18T10:41:02.04+0530 [App/0] OUT INFO [2015-09-18 05:11:02,047] org.eclipse.jetty.server.ServerConnector: Started application@7113b13f{HTTP/1.1}{0.0.0.0:8080} 2015-09-18T10:41:02.04+0530 [App/0] OUT INFO [2015-09-18 05:11:02,049] org.eclipse.jetty.server.ServerConnector: Started admin@45820e51{HTTP/1.1}{0.0.0.0:8081} 2015-09-18T10:41:02.04+0530 [App/0] OUT INFO [2015-09-18 05:11:02,049] org.eclipse.jetty.server.Server: Started @1834ms 2015-09-18T10:42:00.26+0530 [API/5] OUT App instance exited with guid 7b9b30c4-41af-4d24-b274-64ab29652c39 payload: {"cc_partition"=>"default", "droplet"=>"7b9b30c4-41af-4d24-b274-64ab29652c39", "version"=>"8e4eb59c-4127-4263-bd5d-358850581883", "instance"=>"c15ae47a68264ccf9a90f4bf2f599f63", "index"=>0, "reason"=>"CRASHED", "exit_status"=>-1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1442553120} 2015-09-18T10:42:00.26+0530 [DEA/36] ERR Instance (index 0) failed to start accepting connections 2015-09-18T10:42:00.27+0530 [App/0] ERR

3
If the JAR file is executable (i.e. you can run it with java -jar <file> locally) then it should run fine with the Java build pack. How do you run it locally? What is the output that you get when running in on CF? More detail would help to pinpoint what is wrong.Daniel Mikusa
i have edted my question.. @DanielMikusaarshid dar

3 Answers

1
votes

The easiest way is to create a so called Dist ZIP. Its a zip file that has bin/ and lib/ folder in it. You can place dropwizard Uber jar into lib/ folder and create an executable (chmod +x) start.sh file in bin/ folder. The executable file can look something like this:

#!/bin/bash
$JAVA_HOME/bin/java -Ddw.server.applicationConnectors[0].port=$PORT -jar lib/my-app.jar server file///home/vcap/app/notificationhandler-dev.yml
0
votes

Diagnostic:

This means your dropwizard app is binding to the default port (8080):

18T10:34:11.26+0530 [App/0] OUT INFO [2015-09-18 05:04:11,260] org.eclipse.jetty.setuid.SetUIDListener: Opened application@7113b13f{HTTP/1.1}{0.0.0.0:8080}  

Cloud Foundry will provide and allow only one port for incoming traffic. This port is available via the environment variable $PORT on the CF container. Your app fails to start since CF cannot "healthcheck" it (i.e. CF sends requests to port $PORT, but your app is listening on port 8080, it can't receive incoming requests).

Possible solution:

One way to tell DW to bind to this port is to specify it in the java options when the app is launched via the java commmand as such:

java ... -Ddw.server.applicationConnectors[0].port=$PORT ...

Then...

There will be more challenges before your app can deploy to / run on CF: you will need tell the buildpack how to reconstruct the application start command by specifying the java main, arguments and java options.

Have a look at the Java buildpack (poor and scattered) doc to:

There will be 2 options to specify this:

  1. Either create your buildpack by forking the java buildpack and specify the settings in the config/ directory of your custom buildpack
  2. Or set some environment variables (so far not working for me... but it should...)

Good luck!

0
votes

If this is still an issue you can read my detailed description: https://github.com/kmejka/dwOnCfExample