Skip to content

Commit

Permalink
fix: ensure default server config works with IP6 (fixes #3309) (#3310)
Browse files Browse the repository at this point in the history
* fix(3309): ensure default server config works with IP6
  • Loading branch information
big-andy-coates authored Sep 9, 2019
1 parent 7a997a4 commit 92b03ec
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 9 deletions.
3 changes: 2 additions & 1 deletion config/ksql-server.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

### HTTP ###
# The URL the KSQL server will listen on:
listeners=http://0.0.0.0:8088
# The default is any IPv4 or IPv6 interface on the machine.
listeners=http://0.0.0.0:8088,http://[::]:8088

### HTTPS ###
# To switch KSQL over to communicating using HTTPS comment out the 'listeners' line above
Expand Down
6 changes: 5 additions & 1 deletion docs/installation/install-ksql-with-docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ Run a KSQL Server that enables manual interaction by using the KSQL CLI:

``KSQL_LISTENERS``
A list of URIs, including the protocol, that the broker listens on.
If you are using IPv6, set to ``http://[::]:8088``.

In interactive mode, a KSQL CLI instance running outside of Docker can connect
to the KSQL server running in Docker.
Expand Down Expand Up @@ -214,7 +215,8 @@ the KSQL CLI:
internal topics created by KSQL.

``KSQL_LISTENERS``
A list of URIs, including the protocol, that the broker listens on.
A list of URIs, including the protocol, that the broker listens on.
If you are using IPv6, set to ``http://[::]:8088``.

``KSQL_PRODUCER_INTERCEPTOR_CLASSES``
A list of fully qualified class names for producer interceptors.
Expand Down Expand Up @@ -262,6 +264,7 @@ Run a KSQL Server that uses a secure connection to a Kafka cluster:

``KSQL_LISTENERS``
A list of URIs, including the protocol, that the broker listens on.
If you are using IPv6 , set to ``http://[::]:8088``.

``KSQL_KSQL_SINK_REPLICAS``
The default number of replicas for the topics created by KSQL.
Expand Down Expand Up @@ -392,6 +395,7 @@ running in a different container.

``KSQL_OPTS``
A space-separated list of Java options.
If you are using IPv6, set ``listeners`` to ``http://[::]:8088``.

The Docker network created by KSQL Server enables you to connect with a
dockerized KSQL CLI.
Expand Down
2 changes: 1 addition & 1 deletion docs/installation/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Follow these instructions to start KSQL server using the ``ksql-server-start`` s
::

bootstrap.servers=localhost:9092
listeners=http://0.0.0.0:8088
listeners=http://0.0.0.0:8088,http://[::]:8088

For more information, see :ref:`ksql-server-config`.

Expand Down
8 changes: 4 additions & 4 deletions docs/installation/server-config/config-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -356,13 +356,13 @@ listeners
The ``listeners`` setting controls the REST API endpoint for the KSQL server.
For more info, see :ref:`ksql-rest-api`.

The default hostname is ``0.0.0.0`` which binds to all interfaces. Update this
to a specific interface to bind only to a single interface. For example:
The default ``listeners`` is ``http://0.0.0.0:8088,http://[::]:8088``, which binds to all IPv4 and IPv6 interfaces.
Update this to a specific interface to bind only to a single interface. For example:

::

# Bind to all interfaces.
listeners=http://0.0.0.0:8088
# Bind to all interfaces, (both IPv4 and IPv6).
listeners=http://0.0.0.0:8088,http://[::]:8088

# Bind only to localhost.
listeners=http://localhost:8088
Expand Down
9 changes: 8 additions & 1 deletion docs/operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ setting:
listeners=http://0.0.0.0:8088
Or if you are running over IPv6:

::

listeners=http://[::]:8088


For more info, see :ref:`Starting KSQL Server <start_ksql-server>`.

Check for a port conflict
Expand Down Expand Up @@ -250,4 +257,4 @@ If you're still having trouble, check the KSQL server logs for errors.
Look for logs in the default directory at ``/usr/local/logs`` or in the
``LOG_DIR`` that you assign when you start the KSQL CLI. For more info, see
:ref:`Starting the KSQL CLI <install_ksql-cli>`.
:ref:`Starting the KSQL CLI <install_ksql-cli>`.
6 changes: 6 additions & 0 deletions docs/troubleshoot-ksql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ setting in the file and verify it is set correctly.
listeners=http://0.0.0.0:8088
Or if you are running over IPv6:

::

listeners=http://[::]:8088

See :ref:`Starting KSQL Server <start_ksql-server>` for more information.


Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ services:
- schema-registry
environment:
KSQL_BOOTSTRAP_SERVERS: kafka:39092
KSQL_LISTENERS: http://0.0.0.0:8088
KSQL_LISTENERS: http://0.0.0.0:8088,http://[::]:8088
KSQL_KSQL_SCHEMA_REGISTRY_URL: http://schema-registry:8081

0 comments on commit 92b03ec

Please sign in to comment.