Macbook pro ejects every CD/DVD just after a few seconds This problem happened suddenly on my MacBook pro: when I insert a CD/DVD, it tries to read it for a few seconds (the motor of the DVD drive is working) and then it stops, and ejects the DVD.

I have read in many forums that this is a dead condition for DVD drive, and should be replaced. But some others also suggested the lens might require cleaning. Does anybody have experienced the second situation (i.e. can the problem be solved using DVD drive lens cleaner kits)?
Try the following steps and I am sure it will be fixed.


Clean the SuperDrive’s slot with compressed gas/vacuum cleaner.
Reset the NVRAM/PRAM and SMC


Reset NVRAM and PRAM:
Shut down the computer. Holding down the Command (Apple), Option, P, and R and then hold the Power button simultaneously, 3 times and wait for 3 loud chimes.

Delete the Finder’s preference files

Some people have reported successfully fixing Optical CD/DVD Drive on Mac or SuperDrive issues by deleting the Finder’s preference files (don’t worry, the Finder will automatically make new ones). You’ll want to delete two files: “com.apple.finder.plist” and “com.apple.sidebarlists.plist”. Both of these files are located in Users > [Your User] > Library > Preferences.
Run Disk Utility and Repair Disk Permissions
Delete the following configuration file to create a fresh copy

~/Library/Caches (your local Library directory). 
System/Library/extensions.kextcache.
/System/Library/Extensions.mkext.
/System/Library/Caches/com.apple.kernelcaches (a directory).
/System/Library/Caches/com.apple.romextensions (a directory).
CD Info.cidb


Credits - http://coreyjmahler.com/2013/06/15/how-to-fix-a-macbook-pro-superdrive-which-continually-ejects-discs/