I'm using eclipse to debug a google app engine app. I'd like to connect to the GAE App running on Eclipse on my laptop from my iPhone.
In eclipse I tried Run->Debug Configurations and then adding an --address option to use my IP address
But I must not be doing it right because I get this error when I try to debug
[Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
Usage: [options]
Any idea how to do this?
Thanks!
I had the same issue, found this post and was able to solve with your tips. Thanks
First, don't add the --address at the end of the argument list or the war path gets auto added twice to the arguments (see in your screen shot that you have an extra /Users/arc/Documents/workspace/jsoup/war added after the --address
Second. The --address doesn't seem to work for me on Linux Mint and Eclipse Junu. I had to use -a
So my argument list looks like:
-a 0.0.0.0 --port=8080 /home/d/workspace/blah/war
Setting the IP address to 0.0.0.0 should get it working.. (I don't know how to successfully do that in Eclipse)
Add -bindAddress *localIPaddress* just before -port argument. It worked for me.
For those looking into this who are using IntelliJ you need to go to Edit Configurations. Under your AppEngine Dev Server you'll find a page where you can set "Server parameters". Set this to:
--address=[ip address]
for example
--address=192.168.1.115
Related
I’m from Taiwan and not good at English, but I’ll try my best to explain my question.
I use Netlify CMS to build my Hugo website.
Everything runs well, but when I want to change and check if the CMS’s configuration and style is okay, I always need to push my repository to Github, which is disturb me a lot.
So I tried to use local_backend: true in admin/config.yml, then used this command: npx netlify-cms-proxy-server.
then the window showed:
info: Netlify CMS File System Proxy Server configured with C:\Users\june.wu\Documents\GitHub\house-blog-hugo-cms
info: Netlify CMS Proxy Server listening on port 8081
It looked it ran successfully on localhost:8081.
But when I type localhost:8081 in browser it showed: Cannot GET /
How can I solve this problem?
I can confirm what said in the previous answer. Run npx netlify-cms-proxy-server and go to localhost:8080/admin or try also localhost:8080/admin/ (with ending slash). It should work if you are using default 8080 port.
Ignore that CMS is on port 8081 as said in the script log
for anyone looking at this in and still finding it unclear, as said in the docs you need to go to your regular development server based on the SSG (static site generator) that you are using once you have started both the NetlifyCMS and SSG dev servers. See point 5 in the beta features docs here.
You are not supposed to try visit the NetlifyCMS 8081 default port to use the CMS locally.
I have also seen behaviour mentioned by a few people that it only works with a / at the end of the path. So for example if using Astro as your SSG (which uses the port :3000 for it's dev server) you should try both:
http://localhost:3000/admin/
http://localhost:3000/admin
Although I have been having issues with the NeltlifyCMS dev server with Astro still...
This is my first time installing and using VSCode, and when I tried installing Prettier extension, it let me peek quickly at the extension page before closing it and displaying this notification (Screenshot attached):
Unable to open 'Extension: Prettier - Code formatter': An unknown error occurred. Please consult the log for more details..
VSCode screenshot: Notification at bottom right
It's doing this with all other extensions. Searched for a solution but found nothing applicable.
Why is this happening and how to fix it?
It happens that, this is a problem with the Egyptian ISPs' default DNS servers, which are most probably blocking some of Microsoft servers.
The solution (in case you live in Egypt):
clear DNS cache using ipconfig /flushdns command on Windows cmd (For Other OS).
change the default DNS servers in your router settings to Google's 8.8.8.8 & 8.8.4.4 (or Cloudflare's 1.1.1.1 or any other DNS server you trust).
restart VSCode and try installing extensions.
Hopefully, everything will work fine by now.
Check this Github issue for more insight.
It probably is because of the certificate check.
Below solution works for me in CentOS 7 (Linux).
Step 1. Change the file /usr/share/applications/code.desktop
Open the file /usr/share/applications/code.desktop,
then modify the Exec value with adding --ignore-certificate-errors before %F:
Exec=/usr/share/code/code --unity-launch --ignore-certificate-errors %F
Save the file with typing sudo in the begining.
Step 2. Close all windows of vs code instances.
Step 3. Back to the terminal, use below command to open VS code:
code --ignore-certificate-errors
Step 4. Click extension button in the left side bar.
Click any extension like "Ruby" by Peng Lv, if the images in the Details page can be seen successfully, perhaps the issue is solved.
Step 5. Try to continue to install the extensions you need.
Just enjoy! May it be helpful for you.
in ubuntu go to settings -> wifi -> click on gear icon -> IP4 -> dns input
and put
8.8.8.8,8.8.4.4
and click apply,
to DNS Resolver Cache open terminal and type:-
sudo systemd-resolve --flush-caches
sudo systemctl restart systemd-resolved
restart your device
For windows
cd "C:\Users\<user>\Appdata\Local\Programs\Microsoft VS Code"
code.exe --ignore-certificate-errors
The solution
clear DNS cache using command on Windows cmd:
ipconfig /flushdns
change the default DNS servers in your router settings to Google's:
8.8.8.8 , 8.8.4.4 >> for IPv4
2001:4860:4860::8888 , 2001:4860:4860::8844 >> for IPv6
This link will guide you how to change the DNS server in windows and mac:
https://www.ionos.com/digitalguide/server/configuration/how-to-change-dns-server/
restart VSCode and try installing extensions.
If you're in a corporate network and it's locked down the one last resort is to manually download the VSIX from the website on a domain that will allow it and then copy over the VSIX and install it.
I got this "XHR failed" error in Visual Studio Code.
So I changed my network settings to use Google Public DNS (instructions)
Finally following instructions (by mohamed-mokhtar) solved for me:
Go to : Control Panel\Network and Internet\Network Connections
Choose your connection network and ( right click on it then choose properties )
Select " Internet Protocol Version 4 (TCP/IPv4) and then click on properties in the bottom of this section
At General section click on " Use the following DNS Server address : "
Make " Preferred DNS server : 8.8.8.8 " (if you face a problem check this)
Make " Alternate DNS server : 8.8.4.4 "
Restart VS code
referring to #Seif A. answer
The solution (in case you live in Egypt)
clear DNS cache using command on Windows cmd:
ipconfig /flushdns
change the default DNS servers in your router settings to Google's:
8.8.8.8 , 8.8.4.4 >> for IPv4
2001:4860:4860::8888 , 2001:4860:4860::8844 >> for IPv6
restart VSCode and try installing extensions.
I faced the same problem while adding new extension in vs code.
I Recognized the problem within the ISP in Egypt, so I changed the DNS in My router to Google DNS Providers , and it works perfectly
Just install a VPN like betternet or any other VPN software and change the country to the USA or try other countries.
In my case I was need to disable work VPN to download extension
I use gsutil tool for download archives from Google Storage.
I use next CMD command:
python c:\gsutil\gsutil cp gs://pubsite_prod_rev_XXXXXXXXXXXXX/YYYYY/*.zip C:\Tmp\gs
Everything works fine, but if I try to run that command from corporate proxy, I receive error:
Caught socket error, retrying: [Errno 10051] A socket operation was attempted to an unreachable network
I tried several times to set the proxy settings in .boto file, but all to no avail.
Someone faced with such a problem?
Thanks!
Please see the section "I'm connecting through a proxy server, what do I need to do?" at https://developers.google.com/storage/docs/faq#troubleshooting
Basically, you need to configure the proxy settings in your .boto file, and you need to ensure that your proxy allows traffic to accounts.google.com as well as to *.storage.googleapis.com.
A change was just merged into github yesterday that fixes some of the proxy support. Please try it out, or specifically, overwrite this file with your current copy:
https://github.com/GoogleCloudPlatform/gsutil/blob/master/gslib/util.py
I believe I am having the same problem with the proxy settings being ignored under Linux (Ubuntu 12.04.4 LTS) and gsutils 4.2 (downloaded today).
I've been watching tcpdump on the host to confirm that gsutils is attempting to directly route to Google IPs instead of to my proxy server.
It seems that on the first execution of a simple command like "gsutil -d ls" it will use my proxy settings specified .boto for the first POST and then switch back to attempting to route directly to Google instead of my proxy server.
Then if I CTRL-C and re-run the exact same command, the proxy setting is no longer used at all. This difference in behaviour baffles me. If I wait long enough, I think it will work for the initial request again so this suggests some form on caching taking place. I'm not 100% of this behaviour yet because I haven't been able to predict when it occurs.
I also noticed that it always first tries to connect to 169.254.169.254 on port 80 regardless of proxy settings. A grep shows that it's hardcoded into oauth2_client.py, test_utils.py, layer1.py, and utils.py (under different subdirectories of the gsutils root).
I've tried setting the http_proxy environment variable but it appears that there is code that unsets this.
Can you explain what this error is (and secondly why I am getting it)?
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
P.S. It may be related to Known Tomcat 6.0 and JDK 1.7.0_02 issues?, as I only started getting it after upgrading from JDK 1.7.0 to 1.7.0 update 2, with no other upgrades to other software.
I am running:
Eclipse Indigo 3.7
JDK 1.7.0_0u2 (JDK 7 update 2)
Tomcat 6.0
Windows 7
Apache HTTP Server (although not using it yet)
When I start Tomcat I started getting this error, but not all the time. Rebooting just now fixed it. Some mornings I come to work without a reboot and it fixes it even though it failed the day before. It's sporadic. To debug this I need to understand. Can you help explain it?
EDIT : I have two Tomcat servers, for two different projects, on the same port. The other (first) server is "stopped" but remains "synchronized", in case this matters. I've quickly tried changing all the ports up one (8080 to 8081) and the error reproduces. This may not be a proper test of changing ports, however.
EDIT 2: I just had this problem, and rebooting "fixed" the issue. The workstation was on all weekend and Tomcat worked on Friday and Eclipse was shutdown at the end of the day. I will keep taking notes like this as I run into it to remove guesswork.
EDIT 3: Today it gave me this error from an unrebooted system that worked yesterday, programs shut down yesterday and restarted today. I rebooted, and the error is gone. Most notably is that the error always occurs at 23% compilation. It hits 23%, waits a bit and this is when I know it won't succeed, and then popups a window. I'll capture what the window says next time. Then it gives the above error to the Console.
EDIT 4: I am running Windows 7 and Apache HTTP Server (although not using it yet). I'll add these to the list above.
EDIT 5: The popup window mentioned in edit #3 is (and note my Tomcat is named Server Tomcat v6.0 Server at localhost):
Problem Occurred
'Server Tomcat v6.0 Server at localhost' has encountered a problem.
Server Tomcat v6.0 Server at localhost failed to start.
OK << Details
Server Tomcat v6.0 Server at localhost failed to start.
EDIT 6: I just got a new problem, which is Cannot connect to VM com.sun.jdi.connect.TransportTimeoutException popup window error and the same main error that this question asks about in the Console window.
EDIT 7: Just restarting Eclipse, not rebooting the whole computer, solved the error this morning.
This error typically comes up when the necessary port is taken by another program.
You said that you have changed the HTTP connector port from 8080 to 8081 so the two Tomcats do not clash, but have you also changed the <Server port="..." in tomcat/conf/server.xml to be different between your Tomcats?
Are there any other connectors ports which may possibly clash?
Does your HOSTS file have an entry for localhost? Some other situations this error is seen in seem to have this as a problem resolution.
Make sure you have 127.0.0.1 localhost set in it...
(from this and this)
Encountered this. all I did was to kill all the java process(Task Manager) and run again. It worked!
Check whether your config string is okay:
Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999
I just had this issue today, and in my case it was because there was an invisible character in the jpda config parameter.
To be precise, I had dos line endings in my setenv.sh file on tomcat, causing a carriage-return character right after 'dt_socket'
EDIT these lines in host file and it should work.
Host file usually located in C:\Windows\System32\drivers\etc\hosts
::1 localhost.localdomain localhost
127.0.0.1 localhost
I had the same problem because I set the following in Catalina.sh of my tomcat:
JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9999"
After removing it, my tomcat worked well.
Hope help you.
Encountered this issue and changing the debug port helped. For some reason, the debug port had to be greater than the app port.
Change control panel Java's option about proxy to "direct", change window's internet option to not use proxy and reboot. It worked for me.
This error mostly comes when we forcefully kill the weblogic server ("kill -9 process id"), so before restart kindly check all the ports status which weblogic using e.g. http port , DEBUG_PORT etc by using this command to see which whether this port is active or not.
netstat –an | grep
(Admin: 7001 or something, Managed server- 7002, 7003 etc)
eg: netstat –an | grep 7001
If it returns value then,
option 1: wait for some time, so that background process can release the port
option 2: execute stopweblogic.sh
Option 3: Bounce the server/host or restart the system.
My issue was resolved by option 2.
if your JVM Cli is: -agentlib:jdwp=transport=dt_socket,address=60000,server=n,suspend=n and JDK version is 7, change "server=n" to "server=y" will be OK.
In my project I had the same error, I restarted Tomcat and it worked, withtout killing the java process.
I set 127.0.0.1 localhost, and solve this problem.
I had the same problem in Catalina.sh of my tomcat for JPDA Options:
JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
After removing JPDA option from my command to start the Tomcat server, I was able to start the server on local environment.
I was getting the same error when i switched to STS version 3.8.3
And imported my entire workspace to the new STS.
Apparently the "Boot Spring App" instance was defective. (i run from STS)
If this is your problem,
Simply create the Boot run configuration again.
In case you are working with environments or docker images you can really change /etc/host I recommend just changing the binding from star to 0.0.0.0.
So (basing on my case for instance) instead of:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
You would define it as:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:5005"
I'm using Linux, and I've installed GlassFish 3.1 outside of Eclipse. It starts fine with asadmin start-domain.
In Eclipse Helios I've installed the latest version of the GlassFish tools, server adapter etc. I've added a "Server" instance for my external GlassFish, but when I try to start it, the Eclipse Console says "Waiting for domain1 to start ......" – more and more dots are printed while I wait for several minutes. Eventually there's a dialog saying "Server GlassFish 3.1 at localhost failed to start."
At no point is http://localhost:8080 responding.
There is no other errors messages that I can find. The server log (glassfish/domains/domain1/server.log) prints the long startup command, and then:
Feb 28, 2011 10:48:45 PM com.sun.enterprise.admin.launcher.GFLauncherLogger info
INFO: Successfully launched in 3 msec.
The GlassFish installation is entirely stock, with no applications loaded. It works fine when started from the command line outside of Eclipse.
I've tried to reinstall GlassFish to different locations, I've reinstalled Eclipse with no plugins except the GlassFish stuff.
The strange thing is that the "Internal GlassFish 3.1" server, which is distributed with the Eclipse plugin and lives inside eclipse/plugins, works just fine and starts up very snappily. But I'd really like to have an external GlassFish that I can easily run independently of Eclipse when I want to.
Help much appreciated!
You can have detailed logs about what is going on :
go to "Window -> Preferences -> Glassfish Preferences".
There you can check the "Start Glassfish Enterprise Server in Verbose Mode".
I had problems starting Glassfish 3.1 from inside eclipse too.
I tried to delete the "osgi-cache/" subdirectory located in the domain directory and then i could successfully launch glassfish.
Hope it helps.
CLI130 Glassfish Error and Port 4848 in Use Error
Glassfish is written in Java and if the system's TCP/IP configuration isn't setup a certain way, Glassfish will choke when it makes a getLocaHost() call. A quick fix is:
Get the system's hostname and related IP
hostname
ifconfig -a
Add a line to /etc/hosts after the localhost line:
hostname ip-address-of-hostname
A Little More Background.....
If the local hostname (value returned from the "hostname" command) does not resolve to an IP address (e.g. "nslookup my-hostname") Glassfish will fail. The following Java app will expose this:
import java.net.*;
class Testnet {
public static void main() throws Exception {
InetAddress host = InetAddress.getLocalHost();
System.out.println ("host=" + host.getHostName());
System.out.println ("addr=" + host.getHostAddress());
}
}
The root cause could be any one of a number of issues:
The Local hostname (value returned from "hostname" command) does not resolve to an IP or valid IP
Misconfigured /etc/nsswitch.conf or /etc/hosts
There have been suggestions on the web that IPV6 only addressing messes up Java in Linux. To make sure this won't befall you, it can be set on most flavors of Linux with the following command (however the above Testnet app ran for us with bindv6only set to both 1 and 0):
sysctl -w net.ipv6.bindv6only=0
In terms of HA, having an entry for the local IP and hostname in /etc/hosts is a solid thing to do and to make sure "files" is the first entry in the list for "hosts" in /etc/nsswitch.conf. The downside to this is that each host needs to be setup with this line and it could cause problems with nodes that get their IP from DHCP or are randomly assigned when configured.
I've met the same problem as I was learning java web programming, but in netbeans - windows env. I've spent much time guessing what that error could mean because the log file wasn't clearly saying that.
Finally I found out that glassfish v3 was trying to run on 8080 port, which was already occupied by reportingservicesservice.exe which is sql server service.
go to (tools -> servers) add a new glassfish server instance which runs on a different, free port - that solved the problem.
The suggestion to delete "osgi-cache" worked for me on ONE machine (at work).
However on my home machine, neither that suggestion nor the suggestion to add my machine's hostname to the "hosts" file helped. Glassfish would start but Eclipse wouldn't recognize that...
The only thing that worked for me was:
go to the glassfish3/bin directory
execute "asadmin create-domain newdomain"
in this step, I was prompted for an admin username and password; I chose "admin" and "admin123" respectively
create a Glassfish server in Eclipse pointing to the new domain
Now I know that this may mean that the default domain (domain1) has some strange configuration, but that just doesn't seem right. Anyway, this did work for me, and now I can start Glassfish from within Eclipse - any Glassfish domain that I want.
HTH.
I'm using ubuntu 13.04 and had the same issue. I tried almost everything, but when i disabled IPv6 it worked. For ubuntu it's easy, just add following 3 lines to kernel parameters:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
and run sudo sysctl -p. Good luck ;)
p.s. Don't forget to disable proxy server, set Active provider to Direct at General->Network connections.
Hum. Good news is that the internal server is working.
For the external one, first thing to test is if the server can be started outside Eclipse.
Check also the domain directory known by Eclipse (hint: server properties tab), and if the location is the one you want to use.
Maybe the domain has been started with a different Glassfish Server? In this case, make sure the osgi-cache/ directory in this domain is deleted first.
If the server works outside Eclipse, triple check the registration data of this server (runtime +domain) in Eclipse itself. In fact, try a new eclipse workspace...
Is this server secured with https?
I had the samere problem with Indigo + Glassfish 3.1 plug-in accessing an already working local standalone glassfish instance (with username 'admin' and my own password set).
Fortunately doing the following did the trick for me:
stop glassfish
delete osgi-cache content ( ${GLASSFISH_3.1HOME}/glassfish/domains/domain1/osgi-cache )
set my username ('admin' in my case) and reset passowrd (no password at all)
starting glassfish from within Indigo now works!