How to fix this error on my minecraft server?

I'm trying to make a minecraft server. I can't log into it. Whenever I tried to go onto it, it reads:

Failed to connect to the server
java.net.ConnectException: Connection refused: no further information:

What should I check?

Vauge question…
1. Check to see if the server is actually online.
2. From where are you trying to connect to it? If it is being hosted on the computer you are going to play minecraft on, connect to it with localhost.
3. If you are on a different computer in the same Wi-Fi network, use your internal ip
4. Outside your network, use your external ip.
Best i can do with your information, hope it helps!