trying to connect a bluemix app (java liberty profile) to our on-premise db/as400 using a secure gateway. Denying or allowing all connection, doesn't change the error message. It seems that the request from the app doesn't reach the secure gateway client (and I don't see messages on sgw client that mentions the connection refused).
How can i resolve that? This the code:
DB_SERVERNAME=jdbc:as400://xxx-xx-xxx-x.integration.ibmcloud.com:15XXX/dbname
try {
Driver driver = new com.ibm.as400.access.AS400JDBCDriver();
DriverManager.registerDriver(driver);
System.out.println("Driver Loaded Successfully ...");
dbConn = DriverManager.getConnection(DB_SERVERNAME, DB_USERNAME, DB_PASSWORD);
System.out.println("Connected...");
} catch (SQLException e) {
e.printStackTrace();
}
And the error msg is :
Driver Loaded Successfully ...
ERR App [err] java.sql.SQLException: The application requester cannot establish the connection. (Connection refused)
ERR App [err] at com.ibm.as400.access.JDError.throwSQLException(JDError.java:565)
ERR App [err] at com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConnection.java:3308)
ERR App [err] at com.ibm.as400.access.AS400JDBCDriver.prepareConnection(AS400JDBCDriver.java:1393)
ERR App [err] at com.ibm.as400.access.AS400JDBCDriver.initializeConnection(AS400JDBCDriver.java:1230)
ERR App [err] at com.ibm.as400.access.AS400JDBCDriver.connect(AS400JDBCDriver.java:371)
ERR App [err] at java.sql.DriverManager.getConnection(Unknown Source)
ERR App [err] at java.sql.DriverManager.getConnection(Unknown Source)
ERR App [err] at wasdev.sample.servlet.DBServlet.getDBConnection(DBServlet.java:106)
ERR App [err] at wasdev.sample.servlet.DBServlet.doGet(DBServlet.java:64)
ERR App [err] at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
ERR App [err] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
ERR App [err] at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
ERR App [err] at [internal classes]
ERR App [err] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
ERR App [err] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
ERR App [err] at java.lang.Thread.run(Unknown Source)
ERR App [err] Caused by:
ERR App [err] java.net.ConnectException: Connection refused
ERR App [err] at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
ERR App [err] at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
ERR App [err] at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
ERR App [err] at java.net.SocksSocketImpl.connect(Unknown Source)
ERR App [err] at java.net.Socket.connect(Unknown Source)
ERR App [err] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
ERR App [err] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
ERR App [err] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
ERR App [err] at java.lang.reflect.Method.invoke(Unknown Source)
App [err] at com.ibm.as400.access.PortMapper.getSocketConnection(PortMapper.java:273)
ERR App [err] at com.ibm.as400.access.PortMapper.getServerSocket(PortMapper.java:161)
ERR App [err] at com.ibm.as400.access.AS400ImplRemote.signonConnect(AS400ImplRemote.java:2334)
ERR App [err] at com.ibm.as400.access.AS400ImplRemote.signon(AS400ImplRemote.java:2250)
ERR App [err] at com.ibm.as400.access.AS400.sendSignonRequest(AS400.java:3035)
ERR App [err] at com.ibm.as400.access.AS400.signon(AS400.java:3910)
ERR App [err] at com.ibm.as400.access.AS400.connectService(AS400.java:1168)
ERR App [err] at com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConnection.java:3300)
ERR App [err] ... 32 more
Updating based on further discussion in comments.
Getting empty reply from server on your cURL command to the cloud host:port should be generating logs on your SG Client. It should be the equivalent of a successful connection due to how a database would respond to this sort of connection.
This seems to narrow down the issue to how the request is being created in your Bluemix app. Another comment on the initial question suggests that your driver only accepts select ports as input, so the issue might originate there.
Reading your logs, the error message
Connection refused
is meaning that the Driver is working fine, but there is a connection issue and in your case, using the Secure Gateway, you should investigate both the AS400 server and the Secure gateway instance
#1 is the TCP port 15XXX (the one tried to connect to by the driver following the JDBC url) mapped correctly on the Secure Gateway instance
#2a if the #1 is true, is the AS400 server listening on the same TCP port for incoming connections?
#2b if #2a is false, is the AS400 server listening on a different TCP port?
#3 according to the TCP port listened on by the AS400 server (#2a or #2b) is this port mapped correctly on the Secure Gateway instance, allowing the requests sent to the TCP 15XXX through the Secure Gateway routed correctly to the right port on the AS400 server?
#4 if #3 is true, has the AS400 server an internal firewall preventing incoming connections?
The JT400 JDBC driver communicates with the IBM i system using the IBM i Host Servers, which each run on different ports. You will need to forward all of these ports through your secure gateway in order for it to work. See this doc for more info (you'll need as-database, as-central, and as-signon at a minimum).
If you need to change the ports used by the app to connect, you can do so by creating an AS400 object and using setServicePort to change the default ports. Then pass the AS400 object to connect instead of using the system, user name, and password.
Related
Please help me to find the solution for below error. i have tried using imap and pop3 setting, below are the configuration settings i have used
pop3:
Server name: outlook.office365.com
Port: 995
imap:
Server name: outlook.office365.com
Port: 993
Error im getting:
Exception in component tPOP_1 (test)
javax.mail.MessagingException: Connection timed out: connect;
nested exception is:
java.net.ConnectException: Connection timed out: connect
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:479)
at javax.mail.Service.connect(Service.java:275)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at accor.test_0_1.test.tPOP_1Process(test.java:769)
at accor.test_0_1.test.runJobInTOS(test.java:4959)
at accor.test_0_1.test.main(test.java:4727)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
[FATAL]: accor.test_0_1.test - tPOP_1 Connection timed out: connect
Attached is the tpop component settings i have used.
tpop component settings
configuration settings i have used
pop3:
Server name: outlook.office365.com
Port: 995
imap:
Server name: outlook.office365.com
Port: 993
Try to add this Java option in job jvm Parameters and try :
-Dmail.imap.auth.plain.disable=true
Link could help :
https://confluence.atlassian.com/jirakb/imap-setup-fails-with-authenticate-failed-error-in-logs-in-jira-server-185401609.html
Your component configuration is correct so if it doesn't work within these options that means that your organisation does bloc something
Microsoft disabled Basic Auth. You won't be able to connect, unless you use OAuth token.
Talend 8 / 7.3 R2022-09 release introduced Microsoft Exchange Auth to tPOP that automatically exchanges the credentials. Configuration for that can be found in the official help document: https://help.talend.com/r/en-US/8.0/pop/configuring-an-oauth2-application-for-pop-and-imap
There's also a long answer on Talend community with all the details: https://community.talend.com/s/question/0D55b00007LRyrWCAT/tpop-microsoft-basic-authentication-retirement?language=en_US
Git repository for the component: https://github.com/Talend/tdi-studio-se/tree/master/main/plugins/org.talend.designer.components.localprovider/components/tPOP
My Liberty Server was working fine a couple of days back but now I am getting some errors and the server is in "Started" state but the application is in "Stopped" state. When I checked the error logs, I could see that the application was not able to connect to Redis.
Some additional details about the environment:
Cisco VPN
IBM Cloud
Eclipse 2019-12 (4.14.0)
MacOS Monterey 12.4
Custom DNS set to (8.8.8.8) and Search domain is (ibm.com)
Redis is running on IBM Cloud
Redisson Java client for connecting to Redis
StackTrace of the error:
java.util.concurrent.RejectedExecutionException: event executor terminated
at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:932)
at io.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:351)
at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:344)
at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:834)
at io.netty.util.concurrent.SingleThreadEventExecutor.execute0(SingleThreadEventExecutor.java:825)
at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:815)
at io.netty.util.concurrent.DefaultPromise.safeExecute(DefaultPromise.java:841)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:499)
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616)
at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605)
at io.netty.util.concurrent.DefaultPromise.setSuccess(DefaultPromise.java:96)
at io.netty.channel.group.DefaultChannelGroupFuture.setSuccess0(DefaultChannelGroupFuture.java:200)
at io.netty.channel.group.DefaultChannelGroupFuture.access$400(DefaultChannelGroupFuture.java:41)
at io.netty.channel.group.DefaultChannelGroupFuture$1.operationComplete(DefaultChannelGroupFuture.java:75)
at io.netty.channel.group.DefaultChannelGroupFuture$1.operationComplete(DefaultChannelGroupFuture.java:48)
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:571)
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:550)
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491)
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616)
at io.netty.util.concurrent.DefaultPromise.setSuccess0(DefaultPromise.java:605)
at io.netty.util.concurrent.DefaultPromise.trySuccess(DefaultPromise.java:104)
at io.netty.channel.DefaultChannelPromise.trySuccess(DefaultChannelPromise.java:84)
at io.netty.channel.AbstractChannel$CloseFuture.setClosed(AbstractChannel.java:1164)
at io.netty.channel.AbstractChannel$AbstractUnsafe.doClose0(AbstractChannel.java:755)
at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:731)
at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:620)
at io.netty.channel.nio.NioEventLoop.closeAll(NioEventLoop.java:772)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:529)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:995)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
[err] com.ibm.srm.utils.cache.CacheException: Unable to connect to Redis server
[err] at com.ibm.srm.utils.cache.impl.RedissonConnector.connect(RedissonConnector.java:122)
[err] at com.ibm.srm.utils.cache.osgi.Activator.start(Activator.java:28)
[err] at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:842)
[err] at [internal classes]
[err] at java.security.AccessController.doPrivileged(Native Method)
[err] at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:834)
[err] at [internal classes]
[err] at java.security.AccessController.doPrivileged(Native Method)
[err] at org.apache.aries.subsystem.core.internal.BasicSubsystem.start(BasicSubsystem.java:321)
[err] at [internal classes]
[err] at com.ibm.ws.app.manager.esa.internal.DeploySubsystemAction.access$000(DeploySubsystemAction.java:75)
[err] at com.ibm.ws.app.manager.esa.internal.DeploySubsystemAction$2$1.run(DeploySubsystemAction.java:253)
[err] at [internal classes]
[err] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[err] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[err] at java.lang.Thread.run(Thread.java:750)
[err] Caused by: org.redisson.client.RedisConnectionException: Unable to connect to Redis server: <server-host:server-port removed for security reasons>
[err] at org.redisson.connection.pool.ConnectionPool$1.lambda$run$0(ConnectionPool.java:159)
[err] at org.redisson.misc.RedissonPromise.lambda$onComplete$0(RedissonPromise.java:183)
[err] at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
[err] at [internal classes]
[err] at org.redisson.connection.pool.ConnectionPool.lambda$createConnection$1(ConnectionPool.java:295)
[err] at org.redisson.misc.RedissonPromise.lambda$onComplete$0(RedissonPromise.java:183)
[err] at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578)
[err] at [internal classes]
[err] ... 1 more
[err] Caused by: io.netty.channel.ConnectTimeoutException: connection timed out: <server-host:server-port removed for security reasons>
[err] at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe$1.run(AbstractNioChannel.java:261)
[err] at [internal classes]
[err] ... 8 more
[AUDIT ] CWWKT0017I: Web application removed (default_host): http://192.168.1.20:9080/srm/tsdqueries/
[AUDIT ] CWWKZ0022W: Application TSD has not started in 29.999 seconds.
[AUDIT ] CWWKF0012I: The server installed the following features: [appSecurity-2.0, beanValidation-1.1, cdi-1.2, distributedMap-1.0, ejbLite-3.2, el-3.0, httpWhiteboard-1.0, jaxb-2.2, jaxrs-2.0, jaxrsClient-2.0, jdbc-4.1, jndi-1.0, jpa-2.1, jpaContainer-2.1, jsf-2.2, json-1.0, jsonp-1.0, jsp-2.3, localConnector-1.0, managedBeans-1.0, osgiBundle-1.0, servlet-3.1, ssl-1.0, webProfile-7.0, websocket-1.1].
[AUDIT ] CWWKF0011I: The TS server started in 34.396 seconds.
TSD Query bundle stopped in 36.941 secs
TSD Query bundle initialized in 50.74 secs
Common-Utilities bundle stopped
[AUDIT ] CWWKZ0402E: A bundle exception was generated when trying to install the application TSD into an OSGi framework. The error text from the OSGi framework is: Exception in com.ibm.srm.utils.cache.osgi.Activator.start() of bundle Common-Utilities-Cache.
[AUDIT ] CWWKN2001A: HTTP Whiteboard context root removed: http://192.168.1.20:9080/osgi/http/TSD
[AUDIT ] CWWKZ0012I: The application TSD was not started.
I tried changing the "connectTimeout" property in the redis.properties file from 10000 to 20000 and it didn't work. Tried switching my networks also and still it did not work.
Edit: At times, I also get this error:
Unable to init enough connections amount! Only 4 of 5 were initialized. Redis server: <server-host:server-port removed for security reasons>
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I configured a Secure Gateway and I'm trying to connect to an on-premise database. I'm receiving this error message :
[err] com.ibm.db2.jcc.am.DisconnectNonTransientConnectionException: [jcc][t4][2030][11211][4.12.55] A communication error occurred during operations on the connection's underlying socket, socket input stream,
6/3/2016 5:49:31 PM ERR App or socket output stream. Error location: Reply.fill() - insufficient data (-1). Message: Insufficient data. ERRORCODE=-4499, SQLSTATE=08001
6/3/2016 5:49:31 PM ERR App [err]
App [err] at com.ibm.db2.jcc.am.hd.a(hd.java:319)
App [err] at com.ibm.db2.jcc.t4.a.a(a.java:461)
App [err] at com.ibm.db2.jcc.t4.a.a(a.java:456)
App [err] at com.ibm.db2.jcc.t4.z.b(z.java:242)
App [err] at com.ibm.db2.jcc.t4.z.c(z.java:268)
App [err] at com.ibm.db2.jcc.t4.z.c(z.java:381)
App [err] at com.ibm.db2.jcc.t4.z.v(z.java:1149)
App [err] at com.ibm.db2.jcc.t4.ab.a(ab.java:45)
App [err] at com.ibm.db2.jcc.t4.b.n(b.java:1251)
App [err] at com.ibm.db2.jcc.t4.b.b(b.java:1123)
App [err] at com.ibm.db2.jcc.t4.b.d(b.java:717)
App [err] at com.ibm.db2.jcc.t4.b.c(b.java:703)
App [err] at com.ibm.db2.jcc.t4.b.a(b.java:391)
App [err] at com.ibm.db2.jcc.t4.b.<init>(b.java:320)
App [err] at com.ibm.db2.jcc.DB2SimpleDataSource.getConnection(DB2SimpleDataSource.java:214)
App [err] at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:460)
App [err] at java.sql.DriverManager.getConnection(Unknown Source)
App [err] at wasdev.sample.servlet.DBServlet.getTargetDBConnection(DBServlet.java:127)
App [err] at wasdev.sample.servlet.DBServlet.doGet(DBServlet.java:60)
App [err] at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
App [err] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
App [err] at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
App [err] at [internal classes]
App [err] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
App [err] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
App [err] at java.lang.Thread.run(Unknown Source)
This does not indicate a Secure Gateway issue. Looking at the earlier instances of error experienced by others, it is either a
Stale Connection issue
https://developer.ibm.com/answers/questions/10120/what-could-cause-a-connection-refused-to-sqldb-db2-after-some-time.html or
Firewall issue or Network issue as in
DB2 jdbc connection error Connection refused. ERRORCODE=-4499, SQLSTATE=08001
I am getting " Operation timed out. ERRORCODE=-4499, SQLSTATE=08001" connecting to remote DB2
I am trying to connect to an oracle 12c database using the eclipse IDE but I get the error "Ping Failed!" every time I try to test the connection. I have tried to disable the windows firewall as some other similar post suggested it might be network related or the fire wall blocking it. I have the following settings:
SID: XE
Host: localhost
Port Number: 1521
UserName: myusername
Password: mypassword
connection URL: jdbc:oracle:thin:#localhost:1521:XE
java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:328)
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)
at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:96)
at org.eclipse.datatools.enablement.internal.oracle.JDBCOracleConnectionFactory.createConnection(JDBCOracleConnectionFactory.java:27)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)
at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:470)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:506)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:595)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:230)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
... 13 more
Caused by: java.net.UnknownHostException: server
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(Unknown Source)
at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at oracle.net.nt.TcpNTAdapter.connect(TcpNTAdapter.java:120)
at oracle.net.nt.ConnOption.connect(ConnOption.java:159)
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:428)
... 18 more
Any ideas of what I am doing wrong?
Change your connection url to jdbc:oracle:thin:#server:1521:db. This will work.
I am trying establish BOSH connection to a openfire server on port 7070 with firewall unblocked and openfire actively listening. Without proxy it works well with openfire running on same network but with proxy getting the following error,
java.io.IOException: java.net.SocketTimeoutException: Read timed out
at rocks.xmpp.core.session.XmppSession.connect(XmppSession.java:737)
at com.geo.XMPPBosh.XMPPDemo.main(XMPPDemo.java:45)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at rocks.xmpp.extensions.httpbind.BoshConnection$2.run(BoshConnection.java:564)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "main" java.lang.IllegalStateException: You must be connected to the server before trying to login.
at rocks.xmpp.core.session.XmppSession.login(XmppSession.java:827)
at com.geo.XMPPBosh.XMPPDemo.main(XMPPDemo.java:52)
Below is the code,
BoshConnectionConfiguration boshConfiguration = BoshConnectionConfiguration
.builder().hostname("remote address").port(7070)
.proxy(new Proxy(Proxy.Type.HTTP,new InetSocketAddress("proxy address", 10015))).file("/http-bind/").wait(5000).build();
Pl help on what might be the cause or the solution.