Open a terminal and become root.
$ sudo su
Try eject command.
If some application of is using cdrom you will get a message like
umount: /media/cdrom: device is busy
To eject the CD you may have to stop the application. First, let us find out who is using the CD drive.
/media/cdrom: 5929c 6018c 6020c
You can kill all processes accessing using /media/cdrom
# fuser -km /media/cdrom