Why does IntelliJ want to accept incoming network connections? - java

➠ What feature in IntelliJ is acting as a server to accept incoming connections?
When first running IntelliJ 2017.1.1 I get a dialog box asking permission for incoming network connections.
Do you want the application “java” to accept incoming network connections?
Clicking Deny may limit the application’s behavior. This setting can be changed in the Firewall pane of Security & Privacy preferences.
[Deny] [Allow]
Example of dialog appearing on a fresh install of IntelliJ 2017.2 Ultimate edition, in the New Project wizard, when clicking on the Maven tab.
Why is IntelliJ causing this prompt? I got no such event when running NetBeans.
What exactly is the effect of denying or accepting? I am concerned about letting a Java process accept outside network connections as doing so is a serious security risk.
Possibly related to:
Question: How to bind IntelliJ IDEA random open ports to localhost only?
Issue IDEA-175889: IDE opens random ports on wildcard interface in some configurations
This Question is not about the source of the message. The source is the Apple macOS app-level firewall. You can allow or block an app from listening for incoming network connections. Allowing this is a security risk.
IntelliJ is asking to be added to the list of apps allowed to listen for incoming messages. My Question is, "Why does IntelliJ need to accept incoming network connections?".

Problably it is linked to the below.
If you click on http://localhost:63342/ you should be able to access the built-in server. Which by default should listen only on the local interface.
Open port in range 6942-6992 seems to be linked to SocketLock.java
myServer = BuiltInServer.startNioOrOio(workerCount, 6942, 50, false, handler);
note: Ports 6953, 6969, 6970 are excluded from that range. See BuiltInServer.java
private static final int[] FORBIDDEN_PORTS = {6953, 6969, 6970};
Another open port is linked to a process org.jetbrains.idea.maven.server.RemoteMavenServer
jps -l | grep jetbrains
24628 org.jetbrains.idea.maven.server.RemoteMavenServer
You could find out open port with netstat
on Linux: `netstat -ltupne`
on OSX (something like): nettop -np java
and the related java processes with jps (as show above)

as doing so is a serious security risk.
It isn't, unless you don't trust the specific product. And if you don't trust a product, why are you using it at all?
IntelliJ needs to check its license once in a while, connect to update servers, maven repositories, plugin repositories, external application servers you may want to connect to, ditto with database servers.
Netbeans needs the same, you no doubt just forgot you gave it permission at some point, or it uses an external JVM that you gave permission at some point.

Related

How to identify and kill the old process to solve JVM Bind Exception?

I'm trying to run my projects in eclipse but whenever i run my project its showing
Address already in use: JVM_Bind Exception.
How to solve this one?
You have another process that uses the same port as your project. Try to identifiy the port and try to find it using netstat -ano | find ":80" cmd line (if you are a windows user). the "80" is port numbe. That's my best hint because you don't share enought details.
On Windows
1. Hit Ctrl-alt-delete and look at open programs. Look for java.exe.
2. From a command window, run netstat -an. Check which ports are in use. You can identify which application is running this way, then close it from the Task Manager.
3. List item
If you intend to run both JIRA and Confluence on the same machine for trial purposes, you will need to change either of the listening port number from the default (8080).
If you are using older versions of JBoss, chances are that MS Office or MS OfficeCommunicator are engaging port 1098 and 1099. If you don't want to shut down these tools then your only option is using a different bind address

Not able to record in Jmeter after OS reinstallation

I am using Jmeter 2.13 version and with that I used to record many scripts earlier successfully without any issue . Now, my OS has been reinstalled and I am holding Windows 8.1 , 64 bit version.After re installation, I am not able to record HTTPS web applications even though my proxy configuration is correct. After I setup everything in Jmeter, and click on start from work bench and I navigate to the browser try to access the application, it shows "Server not found" message.
However, the scripts which I saved earlier are working fine without any issues. only the new recording is not working.
Help me with the possible solutions.
"Server not found" indicates that browser is unable to access Internet (or intranet).
Most likely you're sitting behind the corporate proxy server and in previous JMeter installation you had these proxy server details specified in system.properties file like:
http.proxyHost=10.20.30.40
http.proxyPort=3128
https.proxyHost=10.20.30.40
https.proxyPort=3128
Double check with your network administrator if this is the case, if yes - take steps from Using JMeter behind a proxy User Manual chapter.
You can also try out JMeter Chrome Extension as an alternative solution - in that case you don't have to worry about proxies and SSL certificates substitution.

Checking if a port is currently in use (Java)

So, I've built a server manager in java to boot and close game servers on the extra box that I have lying around, but now I'm looking for a way to close down servers that aren't in use automatically.
My current thought was to check if a port was receiving any data with the server manager, and if it goes for a period without any data being caught, to close the server. That's where I run into the issue of being unable to read ports because java can't bind to a port that is already in use. Is there some way to monitor activity on a port without specifically binding to it?
Any help you could provide would be greatly appreciated!
Thanks in advance!
-Mot
[EDIT]
OS:
Windows 7 Home Premium
What I've tried thus far:
-ServerSockets to bind to the port and listen
-DatagramSockets to bind to the port and listen
I'm currently looking into netstat via cmd to see if I can pull any valuable details from there, but no dice thus far

Java router port setup programmatically

I'm wondering if there is a way to setup connection between a client and a server over the internet and have both of them programmatic setup all needed router/firewall configuration changes to open needed external ports to communicate.
Assuming both server and client have known ip addresses and a DNS is not needed in this example to find the IP addresses. How might one have a server that when started configures access past the firewall and tells the router how to route proper communication to the server. I would assume the client may not need anything like this as it should only need to know the external IP address and port number of the server. If i'm wrong about my assumption please let me know.
Example if I have two houses house (A) has a server and house (B) has a client and both sites know what the other house external IP address is and know what port they will be using how may a Java application do all the configuration or at least do as much as possible on say windows,mac,ubuntu. The idea is the user of the server and client should not have to do a bunch of firewall/router configurations to get the application running. It would also be nice if in the example it shows how to release the connections when the server is terminated. Example when the java server is turned off it should close up port settings on the firewall and router. security and clean house.
There is no easy way of doing that as it will depend on the OS and on the many possible firewall application running on the machine. Plus, if your app crash, you will never set back the original parameters, which can be problematic when talking about security. Instead of trying to set up custom configuration, you should try to use standard communication template/protocol like http. This will gives you a high probability of your app running without additional configuration almost anywhere (since there is almost no point of having an internet connection if you don't allow http port).

Can't receive data remotely from one computer

So I wrote this jar that interacts with a database and also serves as a server. Problem is that I can only interact with that jar when I'm on the lan or run the jar from a different computer. The system with the problem is running windows xp with the firewall disabled and yes it is correctly set up with the router as I can launch a web server and view it remotely. I have no clue what the problem would be as the firewall is disabled and the jar works on other computers on the same network.
Note: I was noticing an exception "java.net.SocketException: Address family not supported by protocol family" earlier
1.Open Network Connections
2.Right-click any local area connection, and then click Properties.
3.Click Install.
4.In the Select Network Component Type dialog box, click Protocol, and then click Add.
5.In the Select Network Protocol dialog box, click Microsoft TCP/IP version 6, and then click OK
6.Click Close to save changes to your network connection.
Lastly Restart your application
See this: http://www.martinahrer.at/2009/04/16/javanetsocketexception-address-family-not-supported-by-protocol-family-bind/
Generally the problem is related to IPv6 support. Try to google your exception text and I am sure you will find an answer quickly.

Categories

Resources