Sometimes it can happen that for some reason you are unable to open the CD player...
This situation occurs when there is running a process that locks the resource.
To identify the incriminated process, run the following command:
fuser -v /dev/cdrom
when you find the process, if this is an application close enough to free the resource.
You can force the closure of all processes that lock the resource, in this case the cdrom with the following command:
fuser -k /dev/cdrom
