I installed Docker and run the first Cassandra node and used Cqlsh to run some commands and it works fine. I installed python driver and then when i run the command below i get the following error. I saw many stack questions and not much people were able to answer. Please give your ideas. I have been longing for a while to use cassandra but could never come up with a good solution for this problem. Thanks
>>> from cassandra.cluster import Cluster
>>> cluster=Cluster()
>>> keyspace='north'
>>> session=Cluster(['192.168.1.xx']).connect()
Error
cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers', {'192.168.1.xx': ConnectionRefusedError(111, "Tried connecting to [('192.168.1.xx', 9042)]. Last error: Connection refused")})
When i tried to replace the Ip address with the cassandra node which i created, 'node1' in my case it gives me this error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cassandra/cluster.py", line 826, in cassandra.cluster.Cluster.__init__
File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -5] No address associated with hostname
I actually solved this by giving the container Ip address which was inside the docker. I was quite confused which address i should give. But then after running this command.
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id.
I was not aware that i need to specify the container id which had the cluster node. So i was always giving the ip address of the machine.
The IP address you have provided is not valid: 192.168.1.xx.
You need provide the IP address (or valid hostname) of at least one node in your cluster.
Related
I'm running Django 3.2 with django-tenants on a Windows local dev environment.
In my windows hosts file I have:
127.0.0.1 *.localhost
...so that I am able to use subdomains with django-tenants. E.g. http://mysub.localhost:8000.
When running ./manage.py runserver the dev server runs perfectly. However, when trying to execute urlopen in my code I get an error:
>>> html = urlopen('http://mysub.localhost:8000')
Traceback (most recent call last):
[...]
urllib.error.URLError: <urlopen error [Errno 11001] getaddrinfo failed>
As far as I can tell the error is due to the proxy settings on my windows machine (this does not fail in production), but I am unsure how to resolve it?
I'm trying to implement a multi-node job using Pytorch's DistributedDataParallel on a University supercomputer where I'm logging in via ssh using port 22. Following this tutorial, when I set MASTER_PORT=12340 or some other number on the SLURM script, I obviously get no response since there's nothing happening on it. If I set MASTER_PORT=22, I get permission denied when the code reaches the dist.init_process_group() method:
dist.init_process_group(backend=opt.dist_backend, init_method=opt.dist_url,
world_size=opt.world_size, rank=opt.rank)
GIVES ME
Traceback (most recent call last):
File "train_dist.py", line 262, in <module>
main()
File "train_dist.py", line 220, in main
world_size=opt.world_size, rank=opt.rank)
File "/home/miniconda3/envs/vit/lib/python3.7/site-packages/torch/distributed/distributed_c10d.py", line 595, in init_process_group
store, rank, world_size = next(rendezvous_iterator)
File "/home/miniconda3/envs/vit/lib/python3.7/site-packages/torch/distributed/rendezvous.py", line 232, in _env_rendezvous_handler
store = _create_c10d_store(master_addr, master_port, rank, world_size, timeout)
File "/home/miniconda3/envs/vit/lib/python3.7/site-packages/torch/distributed/rendezvous.py", line 161, in _create_c10d_store
hostname, port, world_size, start_daemon, timeout, multi_tenant=True
RuntimeError: The server socket has failed to listen on any local network address. The server socket has failed to bind to [::]:22 (errno: 13 - Permission denied). The server socket has failed to bind to 0.0.0.0:22 (errno: 13 - Permission denied).
I have also tried to re-route the port 22 traffic to some other port (eg. 65000) but I also get permission denied for even attempting this rerouting. I'm not sure what else I can try to do at this point, anyone has any suggestions or is this something that I need to ask the administrator for?
I have been trying to get a connection between TwinCAT 3 on Windows and Python on Ubuntu. I already have the connection between Twincat 3 Windows and Python Windows working, but not to Ubuntu. I have a virtual machine set up through Oracle VM Virtualbox. I tried many things but so far had no success in creating the connection.
I have a bridged adapter network and tried to open the port of the IP address of the virtual machine in linux through sudo ufw allow
I have the following code:
pyads.open_port()
pyads.add_route('10.11.104.206.1.1','127.0.0.1')
pyads.close_port()
plc = pyads.Connection('10.11.104.206.1.1', 851)
plc.open()
try:
# try to connect to PLC
plc.read_state()
print('Connection succeeded')
except Exception:
print('Connection failed')
And this is the error I get:
2020-11-22T22:45:46+0100 Error: Connect TCP socket failed with: 111
Traceback (most recent call last):
File "/home/laurence/ws_moveit/devel/lib/moveit_tutorials/move_panda_LKO.py", line 15, in <module>
exec(compile(fh.read(), python_script, 'exec'), context)
File "/home/laurence/ws_moveit/src/moveit_tutorials/doc/move_panda_LKO/scripts/move_panda_LKO.py", line 64, in <module>
pyads.add_route('10.11.104.206.1.1','127.0.0.1')
File "/usr/local/lib/python3.8/dist-packages/pyads/ads.py", line 188, in add_route
return adsAddRoute(adr.netIdStruct(), ip_address)
File "/usr/local/lib/python3.8/dist-packages/pyads/pyads_ex.py", line 155, in wrapper
return fn(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/pyads/pyads_ex.py", line 177, in adsAddRoute
raise ADSError(error_code)
pyads.pyads_ex.ADSError: ADSError: target port not found ADS Server not started (6).
These are the netid/IPadresses.
-
-
-
CX-52EE70
169.254.64.202
5.82.238.112.1.1
TCP_IP
-
LEENLAPTOP19
127.0.0.1
10.11.104.206.1.1
TCP_IP
I have tried combinations with other netid/IP addresses so sometimes I get other errors (110,113) but usually 111 which means connection refused, but I do not know what I am doing wrong. Any ideas?
Please make sure the plc runtime is running (a plc program) when you connect. If the plc is in config or exception mode the plc runtime ads port (851 (or 801 for TC2)) is not present. That is what the ADS error 6 target port not found is trying to tell us.
My opscenter always gets stuck with Loading OpsCenter... BTW this is my first installation and so far I did not get OpsCenter to run.
All three of these run normally.
nodetool status
service dse
service datastax-agent
I could reproduce it on both GChrome & MFirefox. Both remotely & running on localhost.
opscenterd.log :
2017-04-12 15:20:15,877 [myclustername] WARN: These nodes reported this message, Nodes: ['10.35.21.207'] Message: HTTP request http://10.35.21.207:61621/connection-status? failed:
An error occurred while connecting: 107: Transport endpoint is not connected. (MainThread)
when using life cycle manager , it sees my cluster name I picked but could not connect. Here's what the log looks like when I attempt to start managing the un-managed cluster.
[opscenterd] ERROR: Problem while calling ImportClusterIntoLifecycleManagerController (AgentCommunicationFailure): Cluster Import Failure: Unable to determine the DSE version for the specified cluster. Please verify that the Agents for this cluster are properly communicating with Opscenter.
File "/usr/share/opscenter/lib/py/twisted/internet/defer.py", line 1122, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/share/opscenter/lib/py/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/share/opscenter/jython/Lib/site-packages/opscenterd/WebServer.py", line 2598, in ImportClusterIntoLifecycleManagerController
I downloaded the tar.gz file and I'm trying to install Opscenter. I am getting the following error.
ERROR:
Trying to download https://opscenter.datastax.com:443/definitions/5.0.1/version.md5
resulted in following error:
Traceback (most recent call last):
File "build/lib/python2.6/site-packages/opscenterd/Definitions.py", line 133, in getNewHash
DNSLookupError: DNS lookup failed: address 'opscenter.datastax.com' not found: [Errno -2] Name or service not known.
Do I need to have internet access to install Opscenter?
This error should not prevent OpsCenter from working correctly, you just won’t have update information (for cases when you’re running outdated versions of Cassandra or OpsCenter.)
OpsCenter does not require internet connection.
You should be able to configure OpsCenter to not fetch the updated definition files. Refer to OpsCenter configuration properties and look for the [definitions] auto_update property which you can set to False.