NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Attaching to localhost:xxxxx Connection refused

 
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users
View previous topic :: View next topic  
Author Message
saadkhan



Joined: 27 Jan 2009
Posts: 3
Location: Pakistan

PostPosted: Tue Jan 27, 2009 4:18 am    Post subject: Attaching to localhost:xxxxx Connection refused Reply with quote

Whenever i tries to run my MIDP application using Netbeans IDE, it gives me "Attaching to localhost:50001 Connection refused" and application gets hanged.......
I am new to Netbeans and J2ME, plz help me!!!!
Back to top
Karol Harezlak
Posted via mailing list.





PostPosted: Tue Jan 27, 2009 9:49 am    Post subject: Attaching to localhost:xxxxx Connection refused Reply with quote

Maybe you firewall blocks connection to this port.

Karol

saadkhan wrote:
Quote:
Whenever i tries to run my MIDP application using Netbeans IDE, it gives me "Attaching to localhost:50001 Connection refused" and application gets hanged.......

I am new to Netbeans and J2ME, plz help me!!!!

------------------------
Saad Khan












--
Karol Harezlak <address-removed>
Sun Microsystems, Inc. NetBeans Mobility
Back to top
forssander



Joined: 12 Feb 2009
Posts: 1

PostPosted: Thu Feb 12, 2009 2:07 am    Post subject: Reply with quote

i got the same problem. my netbeans is working on my laptop (windows 7 32bit+ kaspersky firewall) on my (xp 32bit + comodo firewall) but not on my 64bit vista. I tried turning off the firewall and all, but nothing. I have only tried to debug and run the hello world MIDlet that u get from creating a new project. OneĀ“more thing is that when creating a new ME project the window hang when clicking next after "Default Platform Selection" and i cant add the project in Libraries and Resources.

I have tried reinstalling, cleaning the registry and resetting windows.

Please help! Embarassed
Back to top
gdzack



Joined: 23 Feb 2009
Posts: 3

PostPosted: Mon Feb 23, 2009 1:57 pm    Post subject: Reply with quote

Exactly the same issue here. What's going wrong? I got this message:

dpDebugTask connecting to debugger 1 ..
KdpDebugTask connecting to debugger 2 ..
KdpDebugTask connecting to debugger 3 ..
KdpDebugTask connecting to debugger 4 ..


So I have to force it to exit.
Back to top
johnrajbd



Joined: 31 Mar 2009
Posts: 1

PostPosted: Tue Mar 31, 2009 2:56 pm    Post subject: Reply with quote

I was also facing the same problem. After some research I have found that NetBeans was showing an error "com.sun.kvem.midletsuite.InvalidJadException: Reason = 22" in it's debug window while it was showing "Attaching to localhost:xxxxx Connection refused" in DebuggerConsole.

To resolve this problem you need to add midlet information in that projects properties file. Here are the steps -

1. Goto project directory. e.g. C:\Documents and Settings\John\My Documents\NetBeansProjects\MobileApplication1
2. Open nbproject\project.properties file using any text editor.
3. Search for manifest.midlets
4. Make that line like - manifest.midlets=MIDlet-1: HelloMidlet, , hello.HelloMidlet\n
Here "HelloMidlet" is your midlet name and "hello" is the package name.

I think this might solve your problem.
Back to top
tylerdurden45



Joined: 03 Apr 2009
Posts: 15

PostPosted: Fri Apr 03, 2009 11:14 am    Post subject: Help Regarding to Topic Reply with quote

Hello At All?
I was using nb 6.5 mobility and suddenly i have started to couldnt debugging.

NB gives me connection reset error

and on debug view.
KdpDebugTask connecting to debugger 1..
...
...
KdpDebugTask connecting to debugger 9 ..
Connecting JPDA Debugger to emulator timed out after 9 attempts and 136 seconds.

I restarted to pc, checked process but there are process related with NB.
Also; tried to uninstall 6.5 but not fully uninstalled.
Also; tried to install 6.5.1 and i have given same error with it.
Also;tried to instrall 6.7 and same error;

What should i do more?
Thanks in Advance
Best Regards
Back to top
adhoul



Joined: 07 Apr 2009
Posts: 1

PostPosted: Tue Apr 07, 2009 10:50 am    Post subject: Reply with quote

I dont know if this helps anybody, but I had a problem with NetBeans 6.5 and GlassFish v3 server using Vista. The project I have created could not be deployed, and I was getting an error about

Could not connect to the server

the solution was to change the priviledges of me(user) on my PC, so that I had write priviledges on the Glassfish folder. You can do it with 2 ways,

1) right-click Program Files -> Security -> Change Priviledges for you -> adding to the administrator priviledges..

2) executing the change priviledges commands from the command prompt..

this solved the problem and the applications can now be deployed...

good luck hope it helps somebody
Back to top
tylerdurden45



Joined: 03 Apr 2009
Posts: 15

PostPosted: Tue Apr 07, 2009 11:10 am    Post subject: Solution Reply with quote

Thanks for your reply
But I have solved it:

I have uninstall netbeans and plugins
uninstall all java, jdk, jre

restart machine

install jdk
install netbeans

problem was solved Smile



adhoul wrote:
I dont know if this helps anybody, but I had a problem with NetBeans 6.5 and GlassFish v3 server using Vista. The project I have created could not be deployed, and I was getting an error about

Could not connect to the server

the solution was to change the priviledges of me(user) on my PC, so that I had write priviledges on the Glassfish folder. You can do it with 2 ways,

1) right-click Program Files -> Security -> Change Priviledges for you -> adding to the administrator priviledges..

2) executing the change priviledges commands from the command prompt..

this solved the problem and the applications can now be deployed...

good luck hope it helps somebody
Back to top
shinigamieye



Joined: 29 May 2009
Posts: 4

PostPosted: Fri May 29, 2009 11:18 am    Post subject: Reply with quote

Hi to all,
I'm still having the debugger hanging when I'm trying to debug my midlet.
I've tried to:
1) turnin off my firewall (windows and nod32 both)
2) tryin to open ports but when attaching to localhost it changes port on which debugger wants to listen to
3) reinstall both java and netbeans; here i obtained a little change of error
(from "connection reset " to "connection refused"in the debugger console
4) trying to change file.properties at the line manifest.midlets


......but the debugger still doesnt work Sad And I need the debugger disperatly to finish my final year project. I searched widely nb forums but none solution I read fixed the problem Sad

Here's my output:

Starting emulator in debug server mode on port 1171
nbdebug:
Adding 967 second for debugger timeout
Connecting to 127.0.0.1 on port 2800
Waiting for KVM...
Waiting for debugger on port 1171
Connected to KVM
DebuggerListener: socket closed
KdpDebugTask connecting to debugger 1 ..
Running with storage root C:\Documents and Settings\Superfurius\j2mewtk\2.5.2\appdb\temp.DefaultColorPhone103
Running with locale: Italian_Italy.1252
Running in the identified_third_party security domain
KdpDebugTask connecting to debugger 2 ..
KdpDebugTask connecting to debugger 3 ..
KdpDebugTask connecting to debugger 4 ..
KdpDebugTask connecting to debugger 5 ..
KdpDebugTask connecting to debugger 6 ..
KdpDebugTask connecting to debugger 7 ..
KdpDebugTask connecting to debugger 8 ..
KdpDebugTask connecting to debugger 9 ..
KdpDebugTask connecting to debugger 10 ..
KdpDebugTask connecting to debugger 11 ..
KdpDebugTask connecting to debugger 12 ..
KdpDebugTask connecting to debugger 13 ..
KdpDebugTask connecting to debugger 14 ..
KdpDebugTask connecting to debugger 15 ..
KdpDebugTask connecting to debugger 16 ..
KdpDebugTask connecting to debugger 17 ..
KdpDebugTask connecting to debugger 18 ..
KdpDebugTask connecting to debugger 19 ..
KdpDebugTask connecting to debugger 20 ..
KdpDebugTask connecting to debugger 21 ..
KdpDebugTask connecting to debugger 22 ..
KdpDebugTask connecting to debugger 23 ..
KdpDebugTask connecting to debugger 24 ..
KdpDebugTask connecting to debugger 25 ..
KdpDebugTask connecting to debugger 26 ..


If anyone still has my problem and could help me I will appreciate a lot .

Thank you

Vincent
Back to top
smcneese



Joined: 29 May 2009
Posts: 11

PostPosted: Tue Jun 02, 2009 1:53 pm    Post subject: Same Problem Reply with quote

I started getting this problem - I think after a Java update. I have a MIDLET that was already tested, working and deployed. I went to change some functionality and when i tried to debug it I got this error. If I deploy my original application, it crashes on the phone. SOmething has changed in my environment, but I cannot figure it out without being able to debug to see what is crashing the phone.

I have uninstalled and resinstalled everything related to Java on my machine, but that did not resolve the problem. Can anybody help identify the issue?

Thank you,

Steve
Back to top
guinui



Joined: 30 Nov 2011
Posts: 2

PostPosted: Wed Nov 30, 2011 8:10 pm    Post subject: Reply with quote

Try the following:

Find your host file and check for localhost (on Linux/OSX)

Code:

$ cat /etc/hosts

##
# Host Database
#
127.0.0.1   localhost


Make sure you have localhost setup. If not, then add it like so and save.
Code:

$ sudo vi /etc/hostconfig

127.0.0.1   localhost

$ dscacheutil -flushcache


Restart/Recompile Tomcat/GlassFish server in debug mode.


If that still does not work and you still get connection refused error, then you can attach a debugger to the current session.

On NetBeans, go to Debug > Attach Debugger.
Back to top
witbooie



Joined: 13 Feb 2015
Posts: 1

PostPosted: Fri Feb 13, 2015 11:41 am    Post subject: Reply with quote

I resolved this by simply granting myself full permission(rights) on the netbeans folder and my project folders.

I also start Netbeans as administrator.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java ME Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo