简体   繁体   中英

JavaDB having port connection error.

I am using JavaDB for the first time and I am having trouble getting my program to run. Whenever I run it I get this error:

"Error connecting to server localhost on port 1527 with message Connection refused: connect"

My database and code are all setup okay as when I ran it on someone elses computer it worked fine, but on mine it doesn't. I'm using Netbeans 7.3.1 as that is the version I have to use for school. I am not sure what is causing this and I could really use some help. If you have any questions or want me to post some code just let me know.

Thanks

Have you checked the status of that port 1527 on your PC?

On windows:

netstat -an | find ":PORT_NUMBER"

and on Linux:

netstat -an |grep PORT_NUMBER

If it turns out it is used by some other application you can do one of two things:

1) Free the port

2) Change the port your app is running on

It might also be possible, that JavaDB is running on a different port and another you will have to either change it in DB or your app anyway.

EDIT: Here are another ways of checking the port How to determine if a port is open on a Windows server?

Did you install it? Is the process running?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM