Hi Jorg,
I changed the Cluster name and Node name, but still i get error
SendRequestTransportException
Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name",
"prbmanCluster").put("node.name",
"PrbmanNode").put("transport.tcp.connect_timeout", "1000").build();
Client client = new TransportClient(settings).addTransportAddress(new
InetSocketTransportAddress("BLRD17730", 9300));
After the above changes i get below error
14:34:28,516 INFO [transport] [PrbmanNode] failed to get node info for
[#transport#-1][BLRD17730][inet[BLRD17730/172.22.220.125:9300]],
disconnecting...
java.lang.NoClassDefFoundError:
org/elasticsearch/transport/SendRequestTransportException
at
org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:213)
at
org.elasticsearch.transport.TransportService.submitRequest(TransportService.java:177)
at
org.elasticsearch.client.transport.TransportClientNodesService$SimpleNodeSampler.doSample(TransportClientNodesService.java:349)
at
org.elasticsearch.client.transport.TransportClientNodesService$NodeSampler.sample(TransportClientNodesService.java:288)
at
org.elasticsearch.client.transport.TransportClientNodesService$ScheduledNodeSampler.run(TransportClientNodesService.java:321)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Thanks,
Vijaya
On Wednesday, December 31, 2014 6:58:56 PM UTC+5:30, Jörg Prante wrote:
>
> Do you still get "Illegal access: this web application instance has been
> stopped already" ?
>
> If so, you still have a double close problem on the web app management
> layer,not ES. The problem is hard to solve without more info about specific
> container configuration. Without Spring, I do not have errors in JBoss.
>
> Jörg
>
> On Wed, Dec 31, 2014 at 1:15 PM, Vijayakumari B N <[email protected]
> <javascript:>> wrote:
>
>> Hi David/Jorg,
>>
>> I am using elastic server 1.4.1 version. I tried both using the default
>> cluster and below cluster. both throwing same exceptions on starting jboss
>> server, but search works fine.
>>
>>
>> Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name",
>> "prbman").build();
>> client = new TransportClient(settings).addTransportAddress(new
>> InetSocketTransportAddress("amadeus.com", 9300));
>>
>> Thanks,
>> Vijaya
>>
>> On Wednesday, December 31, 2014 5:19:21 PM UTC+5:30, Jörg Prante wrote:
>>>
>>> From the code, it is not clear what cluster name is set in the settings.
>>> Using just new TransportClient() tries to connect to localhost port 9300
>>> with cluster name "elasticsearch", which is not correct in most custom
>>> environment.
>>>
>>> Please check if cluster name setting is correct.
>>>
>>> Jörg
>>>
>>> On Wed, Dec 31, 2014 at 11:25 AM, Vijayakumari B N <[email protected]
>>> > wrote:
>>>
>>>> Hi Joerge,
>>>>
>>>> I have overridden Spring ContextLoadListener and tried to close the
>>>> client instance on context destroyed, but i still get the same error.
>>>>
>>>>
>>>> MyAppContextLoadListener
>>>> @Override
>>>> public void contextInitialized(ServletContextEvent event) {
>>>> super.contextInitialized(event);
>>>> log.debug("My web app Loaded.......");
>>>>
>>>> // You can get Servelte Context
>>>> ServletContext servletContect = event.getServletContext();
>>>>
>>>> WebApplicationContext webApplicationContext =
>>>> WebApplicationContextUtils.getRequiredWebApplicationConte
>>>> xt(servletContect);
>>>>
>>>> // You can get any bean, which is defined in spring xml file here.
>>>> ESClient esclient = ESClient.getInstance();
>>>> client = esclient.getClient();
>>>> }
>>>>
>>>> @Override
>>>> public void contextDestroyed(ServletContextEvent event) {
>>>> super.contextDestroyed(event);
>>>> client.close();
>>>> }
>>>>
>>>> I made ESClient.java singleton as below
>>>>
>>>>
>>>> public class ESClient {
>>>> private Client client = null;
>>>> private static ESClient esClient = null;
>>>> /**
>>>> *
>>>> */
>>>> private ESClient() {
>>>> if (client == null) {
>>>> /*Settings settings = ImmutableSettings.settingsBuilder().put("
>>>> transport.tcp.connect_timeout", "1000").build();
>>>> client = new TransportClient(settings).addTransportAddress(new
>>>> InetSocketTransportAddress("127.0.0.1", 9300)); */
>>>> client = new TransportClient().addTransportAddress(new
>>>> InetSocketTransportAddress("127.0.0.1", 9300));
>>>> }
>>>> }
>>>> public static ESClient getInstance( ) {
>>>> if(esClient==null) {
>>>> esClient = new ESClient();
>>>> }
>>>> return esClient;
>>>> }
>>>>
>>>> public Client getClient() {
>>>> return client;
>>>> }
>>>> }
>>>>
>>>> But i still get error saying
>>>>
>>>> 15:54:02,460 INFO [transport] [Tyr] failed to get node info for
>>>> [#transport#-1][BLRD17730][inet[/127.0.0.1:9300]], disconnecting...
>>>> java.lang.NoClassDefFoundError: org/elasticsearch/transport/
>>>> SendRequestTransportException
>>>>
>>>> Please let me know if i am doing anything wrong.
>>>>
>>>> Thanks,
>>>> Vijaya
>>>>
>>>> On Wednesday, December 24, 2014 6:21:21 PM UTC+5:30, Jörg Prante wrote:
>>>>>
>>>>> I recommend ServletContextListener for the client instance.
>>>>>
>>>>> Jörg
>>>>>
>>>>> On Wed, Dec 24, 2014 at 9:14 AM, Vijayakumari B N <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> Hi Jorg,
>>>>>>
>>>>>> I am not using ServletContextListener for client instance. I have
>>>>>> shared the code above for creating client. But i am not closing the
>>>>>> client.
>>>>>> I tried closing the client that did not make any difference.
>>>>>>
>>>>>> Thanks,
>>>>>> Vijaya
>>>>>>
>>>>>> On Tuesday, December 23, 2014 10:27:13 PM UTC+5:30, Jörg Prante wrote:
>>>>>>>
>>>>>>> JBoss performed a double close in concurrency to ES which actually
>>>>>>> was still active in closing down itself. Check if you are using a
>>>>>>> ServletContextListener for the client instance. There are
>>>>>>> contextInitialized()/contextDestroyed() methods which are called
>>>>>>> by JBoss exactly once during the life cycle of a web application.
>>>>>>>
>>>>>>> Jörg
>>>>>>>
>>>>>>> On Tue, Dec 23, 2014 at 3:09 PM, vineeth mohan <[email protected]
>>>>>>> > wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Hope you are using maven or else there are hell lot of dependent
>>>>>>>> jars you have to include yourself.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Vineeth
>>>>>>>> On Dec 23, 2014 4:54 PM, "Vijayakumari B N" <[email protected]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> I used only one jar for elasticsearch i.e.
>>>>>>>>> elasticsearch-1.4.1.jar, i don't think we need any other jars apart
>>>>>>>>> from
>>>>>>>>> this and my elastic server is also running. Please let me know if
>>>>>>>>> there are
>>>>>>>>> any additional jars which i need to add.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Vijaya
>>>>>>>>>
>>>>>>>>> On Tuesday, December 23, 2014 2:38:43 PM UTC+5:30, vineeth mohan
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> Hi ,
>>>>>>>>>>
>>>>>>>>>> Make sure all the dependent JAR files are present.
>>>>>>>>>> Its missing some of these.
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>> Vineeth
>>>>>>>>>>
>>>>>>>>>> On Tue, Dec 23, 2014 at 11:15 AM, Vijayakumari B N <
>>>>>>>>>> [email protected]> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> I get the below error when i tried to restart my jboss server
>>>>>>>>>>> after integrating with elastic server. I am using elastic search
>>>>>>>>>>> 1.4
>>>>>>>>>>> version. Can some one let me know where i am doing wrong. Elastic
>>>>>>>>>>> server
>>>>>>>>>>> absolutely work fine apart from below error.
>>>>>>>>>>>
>>>>>>>>>>> public static Client getESClient() {
>>>>>>>>>>> if (esClient == null) {
>>>>>>>>>>> Client esClient = new TransportClient().addTransportAddress(new
>>>>>>>>>>> InetSocketTransportAddress("127.0.0.1", 9300));
>>>>>>>>>>> return esClient;
>>>>>>>>>>> }
>>>>>>>>>>> return esClient;
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> 2014-12-23 10:44:46,933 INFO
>>>>>>>>>>> [org.apache.catalina.loader.WebappClassLoader]
>>>>>>>>>>> Illegal access: this web application instance has been stopped
>>>>>>>>>>> already.
>>>>>>>>>>> Could not load org.elasticsearch.transport.Se
>>>>>>>>>>> ndRequestTransportException. The eventual following stack
>>>>>>>>>>> trace is caused by an error thrown for debugging purposes as well
>>>>>>>>>>> as to
>>>>>>>>>>> attempt to terminate the thread which caused the illegal access,
>>>>>>>>>>> and has no
>>>>>>>>>>> functional impact.
>>>>>>>>>>> java.lang.IllegalStateException
>>>>>>>>>>> at org.apache.catalina.loader.WebappClassLoader.loadClass(Webap
>>>>>>>>>>> pClassLoader.java:1244)
>>>>>>>>>>> at org.apache.catalina.loader.WebappClassLoader.loadClass(Webap
>>>>>>>>>>> pClassLoader.java:1204)
>>>>>>>>>>> at org.elasticsearch.transport.TransportService.sendRequest(Tra
>>>>>>>>>>> nsportService.java:213)
>>>>>>>>>>> at org.elasticsearch.transport.TransportService.submitRequest(T
>>>>>>>>>>> ransportService.java:177)
>>>>>>>>>>> at org.elasticsearch.client.transport.TransportClientNodesServi
>>>>>>>>>>> ce$SimpleNodeSampler.doSample(TransportClientNodesService.ja
>>>>>>>>>>> va:349)
>>>>>>>>>>> at org.elasticsearch.client.transport.TransportClientNodesServi
>>>>>>>>>>> ce$NodeSampler.sample(TransportClientNodesService.java:288)
>>>>>>>>>>> at org.elasticsearch.client.transport.TransportClientNodesServi
>>>>>>>>>>> ce$ScheduledNodeSampler.run(TransportClientNodesService.java
>>>>>>>>>>> :321)
>>>>>>>>>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>>>>>>>>>> Executor.java:1145)
>>>>>>>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>>>>>>>>>> lExecutor.java:615)
>>>>>>>>>>> at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>>> 2014-12-23 10:44:46,935 INFO [org.elasticsearch.client.transport]
>>>>>>>>>>> [Hammerhead] failed to get node info for [#transport#-1][BLRD17730][
>>>>>>>>>>> inet[/127.0.0.1:9300]], disconnecting...
>>>>>>>>>>> java.lang.NoClassDefFoundError: org/elasticsearch/transport/Se
>>>>>>>>>>> ndRequestTransportException
>>>>>>>>>>> at org.elasticsearch.transport.TransportService.sendRequest(Tra
>>>>>>>>>>> nsportService.java:213)
>>>>>>>>>>> at org.elasticsearch.transport.TransportService.submitRequest(T
>>>>>>>>>>> ransportService.java:177)
>>>>>>>>>>> at org.elasticsearch.client.transport.TransportClientNodesServi
>>>>>>>>>>> ce$SimpleNodeSampler.doSample(TransportClientNodesService.ja
>>>>>>>>>>> va:349)
>>>>>>>>>>> at org.elasticsearch.client.transport.TransportClientNodesServi
>>>>>>>>>>> ce$NodeSampler.sample(TransportClientNodesService.java:288)
>>>>>>>>>>> at org.elasticsearch.client.transport.TransportClientNodesServi
>>>>>>>>>>> ce$ScheduledNodeSampler.run(TransportClientNodesService.java
>>>>>>>>>>> :321)
>>>>>>>>>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>>>>>>>>>> Executor.java:1145)
>>>>>>>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>>>>>>>>>> lExecutor.java:615)
>>>>>>>>>>> at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>>> Caused by: java.lang.ClassNotFoundException:
>>>>>>>>>>> org.elasticsearch.transport.SendRequestTransportException
>>>>>>>>>>> at org.apache.catalina.loader.WebappClassLoader.loadClass(Webap
>>>>>>>>>>> pClassLoader.java:1358)
>>>>>>>>>>> at org.apache.catalina.loader.WebappClassLoader.loadClass(Webap
>>>>>>>>>>> pClassLoader.java:1204)
>>>>>>>>>>> ... 8 more
>>>>>>>>>>> 2014-12-23 10:44:46,943 INFO
>>>>>>>>>>> [org.apache.catalina.loader.WebappClassLoader]
>>>>>>>>>>> Illegal access: this web application instance has been stopped
>>>>>>>>>>> already.
>>>>>>>>>>> Could not load org.elasticsearch.common.netty.channel.Channels$4.
>>>>>>>>>>> The eventual following stack trace is caused by an error thrown for
>>>>>>>>>>> debugging purposes as well as to attempt to terminate the thread
>>>>>>>>>>> which
>>>>>>>>>>> caused the illegal access, and has no functional impact.
>>>>>>>>>>> java.lang.IllegalStateException
>>>>>>>>>>> at org.apache.catalina.loader.WebappClassLoader.loadClass(Webap
>>>>>>>>>>> pClassLoader.java:1244)
>>>>>>>>>>> at org.apache.catalina.loader.WebappClassLoader.loadClass(Webap
>>>>>>>>>>> pClassLoader.java:1204)
>>>>>>>>>>> at org.elasticsearch.common.netty.channel.Channels.fireChannelD
>>>>>>>>>>> isconnectedLater(Channels.java:383)
>>>>>>>>>>> at org.elasticsearch.common.netty.channel.socket.nio.AbstractNi
>>>>>>>>>>> oWorker.close(AbstractNioWorker.java:362)
>>>>>>>>>>> at org.elasticsearch.common.netty.channel.socket.nio.NioClientS
>>>>>>>>>>> ocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:58)
>>>>>>>>>>> at org.elasticsearch.common.netty.channel.DefaultChannelPipelin
>>>>>>>>>>> e.sendDownstream(DefaultChannelPipeline.java:574)
>>>>>>>>>>> at org.elasticsearch.common.netty.channel.Channels.close(Channe
>>>>>>>>>>> ls.java:812)
>>>>>>>>>>> at org.elasticsearch.common.netty.channel.AbstractChannel.close
>>>>>>>>>>> (AbstractChannel.java:197)
>>>>>>>>>>> at org.elasticsearch.transport.netty.NettyTransport$NodeChannel
>>>>>>>>>>> s.closeChannelsAndWait(NettyTransport.java:1107)
>>>>>>>>>>> at org.elasticsearch.transport.netty.NettyTransport$NodeChannel
>>>>>>>>>>> s.close(NettyTransport.java:1093)
>>>>>>>>>>> at org.elasticsearch.transport.netty.NettyTransport.disconnectF
>>>>>>>>>>> romNode(NettyTransport.java:883)
>>>>>>>>>>> at org.elasticsearch.transport.TransportService.disconnectFromN
>>>>>>>>>>> ode(TransportService.java:158)
>>>>>>>>>>> at org.elasticsearch.client.transport.TransportClientNodesServi
>>>>>>>>>>> ce$SimpleNodeSampler.doSample(TransportClientNodesService.ja
>>>>>>>>>>> va:372)
>>>>>>>>>>> at org.elasticsearch.client.transport.TransportClientNodesServi
>>>>>>>>>>> ce$NodeSampler.sample(TransportClientNodesService.java:288)
>>>>>>>>>>> at org.elasticsearch.client.transport.TransportClientNodesServi
>>>>>>>>>>> ce$ScheduledNodeSampler.run(TransportClientNodesService.java
>>>>>>>>>>> :321)
>>>>>>>>>>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPool
>>>>>>>>>>> Executor.java:1145)
>>>>>>>>>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo
>>>>>>>>>>> lExecutor.java:615)
>>>>>>>>>>> at java.lang.Thread.run(Thread.java:745)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>> Vijaya
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>>>> Google Groups "elasticsearch" group.
>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>>>>>> it, send an email to [email protected].
>>>>>>>>>>> To view this discussion on the web visit
>>>>>>>>>>> https://groups.google.com/d/msgid/elasticsearch/dcba912a-787
>>>>>>>>>>> 8-4397-a203-401c31e5bb24%40googlegroups.com
>>>>>>>>>>> <https://groups.google.com/d/msgid/elasticsearch/dcba912a-7878-4397-a203-401c31e5bb24%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>>>> .
>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>>> Groups "elasticsearch" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>>> send an email to [email protected].
>>>>>>>>> To view this discussion on the web visit
>>>>>>>>> https://groups.google.com/d/msgid/elasticsearch/d515aa3c-feb
>>>>>>>>> e-4a03-a8d5-5f175c08e8fa%40googlegroups.com
>>>>>>>>> <https://groups.google.com/d/msgid/elasticsearch/d515aa3c-febe-4a03-a8d5-5f175c08e8fa%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>> .
>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "elasticsearch" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to [email protected].
>>>>>>>> To view this discussion on the web visit
>>>>>>>> https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nL-vo
>>>>>>>> hpRe7eW5FoakPAu_c3xHAk1Z59Z%3D5v%3DZgpsX5Ag%40mail.gmail.com
>>>>>>>> <https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nL-vohpRe7eW5FoakPAu_c3xHAk1Z59Z%3D5v%3DZgpsX5Ag%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "elasticsearch" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to [email protected].
>>>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>>>> msgid/elasticsearch/b9b2a6ec-9149-40a1-83e1-404ed9bb5b2f%40goo
>>>>>> glegroups.com
>>>>>> <https://groups.google.com/d/msgid/elasticsearch/b9b2a6ec-9149-40a1-83e1-404ed9bb5b2f%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "elasticsearch" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit https://groups.google.com/d/
>>>> msgid/elasticsearch/22b07930-a8f1-4a24-a73e-5b77a02183b2%
>>>> 40googlegroups.com
>>>> <https://groups.google.com/d/msgid/elasticsearch/22b07930-a8f1-4a24-a73e-5b77a02183b2%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/07402bf8-5ed0-4e5a-8e1e-27f110c2f77e%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/elasticsearch/07402bf8-5ed0-4e5a-8e1e-27f110c2f77e%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/7c8205b5-4f87-481f-bb84-1d4984f711bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.