Java Firebase Admin SDK connect behind proxy

1,002 views
Skip to first unread message

Gusti Arya

unread,
Jul 11, 2018, 12:39:10 AM7/11/18
to Firebase Google Group
Hi, I am new to firebase, I am trying to connect to firebase db behind my company proxy,I followed this approach but still no luck.
here my stack trace.

4517 [firebase-websocket-worker] ERROR 
    com.google.firebase.database.connection.WebsocketConnection - [ws_1] 
    WebSocket error
    io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection 
    refused: no further information: testing- 
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:325)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:633)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
    Caused by: java.net.ConnectException: Connection refused: no further information
... 16 more

any suggestion?

Peter Saitz

unread,
Jul 13, 2018, 11:03:07 AM7/13/18
to Firebase Google Group
The developers of Java Firebase Admin SDK have forgotten to implement the proxy functionality.

Note: In Microsoft‘s Azure Java library it took 2 or 3 years until this missing feature was been added. Hopefully, Google will be faster.

Java’s system properties „http.proxyHost“ and „http.proxyPort“ are used by Java classes in package java.net.* only.

sharpkingdom

unread,
Jul 18, 2018, 11:30:30 AM7/18/18
to Firebase Google Group
I looked at the source code. When Firebase establishes a websocket connection, it uses NettyWebSocketClient and does not use the proxy I had set.
Reply all
Reply to author
Forward
0 new messages