{"action":"created","issue":{"url":"https://api.github.com/repos/HubSpot/Singularity/issues/1047","repository_url":"https://api.github.com/repos/HubSpot/Singularity","labels_url":"https://api.github.com/repos/HubSpot/Singularity/issues/1047/labels{/name}","comments_url":"https://api.github.com/repos/HubSpot/Singularity/issues/1047/comments","events_url":"https://api.github.com/repos/HubSpot/Singularity/issues/1047/events","html_url":"https://github.com/HubSpot/Singularity/issues/1047","id":155705870,"number":1047,"title":"Failure while trying to run a jar file with on demand setting","user":{"login":"the100rabh","id":233547,"avatar_url":"https://avatars.githubusercontent.com/u/233547?v=3","gravatar_id":"","url":"https://api.github.com/users/the100rabh","html_url":"https://github.com/the100rabh","followers_url":"https://api.github.com/users/the100rabh/followers","following_url":"https://api.github.com/users/the100rabh/following{/other_user}","gists_url":"https://api.github.com/users/the100rabh/gists{/gist_id}","starred_url":"https://api.github.com/users/the100rabh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the100rabh/subscriptions","organizations_url":"https://api.github.com/users/the100rabh/orgs","repos_url":"https://api.github.com/users/the100rabh/repos","events_url":"https://api.github.com/users/the100rabh/events{/privacy}","received_events_url":"https://api.github.com/users/the100rabh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ssalinas","id":6034439,"avatar_url":"https://avatars.githubusercontent.com/u/6034439?v=3","gravatar_id":"","url":"https://api.github.com/users/ssalinas","html_url":"https://github.com/ssalinas","followers_url":"https://api.github.com/users/ssalinas/followers","following_url":"https://api.github.com/users/ssalinas/following{/other_user}","gists_url":"https://api.github.com/users/ssalinas/gists{/gist_id}","starred_url":"https://api.github.com/users/ssalinas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssalinas/subscriptions","organizations_url":"https://api.github.com/users/ssalinas/orgs","repos_url":"https://api.github.com/users/ssalinas/repos","events_url":"https://api.github.com/users/ssalinas/events{/privacy}","received_events_url":"https://api.github.com/users/ssalinas/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-05-19T10:38:46Z","updated_at":"2016-05-19T13:52:23Z","closed_at":null,"body":"I am trying to create a task which be run On Demand.\r\n\r\nBelow is the json for the request \r\n```\r\n{\r\n    \"request\": {\r\n        \"id\": \"ondemand1\",\r\n        \"requestType\": \"ON_DEMAND\",\r\n        \"owners\": [\r\n            \"saurabh\"\r\n        ],\r\n        \"killOldNonLongRunningTasksAfterMillis\": 100000\r\n    },\r\n    \"state\": \"ACTIVE\",\r\n    \"requestDeployState\": {\r\n        \"requestId\": \"ondemand1\",\r\n        \"activeDeploy\": {\r\n            \"requestId\": \"ondemand1\",\r\n            \"deployId\": \"d1\",\r\n            \"timestamp\": 1463652534039\r\n        }\r\n    },\r\n    \"type\": \"ON_DEMAND\",\r\n    \"instances\": 1,\r\n    \"hasMoreThanOneInstance\": false,\r\n    \"inCooldown\": false,\r\n    \"daemon\": false,\r\n    \"canBeScaled\": false\r\n}\r\n```\r\nI deployed it using and the following is the JSON of it I got from UI\r\n```\r\n{\r\n    \"deployId\": \"d1\",\r\n    \"requestId\": \"ondemand1\",\r\n    \"deployResult\": {\r\n        \"deployState\": \"SUCCEEDED\",\r\n        \"message\": \"Request not deployable\",\r\n        \"deployFailures\": [],\r\n        \"timestamp\": 1463652537563\r\n    },\r\n    \"deployMarker\": {\r\n        \"requestId\": \"ondemand1\",\r\n        \"deployId\": \"d1\",\r\n        \"timestamp\": 1463652534039\r\n    },\r\n    \"deploy\": {\r\n        \"requestId\": \"ondemand1\",\r\n        \"id\": \"d1\",\r\n        \"command\": \"java -jar singularitytest-1.0-SNAPSHOT.jar\",\r\n        \"resources\": {\r\n            \"cpus\": 1,\r\n            \"memoryMb\": 512,\r\n            \"numPorts\": 1\r\n        },\r\n        \"uris\": [\r\n            \"http://10.124.114.7/singularitytest-1.0-SNAPSHOT.jar\"\r\n        ]\r\n    },\r\n    \"deployStatistics\": {\r\n        \"requestId\": \"ondemand1\",\r\n        \"deployId\": \"d1\",\r\n        \"numSuccess\": 0,\r\n        \"numFailures\": 0,\r\n        \"numSequentialRetries\": 0,\r\n        \"lastFinishAt\": 1463652546070,\r\n        \"lastTaskState\": \"TASK_FAILED\",\r\n        \"instanceSequentialFailureTimestamps\": {\r\n            \"1\": [\r\n                1463652546070\r\n            ]\r\n        },\r\n        \"numTasks\": 1,\r\n        \"averageRuntimeMillis\": 442\r\n    }\r\n}\r\n```\r\n\r\nSTDERR shows the following error message\r\n\r\n> Failed to exec: No such file or directory\r\n\r\nJust keep things simple I am printing to stdout some text in singularitytest-1.0-SNAPSHOT.jar\r\n\r\n\r\nI tried to deploy it using run once and as a service as well, they seems work already then.\r\n \r\nI could not find anything specific in the documentation regarding on demand jobs.\r\nI am obviously missing something which I am not able to figure out. Any help is appreciated."},"comment":{"url":"https://api.github.com/repos/HubSpot/Singularity/issues/comments/220330445","html_url":"https://github.com/HubSpot/Singularity/issues/1047#issuecomment-220330445","issue_url":"https://api.github.com/repos/HubSpot/Singularity/issues/1047","id":220330445,"user":{"login":"demobox","id":223702,"avatar_url":"https://avatars.githubusercontent.com/u/223702?v=3","gravatar_id":"","url":"https://api.github.com/users/demobox","html_url":"https://github.com/demobox","followers_url":"https://api.github.com/users/demobox/followers","following_url":"https://api.github.com/users/demobox/following{/other_user}","gists_url":"https://api.github.com/users/demobox/gists{/gist_id}","starred_url":"https://api.github.com/users/demobox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demobox/subscriptions","organizations_url":"https://api.github.com/users/demobox/orgs","repos_url":"https://api.github.com/users/demobox/repos","events_url":"https://api.github.com/users/demobox/events{/privacy}","received_events_url":"https://api.github.com/users/demobox/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T13:52:23Z","updated_at":"2016-05-19T13:52:23Z","body":"Also ran into this - thanks for the very quick PR, @ssalinas!"}}