You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/01/27 16:22:27 UTC
[GitHub] [camel-kafka-connector] oscerd opened a new issue #924: Camel-Netty-* connectors are not working
oscerd opened a new issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924
```
[2021-01-27 17:19:21,237] INFO Apache Camel 3.7.0 (camel-1) is shutting down (org.apache.camel.impl.engine.AbstractCamelContext:2907)
[2021-01-27 17:19:21,245] INFO Apache Camel 3.7.0 (camel-1) uptime 78ms (org.apache.camel.impl.engine.AbstractCamelContext:3028)
[2021-01-27 17:19:21,245] INFO Apache Camel 3.7.0 (camel-1) is shutdown in 8ms (org.apache.camel.impl.engine.AbstractCamelContext:3029)
[2021-01-27 17:19:21,246] INFO WorkerSourceTask{id=CamelNettySourceConnector-0} Committing offsets (org.apache.kafka.connect.runtime.WorkerSourceTask:416)
[2021-01-27 17:19:21,246] INFO WorkerSourceTask{id=CamelNettySourceConnector-0} flushing 0 outstanding messages for offset commit (org.apache.kafka.connect.runtime.WorkerSourceTask:433)
[2021-01-27 17:19:21,246] ERROR WorkerSourceTask{id=CamelNettySourceConnector-0} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:179)
org.apache.kafka.connect.errors.ConnectException: Failed to create and start Camel context
at org.apache.camel.kafkaconnector.CamelSourceTask.start(CamelSourceTask.java:144)
at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:208)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:177)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:227)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: hostname can't be null
at java.net.InetSocketAddress.checkHost(InetSocketAddress.java:149)
at java.net.InetSocketAddress.<init>(InetSocketAddress.java:216)
at org.apache.camel.component.netty.SingleTCPNettyServerBootstrapFactory.startServerBootstrap(SingleTCPNettyServerBootstrapFactory.java:184)
at org.apache.camel.component.netty.SingleTCPNettyServerBootstrapFactory.doStart(SingleTCPNettyServerBootstrapFactory.java:113)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84)
at org.apache.camel.component.netty.NettyConsumer.doStart(NettyConsumer.java:75)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3108)
at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRouteConsumers(InternalRouteStartupManager.java:362)
at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartRouteConsumers(InternalRouteStartupManager.java:282)
at org.apache.camel.impl.engine.InternalRouteStartupManager.safelyStartRouteServices(InternalRouteStartupManager.java:181)
at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRoutes(InternalRouteStartupManager.java:115)
at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2889)
at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2702)
at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2665)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2431)
at org.apache.camel.main.SimpleMain.doStart(SimpleMain.java:43)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.kafkaconnector.CamelSourceTask.start(CamelSourceTask.java:141)
... 8 more
```
with this configuration
```
name=CamelNettySourceConnector
connector.class=org.apache.camel.kafkaconnector.netty.CamelNettySourceConnector
tasks.max=1
# use the kafka converters that better suit your needs, these are just defaults:
key.converter=org.apache.kafka.connect.storage.StringConverter
value.converter=org.apache.kafka.connect.storage.StringConverter
# comma separated topics to send messages into
topics=mytopic
# mandatory properties (for a complete properties list see the connector documentation):
# The hostname. For the consumer the hostname is localhost or 0.0.0.0. For the producer the hostname is the remote host to connect to
camel.source.path.host=localhost
# The host port number
camel.source.path.port=8182
# The protocol to use which can be tcp or udp. One of: [tcp] [udp]
camel.source.path.protocol=tcp
```
It seems that the BootstrapFactory fails at finding the host. But it's defined.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] valdar commented on issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
valdar commented on issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924#issuecomment-796617908
Do we have a unit/itest for this?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] tadayosi commented on issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
tadayosi commented on issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924#issuecomment-781898276
I'll work on #1036 next, so let's see if I can catch this issue there, too.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] valdar commented on issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
valdar commented on issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924#issuecomment-796617181
AA! I see that will be in camel 3.9.0 awesome!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] orpiske commented on issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
orpiske commented on issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924#issuecomment-788749009
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] tadayosi commented on issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
tadayosi commented on issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924#issuecomment-788547729
I think I figured out what's causing the issue and #665. It turns out it's potentially broader than just a couple of connectors. It's an issue in how the `EndpointUriFactory`s map properties to the endpoint URL, which is used in the `TaskHelper`. For Netty, the endpoint syntax is defined as `netty:protocol:host:port` as follows:
https://github.com/apache/camel/blob/master/components/camel-netty/src/generated/java/org/apache/camel/component/netty/NettyEndpointUriFactory.java#L18
https://github.com/apache/camel/blob/master/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyEndpoint.java#L43
but it really should be `netty:protocol://host:port`. So I think Camel upstream needs to be fixed first.
For the time being, a workaround would be to use `camel.source.path.host=//localhost` or `camel.sink.path.host=//localhost`.
But I suspect there are potentially more components/connectors that have the same issue. I wonder if it's easy for the Camel core side to generate some basic tests against the EndpointUriFactories that check its url syntax with the mandatory properties (like `protocol`, `host`, and `port`, etc.).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] valdar commented on issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
valdar commented on issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924#issuecomment-796616420
Thanks @tadayosi for looking into this!
Please signal when the camel issue is fixed so we can review this one in the next release.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] valdar commented on issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
valdar commented on issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924#issuecomment-768447374
Possibly related to #665
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] oscerd commented on issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924#issuecomment-768447898
Yes, it's the same problem.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] valdar closed issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
valdar closed issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] tadayosi commented on issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
tadayosi commented on issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924#issuecomment-796716700
@valdar Sorry, yes it should be fixed in Camel 3.9.0.
And the test case is captured in:
https://github.com/apache/camel-kafka-connector/blob/master/tests/itests-netty/src/test/java/org/apache/camel/kafkaconnector/netty/sink/CamelSinkNettyITCase.java#L88
Once it's fixed we can remove the `//` prefix from the host.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] tadayosi commented on issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
tadayosi commented on issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924#issuecomment-788630866
https://issues.apache.org/jira/browse/CAMEL-16280
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] oscerd commented on issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924#issuecomment-768455262
With a plain camel.source.url it works
```
name=CamelNettySourceConnector
connector.class=org.apache.camel.kafkaconnector.netty.CamelNettySourceConnector
tasks.max=1
# use the kafka converters that better suit your needs, these are just defaults:
key.converter=org.apache.kafka.connect.storage.StringConverter
value.converter=org.apache.kafka.connect.storage.StringConverter
# comma separated topics to send messages into
topics=mytopic
# mandatory properties (for a complete properties list see the connector documentation):
# The hostname. For the consumer the hostname is localhost or 0.0.0.0. For the producer the hostname is the remote host to connect to
# The protocol to use which can be tcp or udp. One of: [tcp] [udp]
camel.source.url=netty:tcp://0.0.0.0:8182
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-kafka-connector] valdar commented on issue #924: Camel-Netty-* connectors are not working
Posted by GitBox <gi...@apache.org>.
valdar commented on issue #924:
URL: https://github.com/apache/camel-kafka-connector/issues/924#issuecomment-796619633
related to #1077
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org