Why can't I connect to a minecraft server?

I try to log into a server I've had no trouble with before and it gives me this:
java.netConnectException: Connection refused. No further information.
What do I do?

Try to google the problem see if anyone's having the same and found a solution. My advice for you is to check if you are running a 32 or a 64-bit operating system and then go to java.com and download and install the latest java.
Hope it helped.

Whose server?

If you are the host, it's generally a good idea to add Minecraft as an exception to your firewall and/or port forwarded to your router. The port to add is 25565. Instructions on port forwarding can be found here: http://portforward.com (you will need to know your router's brand and model; Minecraft should be listed if your router is supported). Once added, run the server and check to see if the port is open (using http://www.yougetsignal.com/tools/open-ports/ ).

If someone else hosts the server, relay the instructions to them as their session may have closed port(s) on their public IP. You can check this manually with the port checker linked if you know the IP/address of the server. A closed port will not allow you to join except through localhost (which only works if the server is running from your computer, not for anyone else).

Alternatively, is there a website for the server? I'd suggest checking for maintenance/downtime notices from the staff/owner, reporting the issue or requesting support from the server's staff if the issue seems isolated. Best of luck!