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

CentOS 6 / Amazon Linux openSSL trouble with pre-packaged netty-tcnative #80

Closed
flozano opened this issue Nov 23, 2015 · 12 comments
Closed
Assignees

Comments

@flozano
Copy link

flozano commented Nov 23, 2015

Seems related to #46 / #44... anyhow, we're getting:

java.lang.UnsatisfiedLinkError: /tmp/libnetty-tcnative3858998603798039886.so: libssl.so.1.0.0: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[na:1.8.0_20]
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1929) ~[na:1.8.0_20]
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1814) ~[na:1.8.0_20]
        at java.lang.Runtime.load0(Runtime.java:809) ~[na:1.8.0_20]
        at java.lang.System.load(System.java:1083) ~[na:1.8.0_20]
        at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:193) ~[netty-common-4.1.0.Beta8.jar:4.1.0.Beta8]
        at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:58) ~[netty-handler-4.1.0.Beta8.jar:4.1.0.Beta8]
        ... 54 common frames omitted

with 1.1.33 Fork 9 and 1.1.33 Fork 10.

It seems fork 6 used to work well.

@wsh
Copy link

wsh commented Dec 21, 2015

I'm seeing the same thing. :(

failed to load the required native library: java.lang.UnsatisfiedLinkError
java.lang.UnsatisfiedLinkError: failed to load the required native library at 
io.netty.handler.ssl.OpenSsl.ensureAvailability(OpenSsl.java:154) at 
io.netty.handler.ssl.OpenSslContext.<init>(OpenSslContext.java:142) at 
io.netty.handler.ssl.OpenSslContext.<init>(OpenSslContext.java:134) at 
io.netty.handler.ssl.OpenSslClientContext.<init>(OpenSslClientContext.java:275) at 
io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:743) at 
io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:319)
Caused by:
java.lang.UnsatisfiedLinkError: /tmp/libnetty-tcnative2195859585022570847.so:
libapr1.so.0: cannot open shared object file: No such file or directory at 
java.lang.ClassLoader$NativeLibrary.load(Native Method) at 
java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937) at 
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1822) at 
java.lang.Runtime.load0(Runtime.java:809) at java.lang.System.load(System.java:1086) at 
io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:193) at 
io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:58)

This is happening in AWS Lambda, Amazon Linux 2015.03.

@normanmaurer
Copy link
Member

@wsh @flozano how did you specify the dependency ? what jar is pulled in ?

@normanmaurer
Copy link
Member

And sorry I missed this one :(

@normanmaurer normanmaurer self-assigned this Dec 21, 2015
@wsh
Copy link

wsh commented Dec 21, 2015

Don't be sorry! Thanks for your hard work!!
'io.netty:netty-tcnative:1.1.33.Fork10-linux-x86_64-fedora' (https://repo1.maven.org/maven2/io/netty/netty-tcnative/1.1.33.Fork10/netty-tcnative-1.1.33.Fork10-linux-x86_64-fedora.jar)

I'm using Gradle fwiw, and Fork6 doesn't seem to make a difference.

@normanmaurer
Copy link
Member

@wsh I think you need to do:

yum install apr . libapr1.so.0 seems to be missing.

@wsh
Copy link

wsh commented Dec 21, 2015

Ah, okay. I was hoping that doing a build on Amazon Linux would fix things.

@normanmaurer my problem is that this is AWS Lambda. I don't have control over OS packages. Is there any way that you know of to package APR in a JAR? 📦

@normanmaurer
Copy link
Member

I guess it would be possible with static linking but for this you will need to hack the build.

@wsh
Copy link

wsh commented Dec 21, 2015

I'll look into that. 😄 Thanks for the advice!

@normanmaurer
Copy link
Member

@flozano so now back to you... can you tell me what jar you use ?

@flozano
Copy link
Author

flozano commented Feb 9, 2016

I also missed this github notification. I was using the wrong one, the generic linux non-fedora. Using the fedora one fixes it, so no problem... anyway I had to build my own openssl for ALPN, so I'm back to generic linux tcnative.

@normanmaurer normanmaurer modified the milestone: 1.1.33.Fork17 May 19, 2016
@normanmaurer normanmaurer removed this from the 1.1.33.Fork21 milestone Aug 26, 2016
@normanmaurer
Copy link
Member

Seems like this can be closed. You can also use "netty-tcnative-boringssl-static" if you not want to worry about all of this

@normanmaurer normanmaurer removed this from the 1.1.33.Fork25 milestone Dec 20, 2016
@flozano
Copy link
Author

flozano commented Dec 20, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants