kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-4827) Kafka connect: error with special characters in connector name
Date Wed, 29 Nov 2017 19:24:00 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-4827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16271391#comment-16271391
] 

ASF GitHub Bot commented on KAFKA-4827:
---------------------------------------

Github user wicknicks closed the pull request at:

    https://github.com/apache/kafka/pull/4273


> Kafka connect: error with special characters in connector name
> --------------------------------------------------------------
>
>                 Key: KAFKA-4827
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4827
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>    Affects Versions: 0.10.1.0
>            Reporter: Aymeric Bouvet
>            Assignee: Arjun Satish
>            Priority: Minor
>             Fix For: 0.10.0.2, 0.10.1.2, 0.10.2.2, 1.1.0, 1.0.1, 0.11.0.3
>
>
> When creating a connector, if the connector name (and possibly other properties) end
with a carriage return, kafka-connect will create the config but report error
> {code}
> cat << EOF > file-connector.json
> {
>   "name": "file-connector\r",
>   "config": {
>     "topic": "kafka-connect-logs\r",
>     "tasks.max": "1",
>     "file": "/var/log/ansible-confluent/connect.log",
>     "connector.class": "org.apache.kafka.connect.file.FileStreamSourceConnector"
>   }
> }
> EOF
> curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d @file-connector.json
localhost:8083/connectors 
> {code}
> returns an error 500 <Request Failed> and log the following
> {code}
> [2017-03-01 18:25:23,895] WARN  (org.eclipse.jetty.servlet.ServletHandler)
> javax.servlet.ServletException: java.lang.IllegalArgumentException: Illegal character
in path at index 27: /connectors/file-connector4
>         at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489)
>         at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
>         at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
>         at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
>         at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
>         at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
>         at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
>         at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
>         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
>         at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
>         at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
>         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>         at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>         at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159)
>         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>         at org.eclipse.jetty.server.Server.handle(Server.java:499)
>         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
>         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
>         at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
>         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
>         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.IllegalArgumentException: Illegal character in path at index 27:
/connectors/file-connector4
>         at java.net.URI.create(URI.java:852)
>         at org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource.createConnector(ConnectorsResource.java:100)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
>         at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
>         at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
>         at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
>         at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
>         at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
>         at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
>         at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
>         at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
>         at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
>         at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
>         at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
>         at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
>         at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
>         at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
>         at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
>         at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
>         at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
>         ... 23 more
> Caused by: java.net.URISyntaxException: Illegal character in path at index 27: /connectors/file-connector4
>         at java.net.URI$Parser.fail(URI.java:2848)
>         at java.net.URI$Parser.checkChars(URI.java:3021)
>         at java.net.URI$Parser.parseHierarchical(URI.java:3105)
>         at java.net.URI$Parser.parse(URI.java:3063)
>         at java.net.URI.<init>(URI.java:588)
>         at java.net.URI.create(URI.java:850)
>         ... 46 more
> {code}
> Connector is accessible at connectors/file-connector%0D and task is correctly running,
but there may be some problem underneath



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message