I am trying to connect SAP HANA DB through Python using Putty(Ubuntu) with the below script but receiving Connection Refused error.
Error: ConnectionRefusedError: [Errno 111] Connection refused
Note: The SAP HANA which I am trying to connect is hosted on AWS server.
import pyhdb
class hana(object):
def opencon(self):
conn= pyhdb.connect(host='10.1.3.66',
port=XXXXX,
user='XXXXX',
password='XXXXX')
cursor = conn.cursor()
print(conn.isconnected())
HanaDB = hana()
HanaDB.opencon()
Have you been able to connect to your instance with other HANA clients, like SAP HANA Studio or hdbsql?
Right now, it just looks like the connection gets refused on the TCP/IP level, maybe due to some firewall setting!?
Related
I have two computers running Windows 10 that have identical SAS installations, and (theoretically) everything else is the same as well. I am running some code that works fine on one computer, but results in the following errors on the other when trying to connect to MS Excel/Access:
ERROR: CLI error trying to establish connection: [Microsoft][ODBC
Excel Driver] Too many client tasks. ERROR: CLI error trying to
establish connection: [Microsoft][ODBC Microsoft Access Driver] Too
many client tasks.
Any suggestions on what I can compare on the two computers to figure out why one is having this issue?
Thanks in advance!
I'm trying to connect to a SAP SQLANYWHERE server using syqlanydb library and even sqlalchemy however both scenarios I get
sqlanydb.OperationalError: (b'Specified database not found', -83)
I can use the same connection details to connect using clients such as DBeaver but no matter what can't connect to this server, I've also tried ODBC drivers but server wasn't returning anything.
I have sqlanywhere 17 installed matching server and port 2638 is open. Have in mind this is a remote server.
My connection string:
sybase_connection_string = "sqlalchemy_sqlany://{user}:{pwd}#{host}:{port}/{db}".format(user=user, pwd=pwd, host=host, port=port, db=database)
engine = create_engine(sybase_connection_string)
engine.connect(sybase_connection_string)
Has anyone experienced this?
Thanks
I'm trying to connect presto to minio using the hive connector, however, when querying I get a connection refused message.
presto connector config:
connector.name=hive-hadoop2
hive.metastore=file
hive.metastore.catalog.dir=s3://airports/
hive.allow-drop-table=true
hive.s3.aws-access-key=accesskey
hive.s3.aws-secret-key=secretkey
hive.s3.endpoint=http://127.0.0.1:9000
hive.s3.path-style-access=true
hive.s3.ssl.enabled=false
hive.s3select-pushdown.enabled=true
error msg when trying to get the tables:
org.apache.http.conn.HttpHostConnectException: Connect to localhost:9000 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
I have been trying to connect my node js application to mongo db atlas but i keep getting this error
`MongoDB shell version v4.2.5
connecting to: mongodb://cluster0-shard-00-02-kmhdr.mongodb.net:27017,cluster0-shard-00-00-kmhdr.mongodb.net:27017,cluster0-shard-00-01-kmhdr.mongodb.net:27017/test?authSource=admin&compressors=disabled&gssapiServiceName=mongodb&replicaSet=Cluster0-shard-0&ssl=true
2020-04-12T18:35:54.356-0700 I NETWORK [js] Starting new replica set monitor for Cluster0-shard-0/cluster0-shard-00-02-kmhdr.mongodb.net:27017,cluster0-shard-00-00-kmhdr.mongodb.net:27017,cluster0-shard-00-01-kmhdr.mongodb.net:27017
2020-04-12T18:35:54.358-0700 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to cluster0-shard-00-02-kmhdr.mongodb.net:27017
2020-04-12T18:35:54.359-0700 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to cluster0-shard-00-01-kmhdr.mongodb.net:27017
2020-04-12T18:35:54.359-0700 I CONNPOOL [ReplicaSetMonitor-TaskExecutor] Connecting to cluster0-shard-00-00-kmhdr.mongodb.net:27017
2020-04-12T18:35:56.232-0700 I NETWORK [ReplicaSetMonitor-TaskExecutor] Confirmed replica set for Cluster0-shard-0 is Cluster0-shard-0/cluster0-shard-00-00-kmhdr.mongodb.net:27017,cluster0-shard-00-01-kmhdr.mongodb.net:27017,cluster0-shard-00-02-kmhdr.mongodb.net:27017
2020-04-12T18:35:58.988-0700 I NETWORK [js] Marking host cluster0-shard-00-02-kmhdr.mongodb.net:27017 as failed :: caused by :: Location40659: can't connect to new replica set master [cluster0-shard-00-02-kmhdr.mongodb.net:27017], err: AuthenticationFailed: bad auth Authentication failed.
*** It looks like this is a MongoDB Atlas cluster. Please ensure that your IP whitelist allows connections from your network.
2020-04-12T18:35:58.991-0700 E QUERY [js] Error: can't connect to new replica set master [cluster0-shard-00-02-kmhdr.mongodb.net:27017], err: AuthenticationFailed: bad auth Authentication failed. :
connect#src/mongo/shell/mongo.js:341:17
#(connect):2:6
2020-04-12T18:35:59.025-0700 F - [main] exception: connect failed
2020-04-12T18:35:59.026-0700 E - [main] exiting with code 1
Please help me resolve this issue. Thanks
I had similar issue.
Check if your ip is whitelisted. Follow instructions here
https://docs.atlas.mongodb.com/tutorial/whitelist-connection-ip-address/.
Check your system/hosting is not blocking port 27017 and for testing of this port see instructions on http://portquiz.net:27017/
That's how i solved this.
The following code (with variables changed) is what I am trying to use in order to contact a sharepoint server (and ultimately download files from). But I appear to be getting an error related to urllib, for which I can't work out the reason for.
from sharepoint import SharePointSite, basic_auth_opener
server_url = "http://sharepoint.domain.com/"
opener = basic_auth_opener(server_url, "domain/username", "password")
site = SharePointSite(server_url, opener)
sp_list = site.lists
for sp_list in site.lists:
print(sp_list.id, sp_list.meta['Title'])
The error is as follows
urllib.error.URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Could you try with below code
import requests from requests_ntlm import HttpNtlmAuth
requests.get("http://sharepoint.domain.com", auth=HttpNtlmAuth('DOMAIN\\USERNAME','PASSWORD'))