{"action":"created","issue":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/139","repository_url":"https://api.github.com/repos/aws/amazon-ecs-agent","labels_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/139/comments","events_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/139/events","html_url":"https://github.com/aws/amazon-ecs-agent/issues/139","id":96161517,"number":139,"title":"How do register existing agent to a different cluster?","user":{"login":"cleung2010","id":1883212,"avatar_url":"https://avatars.githubusercontent.com/u/1883212?v=3","gravatar_id":"","url":"https://api.github.com/users/cleung2010","html_url":"https://github.com/cleung2010","followers_url":"https://api.github.com/users/cleung2010/followers","following_url":"https://api.github.com/users/cleung2010/following{/other_user}","gists_url":"https://api.github.com/users/cleung2010/gists{/gist_id}","starred_url":"https://api.github.com/users/cleung2010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleung2010/subscriptions","organizations_url":"https://api.github.com/users/cleung2010/orgs","repos_url":"https://api.github.com/users/cleung2010/repos","events_url":"https://api.github.com/users/cleung2010/events{/privacy}","received_events_url":"https://api.github.com/users/cleung2010/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-20T21:14:22Z","updated_at":"2016-04-13T20:53:36Z","closed_at":"2015-07-21T14:31:31Z","body":"I created EC2 Instance, with the idea that it was going to join my non-default cluster. However, it ended up joining the default cluster so I deregistered it, but changing `/etc/ecs/ecs.config` didn't work on re-registering it to the new cluster.\r\n\r\nI followed the instructions on http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-install.html to start/restart the container, but it exits immediately with this error:\r\n\r\n```\r\n2015-07-20T21:08:01Z [INFO] Starting Agent: Amazon ECS Agent - v1.3.0 (097e4af)\r\n2015-07-20T21:08:01Z [INFO] Loading configuration\r\n2015-07-20T21:08:01Z [INFO] Checkpointing is enabled. Attempting to load state\r\n2015-07-20T21:08:01Z [INFO] Loading state! module=\"statemanager\"\r\n2015-07-20T21:08:01Z [CRITICAL] Data mismatch; saved cluster 'default' does not match configured cluster 'dev-consul'. Perhaps you want to delete the configured checkpoint file?\r\n```\r\n\r\nAlso, how can I prevent the EC2 instance from auto joining the default cluster in the future?"},"comment":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/comments/209643199","html_url":"https://github.com/aws/amazon-ecs-agent/issues/139#issuecomment-209643199","issue_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/139","id":209643199,"user":{"login":"samuelkarp","id":737750,"avatar_url":"https://avatars.githubusercontent.com/u/737750?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelkarp","html_url":"https://github.com/samuelkarp","followers_url":"https://api.github.com/users/samuelkarp/followers","following_url":"https://api.github.com/users/samuelkarp/following{/other_user}","gists_url":"https://api.github.com/users/samuelkarp/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelkarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelkarp/subscriptions","organizations_url":"https://api.github.com/users/samuelkarp/orgs","repos_url":"https://api.github.com/users/samuelkarp/repos","events_url":"https://api.github.com/users/samuelkarp/events{/privacy}","received_events_url":"https://api.github.com/users/samuelkarp/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T20:53:36Z","updated_at":"2016-04-13T20:53:36Z","body":"@rupamroy Instructions for running the ECS agent on other Linux instances are [here](http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-install.html).  @euank's comments are accurate, though the paths to the files may be different depending on how you're starting the agent.  If you continue running into problems, please share the commands you use to run the agent (though please remove all credentials!) and we can help you."}}