Error is: Attempting to use a port that is not open

You might want to look at this How to get the best out of this forum before you proceed any further.

It tells you how to post code correctly on this forum. Then you can edit that post and make it a lot easier to read.