Terminating Flask's Internal Server in Eclipse ( Aptana Pydev) - eclipse

I am using Aptana plugin in eclipse Luna. Pydev is already there in Aptana.
I am doing flask development using flask's internal web server (Werkzeug/0.10.1 Python/2.7.6).
When i run my project everything goes well but when i terminate run, my app server remain active.
It keeps serving and when i run my project again it gives me following socket error.
socket.error: [Errno 98] Address already in use
Previously i was using pydev without aptana and it was working fine. Now for every run i am killing process manually which is very annoying.
I am using ubuntu and virtualenv.
How can i overcome this issue ?
Thanks

I found solution after reading this thread.
Trick is while running your application pass use_reloader=False.
app.run("0.0.0.0", 5051, debug=True, use_reloader=False)

Related

Eclipse che cannot deploy web application archive

I'm trying to run eclipse che and i'm stuck. Everything runs fine until the 3rd step of workspace creation "injecting and starting workspace agent".
After deploying web application archive it just shows an error that the workspace agent is not responding and it will be stopped. There isn't any other error during the initialization and everything seems to load fine. I suppose
I got the same issue on both windows (8 and 10) and ubuntu latest LTS. I suppose docker is responsible for the error but i can't find any solution.
Uninstalling everything, and downloading the docker toolbox manually solved the issue on windows. Seems like the eclipse che installer has some version issues.

build.dir error in netBeans

I am working on my own, learning about Java servlets and JSPs. My machine configuration as follows is from NetBeans' About page.
Product Version: NetBeans IDE 8.0.1 (Build 201408251540)
Updates: NetBeans IDE is updated to version NetBeans 8.0.1 Patch 1.1
Java: 1.8.0_20; Java HotSpot(TM) 64-Bit Server VM 25.20-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_20-b26
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Tomcat 8.0.14 for Windows x64 is also installed as the web server.
I created a tiny web app yesterday, which was working as expected. When I went to the next exercise in the book, it was necessary to install MySQL. That seemed pretty straightforward, but alas, the install ran into a couple of problems. Unfortunately, I had not created a restore point right before that attempt, so I went back to the restore point created before the Tomcat install.
I re-installed Tomcat, and as a sanity check, started it, started NetBeans, tried to the run the tiny web app and after removing the server and re-adding it (because I got an error about the server) in NetBeans, got a message that I needed to set the build.dir.
For a tiny app, this is just annoying, but when working on a large app, it would be nice to avoid this problem. Another book author supplied app was working before, and is still working so...
Here are my questions:
1) Why/how would simply re-installing Tomcat cause a break in something that was working?
2) It seems as if the build.dir is set in build-impl.dir (in the app that is working) with a statement like (the opening and closing tags are missing so the statements would appear):
property location="${build.dir}/empty" name="empty.dir"
One post I read somewhere said that the above statement should be before the:
fail unless="build.dir">Must set build.dir
3) How/where is this build.dir set during the creation of a NetBeans web app? Is there some dialog box that I'm not completing correctly? If I miss it, is there a way to get back to it after the app gets "confused"?
Thanks in advance for any help on this.

slow eclipse remote debugging connection

I'm running linux mint 14, java 1.7.0_06-b24, eclipse 4.2. I'm building and deploying a large web app to a local WebLogic instance. When I try to connect a remote debugging session to this app for Eclipse debugging purposes, it takes quite a while ~1min to connect. Once connected, performance seems fine. Any thoughts would be greatly appreciated. Everything seemed to be working fine when I was running ubuntu and eclipse 3.8.
Did you set a big amount of breakpoints in your code?
Attaching to the JVM takes longer as more breakpoints are there.
If the experimental debugging feature Show debug values inline on text editors is enabled, it takes ~1min to connect the remote debugger.
This was introduced in version 2022-03 (4.23.0).
Solution: disable the setting.
You can find it in Window / Preferences / Run/Debug

Remote Tomcat 7 debug issues in Eclipse

I'm able to create a simple Web project in Eclipse that has a simple single HelloWorld servlet. I'm able to debug this fine with the local Tomcat (setting breakpoints in the index.jsp or in the servlet), which land when I try the sample URL:
http://localhost:8080/RemoteDebugTest/HelloWorld
However, when I try to use the Eclipse debug configuration for a remote java application, I am able to connect and see the server threads, but my application does not deploy, and the URL appears as if the web module never deployed. (There are 404 errors for the same URL above.) Help me StackOverflow, you're my only hope.
Things I have tried:
Set environment variables such as JPDA_ADDRESS to 8000, JPDA_TRANSPORT to dt_socket.
Set those in the catalina.sh (on a remote linux Tomcat7 server) or catalina.bat
Run the catalina startup script with jpda run, or with jpda start
I've extensively scoured online resources and noone else seems to have this problem, other than one article that simply recommended Jetty. (I came from a background of never having a problem with this using WAS.)
Other pieces of info:
OS: Windows 7 (64-bit)
Tomcat 7.0.0.28
MyEclipse 10 (based on Eclipse 3.7.2)

Cannot update or install any new software in any version of eclipse

I've read the other posts about being unable to install software in eclipse, but I still can't seem to get anything to work. I've tried on both Eclipse Indigo and Eclipse Juno - neither of which seem to be able to connect to anything, yet I can open the web browser.
On my other computer, which was previously configured, it contacts the software sites perfectly fine. I can also use the internal web browser on both version of eclipse - navigating to www.google.com.
I've tried updating Eclipse using http://download.eclipse.org/releases/indigo/ and I have tried to install ADT with https://dl-ssl.google.com/android/eclipse/.
I'm attaching an image of the error I'm getting. Also it appears I am getting 'permission denied'
Regarding the ADT, i couldnt get it to work with indigo for the life of me. After looking around a lot i realized that there are some comparability restrictions for the ADT plug in. The latest version of the ADT works on Eclipse Helios 3.6 or higher.
http://developer.android.com/sdk/requirements.html
also make sure to do "run as administrator" when you start eclipse if you are going to install software.
I had the same problem, I'm not sure if it would help but here is what I did anyway:
Uninstalled AVG
Ran SFC /scannow
SFC found some corrupted windows files and repaired them
Restart
Not sure if uninstalling AVG did anything, but I saw it as a possible solution somewhere else.
I am now using MSE since it seems to be more compatible with my system...
Maybe you need to connect thru a proxy?
Check you browsers connections settings.
I've had the same issue before and it turned out to be due to a VPN connection I had open. It must have been trying to go via that, although no other applications have had that problem. So perhaps check that you don't have any static routes which are interfering.