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

Zilla crash during attempted WebSocket connection #391

Closed
vordimous opened this issue Sep 2, 2023 · 1 comment
Closed

Zilla crash during attempted WebSocket connection #391

vordimous opened this issue Sep 2, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@vordimous
Copy link
Contributor

Describe the bug
Zilla is crashing with the below error when I try to connect over a WebSocket connection with Postman. I may have an invalid zilla.yaml but idk if the crash is intended or not.
image

2023-09-02 08:12:16 started
2023-09-02 08:14:09 org.agrona.concurrent.AgentTerminationException: java.lang.IllegalArgumentException: offset=92336 length=430702589 not valid for capacity=1049344
2023-09-02 08:14:09     at io.aklivity.zilla.runtime.engine/io.aklivity.zilla.runtime.engine.internal.registry.DispatchAgent.doWork(DispatchAgent.java:681)
2023-09-02 08:14:09     at org.agrona.core/org.agrona.concurrent.AgentRunner.doDutyCycle(AgentRunner.java:291)
2023-09-02 08:14:09     at org.agrona.core/org.agrona.concurrent.AgentRunner.run(AgentRunner.java:164)
2023-09-02 08:14:09     at java.base/java.lang.Thread.run(Thread.java:1623)
2023-09-02 08:14:09 Caused by: java.lang.IllegalArgumentException: offset=92336 length=430702589 not valid for capacity=1049344
2023-09-02 08:14:09     at org.agrona.core/org.agrona.concurrent.UnsafeBuffer.boundsCheckWrap(UnsafeBuffer.java:1674)
2023-09-02 08:14:09     at org.agrona.core/org.agrona.concurrent.UnsafeBuffer.wrap(UnsafeBuffer.java:246)
2023-09-02 08:14:09     at io.aklivity.zilla.runtime.binding.http.kafka/io.aklivity.zilla.runtime.binding.http.kafka.internal.types.Array32FW.tryWrap(Array32FW.java:136)
2023-09-02 08:14:09     at io.aklivity.zilla.runtime.binding.http.kafka/io.aklivity.zilla.runtime.binding.http.kafka.internal.types.stream.HttpBeginExFW.tryWrap(HttpBeginExFW.java:42)
2023-09-02 08:14:09     at io.aklivity.zilla.runtime.binding.http.kafka/io.aklivity.zilla.runtime.binding.http.kafka.internal.types.OctetsFW.get(OctetsFW.java:15)
2023-09-02 08:14:09     at io.aklivity.zilla.runtime.binding.http.kafka/io.aklivity.zilla.runtime.binding.http.kafka.internal.stream.HttpKafkaProxyFactory.newStream(HttpKafkaProxyFactory.java:188)
2023-09-02 08:14:09     at io.aklivity.zilla.runtime.engine/io.aklivity.zilla.runtime.engine.internal.registry.DispatchAgent.handleBeginInitial(DispatchAgent.java:1350)
2023-09-02 08:14:09     at io.aklivity.zilla.runtime.engine/io.aklivity.zilla.runtime.engine.internal.registry.DispatchAgent.handleDefaultReadInitial(DispatchAgent.java:1118)
2023-09-02 08:14:09     at io.aklivity.zilla.runtime.engine/io.aklivity.zilla.runtime.engine.internal.registry.DispatchAgent.handleReadInitial(DispatchAgent.java:1058)
2023-09-02 08:14:09     at io.aklivity.zilla.runtime.engine/io.aklivity.zilla.runtime.engine.internal.registry.DispatchAgent.handleRead(DispatchAgent.java:1005)
2023-09-02 08:14:09     at io.aklivity.zilla.runtime.engine/io.aklivity.zilla.runtime.engine.internal.concurent.ManyToOneRingBuffer.read(ManyToOneRingBuffer.java:181)
2023-09-02 08:14:09     at io.aklivity.zilla.runtime.engine/io.aklivity.zilla.runtime.engine.internal.registry.DispatchAgent.doWork(DispatchAgent.java:675)
2023-09-02 08:14:09     ... 3 more
2023-09-02 08:14:09     Suppressed: java.lang.Exception: [engine/data#3]        [0x03030000000000cd] streams=[consumeAt=0x000168c0 (0x00000000000168c0), produceAt=0x000168c0 (0x00000000000168c0)]
2023-09-02 08:14:09             at io.aklivity.zilla.runtime.engine/io.aklivity.zilla.runtime.engine.internal.registry.DispatchAgent.doWork(DispatchAgent.java:679)
2023-09-02 08:14:09             ... 3 more
2023-09-02 08:14:09 stopped

To Reproduce

  1. zilla.yaml:
name: zilla-quickstart
bindings:

# Gateway ingress config
  tcp_server:
    type: tcp
    kind: server
    options:
      host: 0.0.0.0
      port: 
        - 8083
    routes:
        - when: 
            - port: 8083
          exit: mqtt_http_kafka_proxy
    telemetry:
      metrics:
        - stream.*

# MQTT proxy endpoints to Kafka a topics
  mqtt_http_kafka_proxy:
    type: http-kafka
    kind: proxy
    routes:
      - when:
          - method: GET
            path: /mqtt
        exit: kafka_cache_client
        with:
          capability: fetch
          topic: iot-messages


# Kafka caching layer
  kafka_cache_client:
    type: kafka
    kind: cache_client
    exit: kafka_cache_server
  kafka_cache_server:
    type: kafka
    kind: cache_server
    exit: kafka_client

# Connect to local Kafka
  kafka_client:
    type: kafka
    kind: client
    exit: kafka_tcp_client
  kafka_tcp_client:
    type: tcp
    kind: client
    options:
      host: kafka
      port: 29092
    routes:
      - when:
          - cidr: 0.0.0.0/0
  1. connect over "ws://localhost:8083/mqtt"

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
This is the default config for a GUI I am testing:
image

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@jfallows jfallows added the bug Something isn't working label Sep 6, 2023
@vordimous
Copy link
Contributor Author

Adding an http server prevents the crash but still doesn't allow mqtt over websocket. closing as the bug was a miss configured zilla.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants