Error while attempting to connect to an Oracle 12c database using eclipse - eclipse

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.

Related

Talend Error Exception in component tPOP_1 (test) javax.mail.MessagingException: Connection timed out: connect;

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

Unable to connect to remote PostgresSQL server with JDBC driver

I'm trying to connect to a remote PostgreSQL database using JDBC, however the connection times out.
To be able to access the remote server I'm connected to a tunnel. There is no problem when I'm trying to connect from the same network with JDBC, only remotely.
I'm able to connect to the database both remotely and locally using other tools (e.g. pgAdmin, HeidiSQL, python sqlalchemy/psycopg2), but not with JDBC. I do not need to add other options for remote connection with the other tools, simply host:port and user/pass.
Searching for solutions I have tried the following without success:
add property "ssl" with value "true" to the driver connection
add property "sslfactory" with value "org.postgresql.ssl.NonValidatingFactory"
add property "loginTimeout" with value 20
set listen_addresses = '*' in postgresql.conf on remote server
add host all all 0.0.0.0/0 md5 to pg_hba.conf on remote server
Using driver version postgresql-42.2.14. I'm attempting to connect using SQuirreL and MATLAB.
As other tools have no issue connecting I'm guessing this is about tweaking the JDBC settings.
What am I missing here?
Edit:
Trying to ping the IP of the remote server (192.168.x.x.) I get:
Reply from 10.x.x.x: Destination net unreachable.
At the same time I'm able to connect to the database on the same server IP. Is this a clue to the problem?
Connection url:
jdbc:postgresql://192.168.x.x:5432/<dbname>
Results of Test-NetConnection
PS > Test-NetConnection 192.168.x.x
WARNING: Ping to 192.168.x.x failed with status:
DestinationNetworkUnreachable
PS > Test-NetConnection 192.168.x.x -port 5432
ComputerName : 192.168.x.x
RemoteAddress : 192.168.x.x
RemotePort : 5432
InterfaceAlias : Local Area Connection 3
SourceAddress : 192.168.x.x
TcpTestSucceeded : True
Running tracert 192.168.x.x
Tracing route to 192.168.x.x over a maximum of 30 hops
1 <1 ms <1 ms <1 ms 192.168.0.1
2 10.x.x.x reports: Destination net unreachable.
Trace complete.
Stacktrace (SQuirreL):
java.net.SocketTimeoutException: connect timed out
at java.net.DualStackPlainSocketImpl.waitForConnect(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)
at java.net.Socket.connect(Unknown Source)
at org.postgresql.core.PGStream.<init>(PGStream.java:81)
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:93)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:197)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:217)
at org.postgresql.Driver.makeConnection(Driver.java:458)
at org.postgresql.Driver.connect(Driver.java:260)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:147)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:136)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.lambda$execute$0(OpenConnectionCommand.java:93)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.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)
You are pinging IP address in the range of 192.168.x.x and getting reply from 10.x.x.x. Those are two different sub-nets.
As odd as it seems, it does not go well with your initial statement about being able to connect via other means. If network was issue then other tools would have failed as well. Not getting a reply for ping "Request time out" is expected result if there is blockage.
"Destination unreachable" means there is no proper route available to the IP you are trying to get to. With that issue, no other connections to that host should be reachable from your host.
Please confirm if all connections you attempted were from same client host. Also have you tried ODBC connector to see if that works? That allows System DSNs and you do not need to do much in attempt to connect.
Please make sure you do tests either from same hosts or two machines on same network to simplify things.
With "Destination unreachable" error your client should not be talking to server in anyway if same destination IP is used.

WildFly 10.1 starts on different IP but still tries to connect to 127.0.0.1:9990 for HTTP remoting and failing to connect

