IntelliJ Idea cannot connect to plugins - maven

I try to build a Jenkins plugin with IntelliJ Idea and i get the following errors and I can't compile it.
It complains that it can't reconnect to plugins.
Any idea what's going on?
LE:
Here is the message:

As you have already used the IPv4 option, try the other solutions from this article Network Connectivity Issues When Running Under Java 1.7 (copied here for future reference):
Add -Djava.net.preferIPv4Stack=true into the list of the IDE JVM options. If you are using IPv6 only network, specify -Djava.net.preferIPv6Addresses=true option.
On Windows run netsh advfirewall set global StatefulFTP disable to resolve FTP connection issues.
Agnitum Outpost Security Suite and some other firewalls may block even localhost connections, disabling firewall may not help, only uninstalling the firewall will resolve the problem.
If nothing above helps, try running the IDE under JDK 1.6 instead.

Related

How to install Vagrant plugin using VPN and proxy?

My host is a Windows 10 Pro. I installed vagrant on it some time ago. Now I use VPN and proxy and I wanted to install vagrant-proxyconf plugin. It is a result:
vagrant plugin install vagrant-proxyconf
Installing the 'vagrant-proxyconf' plugin. This can take a few minutes...
Vagrant failed to load a configured plugin source. This can be caused
by a variety of issues including: transient connectivity issues, proxy
filtering rejecting access to a configured plugin source, or a configured
plugin source not responding correctly. Please review the error message
below to help resolve the issue:
timed out (https://gems.hashicorp.com/specs.4.8.gz)
Source: https://gems.hashicorp.com/
Plugin is installed properly when I disable VPN and proxy. It seems that vagrant does not use system proxy and I have to set proxy somewhere in vagrant configuration but I do not how to do it. I googled this issue but I have found issues with proxy on guest machine.
My question concerns only host and plugin installation. I also have problem with guest but it is separate issue.
I set http_proxy environment variable and plugin is installed properly.
set http_proxy=http://yourproxyserver:port
I found solution here

Issues connecting Vagrant Xdebug with PhpStorm 2020.3

Have spent over a day trying to get PhpStorm to debug a Drupal site inside a Vagrant virtual machine running Xdebug and I feel I'm close - but just not quite there yet.
Currently, in PhpStorm when debugging I have an error:
Waiting for incoming connection with ide key 'PHPSTORM'
In the Xdebug log in the VM (at /tmp/xdebug.log)
[2094] I: Checking remote connect back address.
[2094] I: Checking header 'HTTP_X_FORWARDED_FOR'.
[2094] I: Checking header 'REMOTE_ADDR'.
[2094] I: Remote address found, connecting to 192.168.88.1:9000.
[2161] E: Time-out connecting to client (Waited: 200 ms). :-(
[2161] Log closed at 2020-12-15 04:25:32
I tried setting up the Zero-configuration debugging without any luck.
For the debugging configuration, I have a PHP Remote Debug that validates correctly although it always defaults to the 'Local Web Server or Shared Folder' rather than the 'Remote Web Server' option.
When I started the project I set it up as a local web server option and I'm worried that I haven't changed the correct settings to now make this a remote web server. The connection type for the deployment is now 'Local or mounted folder' but originally this was 'In-place'.
Under Languages & Frameworks --> PHP --> Servers, I set this up on port 80, using Xdebug and without path mappings. I tried changing the port etc but then it doesn't validate so I'm confident that the server settings are correct and that PhpStorm is talking to the virtual machine correctly.
I changed the /etc/php/7.4/cli/php.ini file but phpinfo() says the configuration is coming from /etc/php/7.4/fpm/php.ini. The changes I made in the php.ini file are active though. phpinfo() is showing:
xdebug.idekey: PHPSTORM
xdebug.remote_host: 10.0.2.2
xdebug.remote_port: 9000
xdebug.remote_autostart: Off
xdebug.remote_connect_back: On
Really at a loss now as to what to try next. It is incredibly frustrating so hope someone can shed some light.
EDIT --- As per comment here is the screenshots of the setup:
Deployment: Local or mounted folder
PHP settings
The server setup
Debug settings
Validate the debugger from the remote server
Run Chrome with the debug addon running
The error message
The Run debug configuration settings
Start of the phpinfo with the config file showing where the xdebug settings need to be edited.
The Xdebug settings of phpinfo()
Some of the tests as per the comments:
After logging in to 'vagrant SSH' it shows the IP address to be used (10.0.2.2). The local computer is also IP 10.1.1.150 a telnet test of both of these works.
A 'sudo nano' of the Xdebug ini file
NOTE: Changing the remote connect back to 0 fixed the connection:
xdebug.remote_connect_back=0
And then the path mapping needed to be turned on in the Server settings and then everything was working correctly.
Big thanks to LazyOne for his helpful and thorough comments. :)
1) Check if there are separate php.ini files used by web server, -- you need to edit the right php.ini file.
Run phpinfo() and check to see if there is an ini file for Xdebug. In my case this was at /etc/php/7.4/fpm/conf.d/20-xdebug.ini
2) What's your Xdebug version?
Version 2 and 3 of Xdebug have slightly different parameters. In my case I was running Xdebug 2.9.5
3) What is the IP address of your Host OS as seen from the inside the VM? That's where Xdebug should connect (as it's Xdebug that connects to IDE and NOT other way around).
When you first log in to the SSH there will be an IP address shown. This is what the IP should be for Xdebug. In my example, this was 10.0.2.2
4) xdebug.remote_connect_back: On -- try set it off and ensure that you have correct xdebug.remote_host (as Xdebug v2 may not fallback to remote_host value when autodetected IP fails.
This fixed my connection!
sudo nano /etc/php/7.4/fpm/conf.d/20-xdebug.ini
Then change:
xdebug.remote_connect_back=1
To:
xdebug.remote_connect_back=0
Save, and then restart the server.
Test the connection again. After this step I had a connection between the host and remote server but I also had to turn on path mapping in PhpStorm to get the debugger working 100%.
5) Ensure that PhpStorm is the one that listens on Xdebug port when "phone handle" icon is enabled (use netstat or alike to confirm) and is allowed in firewall.
6) If you know the correct IP and sure that PhpStorm is listening -- you can just use telnet from inside the VM and try to connect to IDE on Xdebug port -- if connected then IP, port and firewall is most likely set up correctly.
Even with the error messages, the telnet check was working. So it pointed to the issue being with the Xdebug setup rather than the handshaking between the host and remote server.
Thanks to LazyOne's comments for finding the answer and for presenting a great workflow to help identify the problem.
I was experiencing something very similar to what you described.
I was able to start a debug session from the xdebug cli tool (dbgpClient) which proved to me that it was an issue with phpStorm.
My project is using a legacy version of xdebug. (2.2.7)
Downgrading to phpStorm 2020.2.4 resolved my issue.
(It's one-click in the jetbrains toolbox to downgrade)
Thanks for the answers in this issue. It took me half a day to find out that xdebug 2.2.7 with php5.3.10 doesn't work on Phpstorm 2020.3. So I downgraded to 2020.2.4 and it works again.

PhpStorm code coverage with remote Xdebug - can't connect (Xdebug 2.5.5)

I have a problem which I've been facing for 2 days. I've already configured my PHPUnit in PhpStorm, made code coverage save to log folders. I want to connect with Xdebug so I can make code coverage visible in my IDE. The problem is, I can't connect to remote Xdebug. I'm having a message: "Connection with 'Xdebug 2.5.5' was not established."
Guy from other team helped me to configure Xdebug as they have it configured for other project. I cloned this project, set it up and working, configured everything as he has it configured. And still cannot connect.
Port: 9000 (also got proxy for 9001-9005).
Windows firewall is off, ports are unlocked
IDE key is set on.
Tried with -dxdebug.remote_host command - still nothing
Set up our proxy host IP for Xdebug - still nothing.
Anyone has other idea?

intellij idea 14 cannot connect to debug tomcat7 service

Ok, I think I tried everything before I am posting this question. Please tell me, what I am (Still) missing. I keep getting "unable to connect" exception (unable to connect hostname:6012), I changed from default port 1099 and it still didn't help.
version of IntelliJ 14.0.2
Tomcat 7.0.52
Tomcat is running as a service so, I configured on the UI interface of tomcat.exe (java tab) the following JAVA_OPTs
-Xdebug
-Xrunjdwp:transport=dt_socket,address=57497,server=y,suspend=n
-javaagent:C:\Users\username\.IntelliJIdea14\system\groovyHotSwap\gragent.jar
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=6012
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcatalina.home=C:\Tomcat 7.0
-Dcatalina.base=C:\Tomcat 7.0
-XX:MaxPermSize=512m
I made sure the port 57497 is open (open the firewall and telnet).
And on IntelliJ, I made a remote server connection. Please find attached
pictures. Both intellij and tomcat are running on the same system. I have a static dns setup. sometimes i get connection timedout exception.
server tab
connection tab
Here's my config.
Tomcat JAVA_OPTs to enable remote debugging:
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5007
In IntelliJ, I don't use the Configuration-Type 'Tomcat'. In my case 'Remote' works pretty well (I would post an image but I ain't got 10 reputation...). You only need to configure your host and port on the config sheet.
I use IntelliJ 14.0.3 and I had the same issue, though with Jetty. Switching to using the remote instead of jetty -> remote worked. I'm guessing they're both supposed to work differently. I just haven't figured out why there are two different options to remote debug.

