{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/18996","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18996/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18996/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18996/events","html_url":"https://github.com/elastic/elasticsearch/issues/18996","id":161425098,"number":18996,"title":"TransportClient's ClusterStatsResponse deserialization failing within JBoss 6.1 (new issue in 5.0.0-alpha3)","user":{"login":"fassisrosa","id":17320639,"avatar_url":"https://avatars.githubusercontent.com/u/17320639?v=3","gravatar_id":"","url":"https://api.github.com/users/fassisrosa","html_url":"https://github.com/fassisrosa","followers_url":"https://api.github.com/users/fassisrosa/followers","following_url":"https://api.github.com/users/fassisrosa/following{/other_user}","gists_url":"https://api.github.com/users/fassisrosa/gists{/gist_id}","starred_url":"https://api.github.com/users/fassisrosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fassisrosa/subscriptions","organizations_url":"https://api.github.com/users/fassisrosa/orgs","repos_url":"https://api.github.com/users/fassisrosa/repos","events_url":"https://api.github.com/users/fassisrosa/events{/privacy}","received_events_url":"https://api.github.com/users/fassisrosa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"jasontedor","id":4744941,"avatar_url":"https://avatars.githubusercontent.com/u/4744941?v=3","gravatar_id":"","url":"https://api.github.com/users/jasontedor","html_url":"https://github.com/jasontedor","followers_url":"https://api.github.com/users/jasontedor/followers","following_url":"https://api.github.com/users/jasontedor/following{/other_user}","gists_url":"https://api.github.com/users/jasontedor/gists{/gist_id}","starred_url":"https://api.github.com/users/jasontedor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasontedor/subscriptions","organizations_url":"https://api.github.com/users/jasontedor/orgs","repos_url":"https://api.github.com/users/jasontedor/repos","events_url":"https://api.github.com/users/jasontedor/events{/privacy}","received_events_url":"https://api.github.com/users/jasontedor/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2016-06-21T12:34:45Z","updated_at":"2016-06-21T17:00:24Z","closed_at":"2016-06-21T15:14:48Z","body":"Within JBoss 6.1, calling TransportClient::admin().cluster().prepareClusterStats().get() breaks in 5.0.0-alpha3, used to work fine in 5.0.0-alpha2\r\n\r\n**Elasticsearch version**: 5.0.0-alpha3\r\n\r\n**JVM version**: 1.8.0_92\r\n\r\n**OS version**: Windows 2012 R2\r\n\r\n**Description of the problem including expected versus actual behavior**:\r\n\r\nWe are using TransportClient within JBoss 6.1.\r\n\r\nIn 5.0.0-alpha2 we were able to make the following call:\r\n\r\n\tClusterStatsResponse clusterStatsResponse = client.admin().cluster().prepareClusterStats().get();\r\n\r\nNow when we do the same call in 5.0.0-alpha3 we are getting the following exception:\r\n\r\n\tjava.nio.file.FileSystemNotFoundException: Provider \"vfs\" not installed\r\n\r\n\r\n**Steps to reproduce**:\r\n 1. Have the call to TransportClient::admin().cluster().prepareClusterStats().get() within JBoss 6.1\r\n \r\n\r\n**Provide logs (if relevant)**: Full exception from logs (only client side, not errors on elasticsearch side):\r\n\r\nTransportSerializationException[Failed to deserialize response of type [org.elasticsearch.action.admin.cluster.stats.ClusterStatsResponse]]; nested: ExceptionInInitializerError; nested: FileSystemNotFoundException[Provider \"vfs\" not installed];\r\n\tat org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:172)\r\n\tat org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:143)\r\n\tat org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)\r\n\tat org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)\r\n\tat org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)\r\n\tat org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)\r\n\tat org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:310)\r\n\tat org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)\r\n\tat org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)\r\n\tat org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)\r\n\tat org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)\r\n\tat org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)\r\n\tat org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)\r\n\tat org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)\r\n\tat org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)\r\n\tat org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n\tat java.lang.Thread.run(Thread.java:745)\r\nCaused by: java.lang.ExceptionInInitializerError\r\n\tat org.elasticsearch.action.admin.cluster.node.info.NodeInfo.readFrom(NodeInfo.java:199)\r\n\tat org.elasticsearch.action.admin.cluster.node.info.NodeInfo.readNodeInfo(NodeInfo.java:191)\r\n\tat org.elasticsearch.action.admin.cluster.stats.ClusterStatsNodeResponse.readFrom(ClusterStatsNodeResponse.java:85)\r\n\tat org.elasticsearch.action.admin.cluster.stats.ClusterStatsNodeResponse.readNodeResponse(ClusterStatsNodeResponse.java:74)\r\n\tat org.elasticsearch.common.io.stream.StreamInput.readList(StreamInput.java:769)\r\n\tat org.elasticsearch.action.admin.cluster.stats.ClusterStatsResponse.readNodesFrom(ClusterStatsResponse.java:102)\r\n\tat org.elasticsearch.action.support.nodes.BaseNodesResponse.readFrom(BaseNodesResponse.java:110)\r\n\tat org.elasticsearch.action.admin.cluster.stats.ClusterStatsResponse.readFrom(ClusterStatsResponse.java:85)\r\n\tat org.elasticsearch.transport.netty.MessageChannelHandler.handleResponse(MessageChannelHandler.java:169)\r\n\t... 23 more\r\nCaused by: java.nio.file.FileSystemNotFoundException: Provider \"vfs\" not installed\r\n\tat java.nio.file.Paths.get(Paths.java:147)\r\n\tat org.elasticsearch.common.io.PathUtils.get(PathUtils.java:75)\r\n\tat org.elasticsearch.Build.getElasticsearchCodebase(Build.java:87)\r\n\tat org.elasticsearch.Build.<clinit>(Build.java:50)\r\n\t... 32 more\r\n\r\n\r\n**Describe the feature**:\r\n\r\nLooks like some changes were made into alpha3 in the way the ClusterStatsResponse object is deserialized, this is impacting our client usage within JBoss 6.1.\r\n\r\nDetails of cause of issue:\r\n\r\n+) Making the call to getting ClusterStatsResponse, elasticsearch server returns stream that needs to be deserialized into ClusterStatsResponse.\r\n+) ClusterStatsResponse inherits from BaseNodesResponse.\r\n+) readFrom method in BaseNodesResponse now has a call to 'readNodesFrom' (line 110 of BaseNodesResponse, alpha3 tag).\r\n+) 'readNodesFrom' in ClusterStatsResponse calls readNodeResponse (line 102 of ClusterStatsResponse, alpha3 tag).\r\n+) Eventually call makes it to ClusterStatsNodeResponse::readFrom, taht class NodeInfo.readNodeInfo (line 85 of ClusterStatsNodeResponse, alpha3 tag).\r\n+) NodeInfo::readNodeInfo ends up calling NodeInfo::readFrom which calls Build.readBuild (line 199 of NodeInfo, alpha 3 tag).\r\n+) Calling Build.readBuild forces the Build class static block to be executed to populate 'CURRENT'.\r\n+) The code in getElasticsearchCodebase uses java nio (see lines 85-87 of Build, alpha3 tag). The URL returned within JBoss 6.1 is 'vfs://'.\r\n*) There is no file system provider for 'vfs://' so exception is thrown.\r\n\r\n\r\nThis use is only for client, which probably does not care much for Build.CURRENT anyway? \r\nCould this code be changed to either lazily calculate 'CURRRENT' or to set it to 'Unknown' if an exception is thrown attempting\r\nto call 'getLeasticsearchCodebase' (probably better as we cannot really calculate the current build with current code)? \r\nAs it stands, this code cannot be used within JBoss 6.1.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/227504116","html_url":"https://github.com/elastic/elasticsearch/issues/18996#issuecomment-227504116","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/18996","id":227504116,"user":{"login":"fassisrosa","id":17320639,"avatar_url":"https://avatars.githubusercontent.com/u/17320639?v=3","gravatar_id":"","url":"https://api.github.com/users/fassisrosa","html_url":"https://github.com/fassisrosa","followers_url":"https://api.github.com/users/fassisrosa/followers","following_url":"https://api.github.com/users/fassisrosa/following{/other_user}","gists_url":"https://api.github.com/users/fassisrosa/gists{/gist_id}","starred_url":"https://api.github.com/users/fassisrosa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fassisrosa/subscriptions","organizations_url":"https://api.github.com/users/fassisrosa/orgs","repos_url":"https://api.github.com/users/fassisrosa/repos","events_url":"https://api.github.com/users/fassisrosa/events{/privacy}","received_events_url":"https://api.github.com/users/fassisrosa/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T17:00:24Z","updated_at":"2016-06-21T17:00:24Z","body":"No worries on JBCL-177. The trailing '/' does not impact me at all... it does generate the 'Unknown' but I can live with it for now. Avoiding the 'vfs' provider issue does it.\r\n\r\nWhatever you can do to make it to product is really appreciated. :)\r\n"}}
{"actor":{"display_login":"fassisrosa"}}