JavaDB having port connection error.

↘锁芯ラ 提交于 2019-12-31 03:56:06

问题


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


回答1:


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?




回答2:


Did you install it? Is the process running?



来源:https://stackoverflow.com/questions/25141733/javadb-having-port-connection-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!