setsockopt IPV6_TCLASS 16: Protocol not available, Cygwin64

I'm trying to install Hadoop 1.0.3 using Cygwin64 on Win8.1. After I completed the config, started SSHD service, I run ssh cyg_server#localhost and got these:
cyg_server#localhost's password:
setsockopt IPV6_TCLASS 16: Protocol not available:
I'm complete new with Cygwin64 and Hadoop, thanks advance for any help.
From the client side, just add
-oAddressFamily=inet
to the parameters passed to ssh, or add
AddressFamily inet
to ~/.ssh/config, either globally or per a specific host.
Basically you want to turn off IPV6 and use IPV4. To do this, stop your sshd service if you have it running:
net stop sshd
Then edit the file /etc/ssh_config by adding (or modifying) the AddressFamily setting:
AddressFamily inet
The default is set to all. Setting the value to inet forces IPV4 which fixed the problem for me. After you make the change, restart sshd and you should be good to go:
net start sshd
Good luck!
I had a simmilar issue with Cygwin logging in to IPv6-enabled Servers.
Upgrading Cygwin (on client side) to the lastest version solved my problem.
I'm tired of all the "Just disable IPv6" suggestions. We have 2014 and IPv6 is here. We should better fix bugs and issues with this "new" protocol instead of negating ist.
This error happens when OpenSSH attempts to set the "type of service" field for an IPv6 connection on a system that defines IPV6_TCLASS in <sys/socket.h>, but where the kernel doesn't support it (a 2.4-series kernel or older versions of Cygwin).
It may reduce performance in a situation where something is performing traffic shaping/QoS, but is otherwise harmless.

Resources