I am using jBPM 7.3. Everything works fine while starting but after around 5 minutes it tries to connect to 127.0.0.1:9990 port. Yet I have specified my IP address while starting as ./standalone.sh -b 10.14.24.161.
Even I changed it in standalone.xml but it is still trying to connect with localhost IP. The error I am getting is the following:
2017-09-18 19:45:44,195 ERROR [org.kie.workbench.common.screens.datasource.management.backend.integration.wildfly.WildflyBaseClient] (pool-22-thread-1) It was not possible to open connection to Wildfly/EAP server.: java.io.IOException: java.net.ConnectException: WFLYPRT0053: Could not connect to http-remoting://127.0.0.1:9990. The connection failed
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:149)
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:80)
at org.kie.workbench.common.screens.datasource.management.backend.integration.wildfly.WildflyBaseClient.testConnection(WildflyBaseClient.java:158)
at org.kie.workbench.common.screens.datasource.management.backend.integration.wildfly.WildflyBaseClient.testConnection(WildflyBaseClient.java:147)
at org.kie.workbench.common.screens.datasource.management.backend.core.wildfly.WildflyDriverProvider.hasStarted(WildflyDriverProvider.java:210)
at org.kie.workbench.common.screens.datasource.management.backend.core.wildfly.WildflyDriverProvider$Proxy$_$$_WeldClientProxy.hasStarted(Unknown Source)
at org.kie.workbench.common.screens.datasource.management.backend.core.impl.DataSourceRuntimeManagerImpl.hasStarted(DataSourceRuntimeManagerImpl.java:199)
at org.kie.workbench.common.screens.datasource.management.backend.core.impl.DataSourceRuntimeManagerImpl$Proxy$_$$_WeldClientProxy.hasStarted(Unknown Source)
at org.kie.workbench.common.screens.datasource.management.backend.DataSourceManagementBootstrap.lambda$getInitializeDeploymentsTask$0(DataSourceManagementBootstrap.java:172)
at org.kie.workbench.common.screens.datasource.management.backend.DataSourceManagementBootstrap$$Lambda$241/1920820624.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: WFLYPRT0053: Could not connect to http-remoting://127.0.0.1:9990. The connection failed
at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:122)
at org.jboss.as.protocol.ProtocolConnectionManager$EstablishingConnection.connect(ProtocolConnectionManager.java:257)
at org.jboss.as.protocol.ProtocolConnectionManager.connect(ProtocolConnectionManager.java:71)
at org.jboss.as.protocol.mgmt.FutureManagementChannel$Establishing.getChannel(FutureManagementChannel.java:218)
at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:146)
at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:65)
at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:147)
at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:122)
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:263)
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:168)
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:147)
... 16 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:321)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:567)
at ...asynchronous invocation...(Unknown Source)
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:294)
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:276)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:393)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:381)
at org.jboss.as.protocol.ProtocolConnectionUtils.connect(ProtocolConnectionUtils.java:83)
at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:114)
... 26 more
Configure the following parameters in the datasource-management.properties file located in the /WEB-INF/classes/ directory of your KieWorkbench distribution file.
e.g. in kie-wb-7.0.0.Final-wildfly10.war
datasource.management.wildfly.host=<your_hostname_or_ip>
datasource.management.wildfly.port=<your_port>
datasource.management.wildfly.admin=<your_admin_user>
datasource.management.wildfly.password=<your_admin_password>
datasource.management.wildfly.realm=ApplicationRealm
Thanks to Walter Medvedeo, who came up with this solution.
I have added following argument in start script(build.xml). And it seems to solved the error.
<arg value="-Dorg.uberfire.ext.security.management.wildfly.cli.port=<changed_port>"/>
my port was offsetted by 150 so I used 10140

Connect on MongoDB under AmazonEC2 instance

I'm starting with AmazonEC2 and created a security group with port 27017 open, but when I try to connect using "MongoClient" (java) I got the following output, can someone help me?
I'm also using Amazon Linux, and already tried to check to MongoDB documentation (https://docs.mongodb.org/ecosystem/platforms/amazon-ec2/)
Exception in monitor thread while connecting to server ec2-54-233-146-156.sa-east-1.compute.amazonaws.com:27017
com.mongodb.MongoSocketOpenException: Exception opening socket
at com.mongodb.connection.SocketStream.open(SocketStream.java:63)
at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:114)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:127)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(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)
at java.net.Socket.connect(Unknown Source)
at com.mongodb.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:50)
at com.mongodb.connection.SocketStream.open(SocketStream.java:58)
... 3 more
Follow below my security group policies print screen:
Security group policies
Check your mongodb config and ensure that the bind IP is not set to 127.0.0.1 and listens to external connections
See if you can connect to mongo locally on that port
Take a look at this if the above two don't fix your issue https://serverfault.com/a/347272/269101

Bluemix remote debugging session not starting

I have followed the Bluemix/Eclipse instructions to setup the Liberty servers in eclipse. Able to do everything with the Bluemix/eclipse tools except for remote debugging.
Receiving the following exceptions/errors when I select the "Enable Debug Mode" on my application under the servers.
Tried a longer Debug timeout but that has not helped. Any pointers?
TIA
[2015-11-30 07:16:56.832] bluemixMgmgClient - ???? [pool-1-thread-1]
.... ERROR --- ClientProxyImpl: Cannot create the websocket
connections for JavaMemcachedApp
com.ibm.ws.cloudoe.management.client.exception.ApplicationManagementException:
javax.websocket.DeploymentException: The HTTP request to initiate the
WebSocket connection failed at
com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl.onNewClientSocket(ClientProxyImpl.java:161)
at
com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl$RunServerTask.run(ClientProxyImpl.java:267)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown
Source) at java.util.concurrent.FutureTask.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:
javax.websocket.DeploymentException: The HTTP request to initiate the
WebSocket connection failed at
org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:315)
at
com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl.onNewClientSocket(ClientProxyImpl.java:158)
... 7 more Caused by: java.util.concurrent.TimeoutException at
org.apache.tomcat.websocket.AsyncChannelWrapperSecure$WrapperFuture.get(AsyncChannelWrapperSecure.java:505)
at
org.apache.tomcat.websocket.WsWebSocketContainer.processResponse(WsWebSocketContainer.java:542)
at
org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:296)
... 8 more [2015-11-30 07:17:56.868] bluemixMgmgClient - ????
[pool-1-thread-1] .... ERROR --- ClientProxyImpl: Cannot create the
websocket connections for JavaMemcachedApp
com.ibm.ws.cloudoe.management.client.exception.ApplicationManagementException:
javax.websocket.DeploymentException: The HTTP request to initiate the
WebSocket connection failed at
com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl.onNewClientSocket(ClientProxyImpl.java:161)
at
com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl$RunServerTask.run(ClientProxyImpl.java:267)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown
Source) at java.util.concurrent.FutureTask.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:
javax.websocket.DeploymentException: The HTTP request to initiate the
WebSocket connection failed at
org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:315)
at
com.ibm.ws.cloudoe.management.client.impl.ClientProxyImpl.onNewClientSocket(ClientProxyImpl.java:158)
... 7 more Caused by: java.util.concurrent.TimeoutException at
org.apache.tomcat.websocket.AsyncChannelWrapperSecure$WrapperFuture.get(AsyncChannelWrapperSecure.java:505)
at
org.apache.tomcat.websocket.WsWebSocketContainer.processResponse(WsWebSocketContainer.java:542)
at
org.apache.tomcat.websocket.WsWebSocketContainer.connectToServer(WsWebSocketContainer.java:296)
... 8 more
You need to ensure that you've done the following:
Enabled & configured the debug App Management utility as indicated here (1).
Ensure that dev mode for Eclipse Tools is enabled as indicated here (2).
Enable Remote Debug in Eclipse Tools as indicate here (3).
(1) https://www.ng.bluemix.net/docs/manageapps/app_management.html#Utilities
(2) https://www.ng.bluemix.net/docs/manageapps/app_management.html#devmode
(3) https://www.ng.bluemix.net/docs/manageapps/eclipsetools/eclipsetools.html#remotedebug
Do you happens to be using IBM JDK to launch the workbench? There is an existing problem that we are tracking on the debug support using that combination. If you happens to be using that, can you try using an Orcale JDK 8 to see if that resolves the problem?
The issue was with the JDK in use .... replaced the ORACLE JDK 7 with ORACLE JRE 8 and that resolved the issue.
Regards
RS