Thanks Dave - yes, I'm on a mac but still no luck. The script is still failing instantly even with uopy-1.2.0 whether or not I have the correct parameters in my connect string.
- Is there a config file with default values I should look to overwrite (port?)?
- uopy.connect(hostname='uchlpcolduor01.uchastings.local ', user='SOMEUSER', password='SOMEPASSWORD', account='SOMEACCOUNT')
- I have DNS resolution
-
% ping uchlpcolduor01.uchastings.local
PING uchlpcolduor01.uchastings.local (172.25.155.243): 56 data bytes
64 bytes from 172.25.155.243: icmp_seq=0 ttl=63 time=169.051 ms
^C
--- uchlpcolduor01.uchastings.local ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 169.051/169.051/169.051/nan ms
- I can connect to the server via ssh (and through Java UniObjects):
- I rolled back to uopy-1.2.0
Same old error - are there debugging steps I can take?
(.venv) adam@A010503 python % "/Users/adam/Documents/Developer Workspaces/python/.venv/bin/python" "/Users/adam/Documents/Developer Workspaces/python/Uniobjects for Python/helloworld.py"
Traceback (most recent call last):
File "/Users/adam/Documents/Developer Workspaces/python/.venv/lib/python3.12/site-packages/uopy/_unirpc.py", line 139, in __init__
self._socket = socket.create_connection((host, port), timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 852, in create_connection
raise exceptions[0]
File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 837, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/adam/Documents/Developer Workspaces/python/Uniobjects for Python/helloworld.py", line 3, in <module>
ses = uopy.connect(hostname='SOMEHOST', user='SOMEUSER', password='SOMEPASSWORD', account='SOMEACCOUNT')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adam/Documents/Developer Workspaces/python/.venv/lib/python3.12/site-packages/uopy/_uopy.py", line 112, in connect
session.connect()
File "/Users/adam/Documents/Developer Workspaces/python/.venv/lib/python3.12/site-packages/uopy/_session.py", line 213, in connect
self._rpc_connection.connect()
File "/Users/adam/Documents/Developer Workspaces/python/.venv/lib/python3.12/site-packages/uopy/_unirpc.py", line 92, in connect
self.rpc_socket = _UniRPCSocket(self.host, self.port, self.timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adam/Documents/Developer Workspaces/python/.venv/lib/python3.12/site-packages/uopy/_unirpc.py", line 149, in __init__
raise UOError(ErrorCodes.UOE_RPC_FAILED) from e
uopy._uoerror.UOError: Error [81009] : The RPC failed
(.venv) adam@A010503 python %
------------------------------
Adam Hamilton
UNIVERSITY OF CALIFORNIA - HASTINGS COLLEGE OF LAW
San Francisco CA US
------------------------------
Original Message:
Sent: 02-23-2024 19:24
From: Dave Weinstein
Subject: Connection to Ellucian UniData Database Fails from UOPY
I've just noticed your file paths look like you are on Mac. Can you try uopy 1.2.0? There is a bug on 1.3.0 connecting with Mac if I remember correctly.
A 'pip install uopy==1.2.0' and then trying your test code may prove/disprove that.
Regards,
------------------------------
Dave Weinstein
Associate Technical Support Engineer
Rocket Internal - All Brands
Original Message:
Sent: 02-22-2024 17:59
From: Adam Hamilton
Subject: Connection to Ellucian UniData Database Fails from UOPY
Hey,
I am migrating our codebase from Java to Python but when using the same parameters I am unable to get a connection to the Ellucian database. Any help with troubleshooting this is appreciated!!
My code is:
import uopy
ses = uopy.connect(hostname='databaseURL', user='databaseUser', password='databasePassword', account='databaseAccount')
cmd = uopy.Command("LIST STUDENT.TERMS")
cmd.run()
print(cmd.response)
and my error is:
"/Users/adam/Documents/Developer Workspaces/python/.venv/bin/python" "/Users/adam/Documents/Developer Workspaces/python/Uniobjects for Python/helloworld.py"
(.venv) adam@A010503 python % "/Users/adam/Documents/Developer Workspaces/python/.venv/bin/python" "/Users/adam/Documents/Developer Workspaces/python/Uniobjects for Python/helloworld.py"
Traceback (most recent call last):
File "/Users/adam/Documents/Developer Workspaces/python/.venv/lib/python3.12/site-packages/uopy/_unirpc.py", line 152, in __init__
self._socket = socket.create_connection((host, port), timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 852, in create_connection raise exceptions[0]
File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 837, in create_connection sock.connect(sa)
ConnectionRefusedError: [Errno 61] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/adam/Documents/Developer Workspaces/python/Uniobjects for Python/helloworld.py", line 3, in <module>
ses = uopy.connect(hostname='databaseURL', user='databaseUser', password='databasePassword', account='databaseAccount')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adam/Documents/Developer Workspaces/python/.venv/lib/python3.12/site-packages/uopy/_uopy.py", line 121, in connect
session.connect()
File "/Users/adam/Documents/Developer Workspaces/python/.venv/lib/python3.12/site-packages/uopy/_session.py", line 299, in connect
self._rpc_connection.connect()
File "/Users/adam/Documents/Developer Workspaces/python/.venv/lib/python3.12/site-packages/uopy/_unirpc.py", line 105, in connect
self.rpc_socket = _UniRPCSocket(self.host, self.port, self.timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/adam/Documents/Developer Workspaces/python/.venv/lib/python3.12/site-packages/uopy/_unirpc.py", line 170, in __init__
raise UOError(ErrorCodes.UOE_RPC_FAILED) from e
uopy._uoerror.UOError: Error [81009] : The RPC failed
(.venv) adam@A010503 python %
Thanks,
Adam
------------------------------
Adam Hamilton
UNIVERSITY OF CALIFORNIA - HASTINGS COLLEGE OF LAW
San Francisco CA US
------------------------------