Troubleshooting macOS

Test cx_Oracle in Python

Use the following instructions to test the installaion of cx_Oracle

Open the “Python 3.5 (64-bit)” application from the windows start menu.

Run the following commands in Python:

import cx_Oracle
con = cx_Oracle.connect('username/password@hostname/instance')
print con.version
# Expcect to see ""

ORA-21561: OID generation failed

In macOS, You might see the following error :

sqlalchemy.exc.DatabaseError: (cx_Oracle.DatabaseError) ORA-21561: OID generation failed

This is caused by the macOS hostname under “sharing” not matching the name in /etc/hosts

Run hostname to get the name of the mac :

Synerty-256:build-web jchesney$ hostname

Confirm that it matches the hostnames for and ::1 in /etc/hosts :

Synerty-256:build-web jchesney$ cat /etc/hosts
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##       localhost syn256.local broadcasthost
::1             localhost syn256.local