How Can I Open A Port On Ubuntu?
Is anything listening on port 8888? If nothing is listening on the port you can't connect to it.
You can check if anything is listening on that port with
sudo netstat -tulpn
The port is likely open already as linux firewalls won't block localhost if you don't ask them to block it.