Skip to content

Commit b891da1

Browse files
Merge pull request #358 from couchbase/disable-netty-native
Polish Alpine compatibility notes
2 parents 5f6a6d1 + 1cc2b73 commit b891da1

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

modules/project-docs/pages/compatibility.adoc

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,27 @@ Because Alpine Linux does not have the `glibc` support needed,
122122
we highly recommend that you seek an alternative distribution where possible.
123123
If that is not a option, then a possible workaround that can be applied is as follows:
124124

125-
* Disable the native IO:
125+
* Disable native IO and native TLS by setting both the `ioEnvironment.enableNativeIo` and `security.enableNativeTls` client settings to false, as in this example:
126126
+
127-
[source,toml]
128-
====
129-
ClusterEnvironment env = ClusterEnvironment.builder().ioEnvironment(IoEnvironment.enableNativeIo(false)).build();
130-
====
127+
[source,java]
128+
----
129+
Cluster cluster = Cluster.connect(
130+
connectionString,
131+
ClusterOptions.clusterOptions(username, password)
132+
.environment(env -> env
133+
.ioEnvironment(it -> it.enableNativeIo(false))
134+
.securityConfig(it -> it.enableNativeTls(false))
135+
)
136+
);
137+
----
131138

132-
* Disable it in Netty itself via the following system property:
133-
`-Dcom.couchbase.client.core.deps.io.netty.transport.noNative=true`
139+
* Alternatively, disable it in Netty itself via the following system properties:
140+
+
141+
[source,shell]
142+
----
143+
-Dcom.couchbase.client.core.deps.io.netty.transport.noNative=true
144+
-Dcom.couchbase.client.core.deps.io.netty.handler.ssl.noOpenSsl=true
145+
----
134146

135147
The downside of these workarounds is potentially reduced performance, which can be determined through benchmarking and profiling.
136148

0 commit comments

Comments
 (0)