New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.4.3] IndexNotFoundException[no such index ] #27003

Closed
JaydenRansom opened this Issue Oct 13, 2017 · 4 comments

Comments

Projects
None yet
5 participants
@JaydenRansom

JaydenRansom commented Oct 13, 2017

1.My elasticsearch version is 5.4.3.
When i tried to add a alise on an exist index through Java API like below:

client.admin().indices().prepareAliases().addAlias(index, alias).execute().actionGet();

It reported:

[my-index
] IndexNotFoundException[no such index
]
	at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.infe(IndexNameExpressionResolver.java:668)
	at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.innerResolve(IndexNameExpressionResolver.java:625)
	at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver$WildcardExpressionResolver.resolve(IndexNameExpressionResolver.java:575)
	at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndices(IndexNameExpressionResolver.java:165)
	at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndexNames(IndexNameExpressionResolver.java:140)
	at org.elasticsearch.cluster.metadata.IndexNameExpressionResolver.concreteIndexNames(IndexNameExpressionResolver.java:100)
	at org.elasticsearch.action.admin.indices.alias.TransportIndicesAliasesAction.masterOperation(TransportIndicesAliasesAction.java:95)
	at org.elasticsearch.action.admin.indices.alias.TransportIndicesAliasesAction.masterOperation(TransportIndicesAliasesAction.java:51)
	at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:87)
	at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$2.doRun(TransportMasterNodeAction.java:166)
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
	at org.elasticsearch.common.util.concurrent.EsExecutors$1.execute(EsExecutors.java:110)
	at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.doStart(TransportMasterNodeAction.java:163)
	at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.start(TransportMasterNodeAction.java:126)
	at org.elasticsearch.action.support.master.TransportMasterNodeAction.doExecute(TransportMasterNodeAction.java:104)
	at org.elasticsearch.action.support.master.TransportMasterNodeAction.doExecute(TransportMasterNodeAction.java:54)
	at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:170)
	at com.jd.jr.jes.elasticsearch.plugins.handler.BaseHandler.doChain(BaseHandler.java:126)
	at com.jd.jr.jes.elasticsearch.plugins.handler.BaseHandler.doRequest(BaseHandler.java:55)
	at com.jd.jr.jes.elasticsearch.plugins.JesSecurityPlugin$JesMonitorActionFilter.apply(JesSecurityPlugin.java:235)
	at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:168)
	at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:142)
	at org.elasticsearch.action.support.HandledTransportAction$TransportHandler.messageReceived(HandledTransportAction.java:64)
	at org.elasticsearch.action.support.HandledTransportAction$TransportHandler.messageReceived(HandledTransportAction.java:54)
	at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69)
	at org.elasticsearch.transport.TcpTransport$RequestHandler.doRun(TcpTransport.java:1555)
	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
	at org.elasticsearch.common.util.concurrent.EsExecutors$1.execute(EsExecutors.java:110)
	at org.elasticsearch.transport.TcpTransport.handleRequest(TcpTransport.java:1512)
	at org.elasticsearch.transport.TcpTransport.messageReceived(TcpTransport.java:1396)
	at org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:74)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:297)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:413)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:134)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:544)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
	at java.lang.Thread.run(Thread.java:745)

I can find the index within http://host:9200/_cat/indices.
Thanks for your help.

@hub-cap hub-cap self-assigned this Oct 17, 2017

@hub-cap

This comment has been minimized.

Show comment
Hide comment
@hub-cap

hub-cap Oct 23, 2017

Contributor

Hi, Id like to investigate a bit more to see if this is a bug. Can you give me a little more information with the code that does the alias creation? Does this index already exist, or are you creating it in the code as well? If you are creating it, then please post as much of that code as well.

If this is an existing index, I would like to know what the values of the strings in the above snippet for the index and alias variables, just to remove anything funky.

Can you show the output of _cat/indices and _aliases as well?

Contributor

hub-cap commented Oct 23, 2017

Hi, Id like to investigate a bit more to see if this is a bug. Can you give me a little more information with the code that does the alias creation? Does this index already exist, or are you creating it in the code as well? If you are creating it, then please post as much of that code as well.

If this is an existing index, I would like to know what the values of the strings in the above snippet for the index and alias variables, just to remove anything funky.

Can you show the output of _cat/indices and _aliases as well?

@JaydenRansom

This comment has been minimized.

Show comment
Hide comment
@JaydenRansom

JaydenRansom Nov 4, 2017

thanks, I solved it because of my mistake , it isn't a bug.

JaydenRansom commented Nov 4, 2017

thanks, I solved it because of my mistake , it isn't a bug.

@piyushkp

This comment has been minimized.

Show comment
Hide comment
@piyushkp

piyushkp Jul 3, 2018

@JaydenRansom, what was the resolution?

piyushkp commented Jul 3, 2018

@JaydenRansom, what was the resolution?

@942391815

This comment has been minimized.

Show comment
Hide comment
@942391815

942391815 Aug 31, 2018

how did you resloved it ?

942391815 commented Aug 31, 2018

how did you resloved it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment