This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[1077IE] JDK1.3.0Beta-b15 linux ==================== I don't know if it's some restriction of LINUX OS, so if that is, excuse me this. I want change the HTTP port from default value (8082) to 8077, but I received the "java.net.BindException: Address already in use" and port was setted on 8078. There is a short output from console window: -------------------------------------------- Internal HTTP server running on port 8082 Internal RMI registry running on port 1099 Internal HTTP server stopped path="" :jsp: init Internal HTTP server running on port 8077 Internal HTTP server stopped path="" :jsp: init java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:397) at java.net.ServerSocket.<init>(ServerSocket.java:170) at java.net.ServerSocket.<init>(ServerSocket.java:121) at org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:97) at org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:235) at org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:187) at org.apache.tomcat.core.ContextManager.start(ContextManager.java:450) at org.netbeans.modules.httpserver.HttpServerModule$1.run(HttpServerModule.java:106) path="" :jsp: init Internal HTTP server running on port 8078 --------------------------------------------------------- I'm not experinced on linux so some other process could use this port, so for your convenience I attache file with all my running process on my PC
Created attachment 92 [details] A list of running processes on my PC
now, I'm little bit more clever than last time. So I realized that the IDE doesn't close opened port imedietly and leave them opened for an undefined long time. ------------------ So, There might be problem about port value 8079 (always I got into a troubles with this), but occasionaly it works too. I'm sure that this port hadn't beeing used any other application even IDE. Once I try to change the HTTP port from default value to 8079 in most cases it fails (this address is used) and it trys iterate to next value which I don't like 8080. After restart IDE is possible to adjust port value to 8079. Bud if I try to change to something like 8080 than to switch back I recieve the same Exception but twice because its attempt to iterate fails on a value 8080 too and if you switch tho port to next value(8082) than to (8083) and so on... And try to back decrease this value eg. to 8080 or 8079 all 5 attemts to find free port fail. ------------ So, I think IDE holds opened ports unreasenably and leads a user to troubles and to feel discomfortable. Pls, do you think it could be solve or is there for it any reason? And I attach onother useful attachment I hope.
Created attachment 99 [details] output of netstat -a a lsof -i
this is probably problem only on linux (tested on W2K and Solaris without problem). It's seems that IDE or JDK on linux doesn't close ports and that leads to troubles.
[NBdev-125] jdk1.3.0_01 PFCS Sun (or other vendors jdk1.3x) rh70, Linux 2.2.16-20smp ========================= As I wrote the mentioned problem is only on linux:-( The main problem persists: -------------------------- if you change port No. to other and than you change it to previous value, you'll receive: java.net.BindException: Adresa je u?ívána and new value is adjusted (wanted val.+ (1 to 5)) Only restart of IDE helps.
assigned
*** Issue 8129 has been marked as a duplicate of this issue. ***
Simple workaround is to set J2SE_PREEMPTCLOSE=1 variable. See http://developer.java.sun.com/developer/bugParade/bugs/4344135.html for more details about this.
The workaround works but has a side effect that all proceses executed by Runtime.getRuntime().exec() load libpreemptive_close.so library where patched version of some system calls is implemented. This causes for example external browser (Netscape or Mozilla) doesn't work. Also it is declared that Merlin will fix this issue.
hmmm....what could I do then verify it:-/
Resolved for 3.3.x or earlier, no new info since then -> closing.