Skip to content
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

ES 5.3.0 Crash with carriage return in indexed field #27244

Closed
TobiasHornberger opened this issue Nov 3, 2017 · 3 comments

Comments

Projects
None yet
5 participants
@TobiasHornberger
Copy link

commented Nov 3, 2017

ES 5.3.0 Crashes because of an unhandled exception from Netty when building the Warning response header with a deprecation message containing a field with a carriage return.

When indexing a message containing a field with a carriage return, such as
{ "\r_xyz": "", ... }

And with a deprecated dynamic mapping template such as
'dynamic_templates' => [{ 'string_fields' => { 'mapping' => { 'fielddata' => { 'format' => 'disabled' } , 'index' => 'analyzed', 'omit_norms' => true, 'type' => 'string', 'fields' => { 'raw' => { 'ignore_above' => 256, 'index' => 'not_analyzed', 'type' => 'string', } } } , 'match_mapping_type' => 'string', 'match' => '*' } } ], }

ES 5.3.0 crashes with the following exception:

java.lang.IllegalArgumentException: only '\n' is allowed after '\r': 299 Elasticsearch-5.3.0-3adb13b "The [string] field is deprecated, please use [text] or [keyword] instead on [^M_xyz]" "Tue, 28 Oct 2017 10:21:14 GMT"
at io.netty.handler.codec.http.DefaultHttpHeaders$HeaderValueConverterAndValidator.validateValueChar(DefaultHttpHeaders.java:454) ~[?:?]
at io.netty.handler.codec.http.DefaultHttpHeaders$HeaderValueConverterAndValidator.convertObject(DefaultHttpHeaders.java:411) ~[?:?]
at io.netty.handler.codec.http.DefaultHttpHeaders$HeaderValueConverterAndValidator.convertObject(DefaultHttpHeaders.java:402) ~[?:?]
at io.netty.handler.codec.DefaultHeaders.addObject(DefaultHeaders.java:318) ~[?:?]
at io.netty.handler.codec.http.DefaultHttpHeaders.add(DefaultHttpHeaders.java:117) ~[?:?]
at org.elasticsearch.http.netty4.Netty4HttpChannel.setHeaderField(Netty4HttpChannel.java:160) ~[?:?]
at org.elasticsearch.http.netty4.Netty4HttpChannel.setHeaderField(Netty4HttpChannel.java:155) ~[?:?]
at org.elasticsearch.http.netty4.Netty4HttpChannel.addCustomHeaders(Netty4HttpChannel.java:181) ~[?:?]
at org.elasticsearch.http.netty4.Netty4HttpChannel.sendResponse(Netty4HttpChannel.java:114) ~[?:?]
at org.elasticsearch.rest.RestController$ResourceHandlingHttpChannel.sendResponse(RestController.java:445) ~[elasticsearch-5.3.0.jar:5.3.0]

Full exception:

[ERROR][o.e.r.a.RestResponseListener] failed to send failure response
java.lang.IllegalStateException: Channel is already closed
at org.elasticsearch.rest.RestController$ResourceHandlingHttpChannel.close(RestController.java:451) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.rest.RestController$ResourceHandlingHttpChannel.sendResponse(RestController.java:444) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.rest.action.RestActionListener.onFailure(RestActionListener.java:58) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.rest.action.RestActionListener.onResponse(RestActionListener.java:49) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:88) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:84) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation$1.finishHim(TransportBulkAction.java:368) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation$1.onResponse(TransportBulkAction.java:349) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation$1.onResponse(TransportBulkAction.java:338) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:88) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:84) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.finishOnSuccess(TransportReplicationAction.java:855) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase$1.handleResponse(TransportReplicationAction.java:765) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase$1.handleResponse(TransportReplicationAction.java:751) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleResponse(TransportService.java:1025) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TransportService$DirectResponseChannel.processResponse(TransportService.java:1098) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1088) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1078) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.DelegatingTransportChannel.sendResponse(DelegatingTransportChannel.java:58) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.RequestHandlerRegistry$TransportChannelWrapper.sendResponse(RequestHandlerRegistry.java:111) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction$2.onResponse(TransportReplicationAction.java:348) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction$2.onResponse(TransportReplicationAction.java:342) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryResult.respond(TransportReplicationAction.java:414) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportWriteAction$WritePrimaryResult.respondIfPossible(TransportWriteAction.java:127) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportWriteAction$WritePrimaryResult.respond(TransportWriteAction.java:118) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction.lambda$onResponse$0(TransportReplicationAction.java:320) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:59) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.ReplicationOperation.finish(ReplicationOperation.java:305) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.ReplicationOperation.decPendingAndFinishIfNeeded(ReplicationOperation.java:286) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.ReplicationOperation.access$100(ReplicationOperation.java:55) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.ReplicationOperation$1.onResponse(ReplicationOperation.java:190) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.ReplicationOperation$1.onResponse(ReplicationOperation.java:186) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.ActionListenerResponseHandler.handleResponse(ActionListenerResponseHandler.java:46) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleResponse(TransportService.java:1025) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TcpTransport$1.doRun(TcpTransport.java:1386) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.common.util.concurrent.EsExecutors$1.execute(EsExecutors.java:109) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TcpTransport.handleResponse(TcpTransport.java:1378) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TcpTransport.messageReceived(TcpTransport.java:1347) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:74) [transport-netty4-5.3.0.jar:5.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) [netty-codec-4.1.7.Final.jar:4.1.7.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:280) [netty-codec-4.1.7.Final.jar:4.1.7.Final]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:396) [netty-codec-4.1.7.Final.jar:4.1.7.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) [netty-codec-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:527) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:481) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-common-4.1.7.Final.jar:4.1.7.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Suppressed: java.lang.IllegalArgumentException: only '\n' is allowed after '\r': 299 Elasticsearch-5.3.0-3adb13b "The [string] field is deprecated, please use [text] or [keyword] instead on [^M_xyz]" "Tue, 28 Oct 2017 10:21:14 GMT"
at io.netty.handler.codec.http.DefaultHttpHeaders$HeaderValueConverterAndValidator.validateValueChar(DefaultHttpHeaders.java:454) ~[?:?]
at io.netty.handler.codec.http.DefaultHttpHeaders$HeaderValueConverterAndValidator.convertObject(DefaultHttpHeaders.java:411) ~[?:?]
at io.netty.handler.codec.http.DefaultHttpHeaders$HeaderValueConverterAndValidator.convertObject(DefaultHttpHeaders.java:402) ~[?:?]
at io.netty.handler.codec.DefaultHeaders.addObject(DefaultHeaders.java:318) ~[?:?]
at io.netty.handler.codec.http.DefaultHttpHeaders.add(DefaultHttpHeaders.java:117) ~[?:?]
at org.elasticsearch.http.netty4.Netty4HttpChannel.setHeaderField(Netty4HttpChannel.java:160) ~[?:?]
at org.elasticsearch.http.netty4.Netty4HttpChannel.setHeaderField(Netty4HttpChannel.java:155) ~[?:?]
at org.elasticsearch.http.netty4.Netty4HttpChannel.addCustomHeaders(Netty4HttpChannel.java:181) ~[?:?]
at org.elasticsearch.http.netty4.Netty4HttpChannel.sendResponse(Netty4HttpChannel.java:114) ~[?:?]
at org.elasticsearch.rest.RestController$ResourceHandlingHttpChannel.sendResponse(RestController.java:445) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.rest.action.RestResponseListener.processResponse(RestResponseListener.java:37) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.rest.action.RestActionListener.onResponse(RestActionListener.java:47) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:88) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:84) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation$1.finishHim(TransportBulkAction.java:368) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation$1.onResponse(TransportBulkAction.java:349) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.bulk.TransportBulkAction$BulkOperation$1.onResponse(TransportBulkAction.java:338) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:88) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.TransportAction$1.onResponse(TransportAction.java:84) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase.finishOnSuccess(TransportReplicationAction.java:855) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase$1.handleResponse(TransportReplicationAction.java:765) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$ReroutePhase$1.handleResponse(TransportReplicationAction.java:751) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleResponse(TransportService.java:1025) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TransportService$DirectResponseChannel.processResponse(TransportService.java:1098) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1088) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1078) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.DelegatingTransportChannel.sendResponse(DelegatingTransportChannel.java:58) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.RequestHandlerRegistry$TransportChannelWrapper.sendResponse(RequestHandlerRegistry.java:111) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction$2.onResponse(TransportReplicationAction.java:348) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction$2.onResponse(TransportReplicationAction.java:342) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryResult.respond(TransportReplicationAction.java:414) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportWriteAction$WritePrimaryResult.respondIfPossible(TransportWriteAction.java:127) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportWriteAction$WritePrimaryResult.respond(TransportWriteAction.java:118) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction.lambda$onResponse$0(TransportReplicationAction.java:320) ~[elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:59) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.ReplicationOperation.finish(ReplicationOperation.java:305) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.ReplicationOperation.decPendingAndFinishIfNeeded(ReplicationOperation.java:286) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.ReplicationOperation.access$100(ReplicationOperation.java:55) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.ReplicationOperation$1.onResponse(ReplicationOperation.java:190) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.support.replication.ReplicationOperation$1.onResponse(ReplicationOperation.java:186) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.action.ActionListenerResponseHandler.handleResponse(ActionListenerResponseHandler.java:46) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleResponse(TransportService.java:1025) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TcpTransport$1.doRun(TcpTransport.java:1386) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.common.util.concurrent.EsExecutors$1.execute(EsExecutors.java:109) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TcpTransport.handleResponse(TcpTransport.java:1378) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.TcpTransport.messageReceived(TcpTransport.java:1347) [elasticsearch-5.3.0.jar:5.3.0]
at org.elasticsearch.transport.netty4.Netty4MessageChannelHandler.channelRead(Netty4MessageChannelHandler.java:74) [transport-netty4-5.3.0.jar:5.3.0]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) [netty-codec-4.1.7.Final.jar:4.1.7.Final]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:280) [netty-codec-4.1.7.Final.jar:4.1.7.Final]
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:396) [netty-codec-4.1.7.Final.jar:4.1.7.Final]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:248) [netty-codec-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:341) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:349) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:642) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:527) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:481) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441) [netty-transport-4.1.7.Final.jar:4.1.7.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-common-4.1.7.Final.jar:4.1.7.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]

@albertzaharovits

This comment has been minimized.

Copy link
Contributor

commented Nov 3, 2017

cmds to reproduce:

curl -v -XPUT 'localhost:9200/my_index?pretty' -H 'Content-Type: application/json' -d'
{
  "mappings": {
    "my_type": {
      "dynamic_templates": [
        {
          "string_fields": {
            "mapping": {
              "type": "string",
              "norms": "false",
              "include_in_all": "false"
            },
            "match_mapping_type": "string",
            "match": "*"
          }
        }
      ]
    }
  }
}'

curl -v -XPOST 'http://localhost:9200/my_index/my_type?pretty' -H 'Content-Type: application/json' -d '{ "field\r" : "value" }'
@jasontedor

This comment has been minimized.

Copy link
Member

commented Nov 5, 2017

I opened #27269.

@jasontedor

This comment has been minimized.

Copy link
Member

commented Nov 5, 2017

With this change, the reproduction that @albertzaharovits gives now produces:

08:48:44 [jason:~/src/elastic/elasticsearch-5.x] 5.6+ ± curl -v -XPUT 'localhost:9200/my_index?pretty' -H 'Content-Type: application/json' -d'
{
  "mappings": {
    "my_type": {
      "dynamic_templates": [
        {
          "string_fields": {
            "mapping": {
              "type": "string",
              "norms": "false",
              "include_in_all": "false"
            },
            "match_mapping_type": "string",
            "match": "*"
          }
        }
      ]
    }
  }
}'
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9200 (#0)
> PUT /my_index?pretty HTTP/1.1
> Host: localhost:9200
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 358
> 
* upload completely sent off: 358 out of 358 bytes
< HTTP/1.1 200 OK
< content-type: application/json; charset=UTF-8
< content-length: 84
< 
{
  "acknowledged" : true,
  "shards_acknowledged" : true,
  "index" : "my_index"
}
* Connection #0 to host localhost left intact
08:54:03 [jason:~/src/elastic/elasticsearch-5.x] 5.6+ ± curl -v -XPOST 'http://localhost:9200/my_index/my_type?pretty' -H 'Content-Type: application/json' -d '{ "field\r" : "value" }'
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9200 (#0)
> POST /my_index/my_type?pretty HTTP/1.1
> Host: localhost:9200
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 23
> 
* upload completely sent off: 23 out of 23 bytes
< HTTP/1.1 201 Created
< Location: /my_index/my_type/AV-MdbJvxmftjXDqQmAN
< Warning: 299 Elasticsearch-5.6.4-SNAPSHOT-Unknown "The [string] field is deprecated, please use [text] or [keyword] instead on [field%0D]" "Sun, 05 Nov 2017 13:54:04 GMT"
< Warning: 299 Elasticsearch-5.6.4-SNAPSHOT-Unknown "field [include_in_all] is deprecated, as [_all] is deprecated, and will be disallowed in 6.0, use [copy_to] instead." "Sun, 05 Nov 2017 13:54:04 GMT"
< content-type: application/json; charset=UTF-8
< content-length: 224
< 
{
  "_index" : "my_index",
  "_type" : "my_type",
  "_id" : "AV-MdbJvxmftjXDqQmAN",
  "_version" : 1,
  "result" : "created",
  "_shards" : {
    "total" : 2,
    "successful" : 1,
    "failed" : 0
  },
  "created" : true
}
* Connection #0 to host localhost left intact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.