{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/14706","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/14706/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/14706/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/14706/events","html_url":"https://github.com/elastic/elasticsearch/issues/14706","id":116535443,"number":14706,"title":"java.lang.ClassCastException when upgrading to 2.0.0","user":{"login":"krisb78","id":222033,"avatar_url":"https://avatars.githubusercontent.com/u/222033?v=3","gravatar_id":"","url":"https://api.github.com/users/krisb78","html_url":"https://github.com/krisb78","followers_url":"https://api.github.com/users/krisb78/followers","following_url":"https://api.github.com/users/krisb78/following{/other_user}","gists_url":"https://api.github.com/users/krisb78/gists{/gist_id}","starred_url":"https://api.github.com/users/krisb78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krisb78/subscriptions","organizations_url":"https://api.github.com/users/krisb78/orgs","repos_url":"https://api.github.com/users/krisb78/repos","events_url":"https://api.github.com/users/krisb78/events{/privacy}","received_events_url":"https://api.github.com/users/krisb78/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Cluster","name":":Cluster","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/bug","name":"bug","color":"9e2c2c"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/feedback_needed","name":"feedback_needed","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"martijnvg","id":580421,"avatar_url":"https://avatars.githubusercontent.com/u/580421?v=3","gravatar_id":"","url":"https://api.github.com/users/martijnvg","html_url":"https://github.com/martijnvg","followers_url":"https://api.github.com/users/martijnvg/followers","following_url":"https://api.github.com/users/martijnvg/following{/other_user}","gists_url":"https://api.github.com/users/martijnvg/gists{/gist_id}","starred_url":"https://api.github.com/users/martijnvg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martijnvg/subscriptions","organizations_url":"https://api.github.com/users/martijnvg/orgs","repos_url":"https://api.github.com/users/martijnvg/repos","events_url":"https://api.github.com/users/martijnvg/events{/privacy}","received_events_url":"https://api.github.com/users/martijnvg/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-11-12T11:56:07Z","updated_at":"2015-11-18T16:53:11Z","closed_at":null,"body":"Trying to upgrade from 1.7.2 to 2.0.0, following the instructions provided on:\r\n\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/2.0/restart-upgrade.html\r\n\r\nShut the whole cluster down, removed old plugins, installed the new cloud-aws plugin.\r\n\r\nWhen starting the first master node with 2.0.0 installed, I'm getting:\r\n\r\n```\r\njava.lang.ClassCastException: org.elasticsearch.cluster.metadata.AliasOrIndex$Index cannot be cast to org.elasticsearch.cluster.metadata.AliasOrIndex$Alias\r\n```\r\n\r\nFull log:\r\n\r\n```\r\nroot@cubitsearch-master-1:~# sudo -u elasticsearch /usr/bin/java -Xms3g -Xmx3g -Xmn200m -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Djna.nosys=true -Des.path.home=/usr/share/elasticsearch -cp /usr/share/elasticsearch/lib/elasticsearch-2.0.0.jar:/usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch start -Des.default.path.home=/usr/share/elasticsearch -Des.default.path.logs=/var/log/elasticsearch -Des.default.path.data=/var/lib/elasticsearch -Des.default.path.work=/tmp/elasticsearch -Des.default.path.conf=/etc/elasticsearch -Des.max-open-files=true\r\n[2015-11-12 11:49:58,131][INFO ][bootstrap                ] max_open_files [4096]\r\n[2015-11-12 11:49:59,130][INFO ][node                     ] [cubitsearch-master-1] version[2.0.0], pid[29560], build[de54438/2015-10-22T08:09:48Z]\r\n[2015-11-12 11:49:59,130][INFO ][node                     ] [cubitsearch-master-1] initializing ...\r\n[2015-11-12 11:50:00,367][INFO ][plugins                  ] [cubitsearch-master-1] loaded [cloud-aws], sites []\r\n[2015-11-12 11:50:00,514][INFO ][env                      ] [cubitsearch-master-1] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [5.8gb], net total_space [7.8gb], spins? [no], types [ext4]\r\n[2015-11-12 11:50:10,624][ERROR][gateway                  ] [cubitsearch-master-1] failed to read local state, exiting...\r\njava.lang.ClassCastException: org.elasticsearch.cluster.metadata.AliasOrIndex$Index cannot be cast to org.elasticsearch.cluster.metadata.AliasOrIndex$Alias\r\n\tat org.elasticsearch.cluster.metadata.MetaData$Builder.build(MetaData.java:1008)\r\n\tat org.elasticsearch.gateway.MetaStateService.loadFullState(MetaStateService.java:104)\r\n\tat org.elasticsearch.gateway.GatewayMetaState.loadMetaState(GatewayMetaState.java:97)\r\n\tat org.elasticsearch.gateway.GatewayMetaState.pre20Upgrade(GatewayMetaState.java:223)\r\n\tat org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:85)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:526)\r\n\tat org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:56)\r\n\tat org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)\r\n\tat org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:104)\r\n\tat org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)\r\n\tat org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:865)\r\n\tat org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)\r\n\tat org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)\r\n\tat org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:46)\r\n\tat org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)\r\n\tat org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)\r\n\tat org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)\r\n\tat org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:104)\r\n\tat org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)\r\n\tat org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:865)\r\n\tat org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)\r\n\tat org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)\r\n\tat org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:46)\r\n\tat org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)\r\n\tat org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)\r\n\tat org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)\r\n\tat org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:104)\r\n\tat org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)\r\n\tat org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:865)\r\n\tat org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)\r\n\tat org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)\r\n\tat org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:46)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:201)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)\r\n\tat org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:858)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)\r\n\tat org.elasticsearch.common.inject.Guice.createInjector(Guice.java:93)\r\n\tat org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)\r\n\tat org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:47)\r\n\tat org.elasticsearch.node.Node.<init>(Node.java:198)\r\n\tat org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)\r\n\tat org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170)\r\n\tat org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)\r\n\tat org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)\r\n[2015-11-12 11:50:12,770][ERROR][gateway                  ] [cubitsearch-master-1] failed to read local state, exiting...\r\njava.lang.ClassCastException: org.elasticsearch.cluster.metadata.AliasOrIndex$Index cannot be cast to org.elasticsearch.cluster.metadata.AliasOrIndex$Alias\r\n\tat org.elasticsearch.cluster.metadata.MetaData$Builder.build(MetaData.java:1008)\r\n\tat org.elasticsearch.gateway.MetaStateService.loadFullState(MetaStateService.java:104)\r\n\tat org.elasticsearch.gateway.GatewayMetaState.loadMetaState(GatewayMetaState.java:97)\r\n\tat org.elasticsearch.gateway.GatewayMetaState.pre20Upgrade(GatewayMetaState.java:223)\r\n\tat org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:85)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:526)\r\n\tat org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:56)\r\n\tat org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)\r\n\tat org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:104)\r\n\tat org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)\r\n\tat org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:865)\r\n\tat org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)\r\n\tat org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)\r\n\tat org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:46)\r\n\tat org.elasticsearch.common.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)\r\n\tat org.elasticsearch.common.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)\r\n\tat org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:85)\r\n\tat org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:104)\r\n\tat org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)\r\n\tat org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:865)\r\n\tat org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)\r\n\tat org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)\r\n\tat org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:46)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:201)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)\r\n\tat org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:858)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)\r\n\tat org.elasticsearch.common.inject.Guice.createInjector(Guice.java:93)\r\n\tat org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)\r\n\tat org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:47)\r\n\tat org.elasticsearch.node.Node.<init>(Node.java:198)\r\n\tat org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)\r\n\tat org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170)\r\n\tat org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)\r\n\tat org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)\r\n[2015-11-12 11:50:14,300][ERROR][gateway                  ] [cubitsearch-master-1] failed to read local state, exiting...\r\njava.lang.ClassCastException: org.elasticsearch.cluster.metadata.AliasOrIndex$Index cannot be cast to org.elasticsearch.cluster.metadata.AliasOrIndex$Alias\r\n\tat org.elasticsearch.cluster.metadata.MetaData$Builder.build(MetaData.java:1008)\r\n\tat org.elasticsearch.gateway.MetaStateService.loadFullState(MetaStateService.java:104)\r\n\tat org.elasticsearch.gateway.GatewayMetaState.loadMetaState(GatewayMetaState.java:97)\r\n\tat org.elasticsearch.gateway.GatewayMetaState.pre20Upgrade(GatewayMetaState.java:223)\r\n\tat org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:85)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:526)\r\n\tat org.elasticsearch.common.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:56)\r\n\tat org.elasticsearch.common.inject.ConstructorInjector.construct(ConstructorInjector.java:86)\r\n\tat org.elasticsearch.common.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:104)\r\n\tat org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:47)\r\n\tat org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:865)\r\n\tat org.elasticsearch.common.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:43)\r\n\tat org.elasticsearch.common.inject.Scopes$1$1.get(Scopes.java:59)\r\n\tat org.elasticsearch.common.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:46)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:201)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder$1.call(InjectorBuilder.java:193)\r\n\tat org.elasticsearch.common.inject.InjectorImpl.callInContext(InjectorImpl.java:858)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder.loadEagerSingletons(InjectorBuilder.java:193)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:175)\r\n\tat org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)\r\n\tat org.elasticsearch.common.inject.Guice.createInjector(Guice.java:93)\r\n\tat org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)\r\n\tat org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:47)\r\n\tat org.elasticsearch.node.Node.<init>(Node.java:198)\r\n\tat org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)\r\n\tat org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170)\r\n\tat org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)\r\n\tat org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)\r\nException in thread \"main\" java.lang.ClassCastException: org.elasticsearch.cluster.metadata.AliasOrIndex$Index cannot be cast to org.elasticsearch.cluster.metadata.AliasOrIndex$Alias\r\n\tat org.elasticsearch.cluster.metadata.MetaData$Builder.build(MetaData.java:1008)\r\n\tat org.elasticsearch.gateway.MetaStateService.loadFullState(MetaStateService.java:104)\r\n\tat org.elasticsearch.gateway.GatewayMetaState.loadMetaState(GatewayMetaState.java:97)\r\n\tat org.elasticsearch.gateway.GatewayMetaState.pre20Upgrade(GatewayMetaState.java:223)\r\n\tat org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:85)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)\r\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:526)\r\n\tat <<<guice>>>\r\n\tat org.elasticsearch.node.Node.<init>(Node.java:198)\r\n\tat org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)\r\n\tat org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170)\r\n\tat org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)\r\n\tat org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)\r\n```"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/157776609","html_url":"https://github.com/elastic/elasticsearch/issues/14706#issuecomment-157776609","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/14706","id":157776609,"user":{"login":"krisb78","id":222033,"avatar_url":"https://avatars.githubusercontent.com/u/222033?v=3","gravatar_id":"","url":"https://api.github.com/users/krisb78","html_url":"https://github.com/krisb78","followers_url":"https://api.github.com/users/krisb78/followers","following_url":"https://api.github.com/users/krisb78/following{/other_user}","gists_url":"https://api.github.com/users/krisb78/gists{/gist_id}","starred_url":"https://api.github.com/users/krisb78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krisb78/subscriptions","organizations_url":"https://api.github.com/users/krisb78/orgs","repos_url":"https://api.github.com/users/krisb78/repos","events_url":"https://api.github.com/users/krisb78/events{/privacy}","received_events_url":"https://api.github.com/users/krisb78/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T16:53:10Z","updated_at":"2015-11-18T16:53:10Z","body":"Hm, I see your point...\r\n\r\nI'll check if renaming these aliases fixes the issue."}}