title: Netbeans 11.2: No suitable Deployment Server is defined for the project or globally
body: <p>I installed Netbeans 11.2 IDE on my Mac. Under Services -> Servers I added GlassFish Server as a server.</p>
  
  <p>Then I opened a maven project. I could "clean and build" it. Then I wanted to run it but this resulted in the following error message:</p>
  
  <pre><code>No suitable Deployment Server is defined for the project or globally.
  </code></pre>
  
  <p>I guess this has something to do with the following: there is a window in Netbeans called "Output - Java DB Database Process" and when I started the GlassFish Server the window showed me this message: </p>
  
  <pre><code>Sat Feb 08 18:02:45 CET 2020 : Security manager installed using the Basic server security policy.
  Sat Feb 08 18:02:46 CET 2020 : Could not listen on port 1527 on host localhost: java.net.BindException: Address already in use (Bind failed)
  </code></pre>
  
  <p>I used the following command to check which process was using port 1527:</p>
  
  <pre><code>sudo lsof -n -i :1527 | grep LISTEN
  </code></pre>
  
  <p>This resulted in the following output (note: I removed the real username and the real IP address)</p>
  
  <pre><code>java    6722 &lt;user&gt;   36u  IPv6 &lt;IP Address&gt;      0t0  TCP 127.0.0.1:tlisrv (LISTEN)
  </code></pre>
  
  <p>Since this is a java process I don't want to just kill it. </p>
  
  <p>What should I do?</p>
  
  <hr>
  
  <p>P.S.:</p>
  
  <p>The version of the GlassFish Server is 5.1.0, see Screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/qk3V8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qk3V8.png" alt="enter image description here"></a></p>
  
  <hr>
  
  <p>P.P.S.: this question didn't help me: 
  <a href="https://stackoverflow.com/questions/57914196/netbeans-no-suitable-deployment-server-is-defined-for-the-project-or-globally">NetBeans: No suitable Deployment Server is defined for the project or globally</a></p>
  
  <hr>
  
  <p>P.P.P.S.: the server log says - among other things - the following:</p>
  
  <pre><code>Context path from ServletContext:  differs from path from bundle: /|#]
  </code></pre>
  
  <p>Here's a screenshot of the log:</p>
  
  <p><a href="https://i.stack.imgur.com/c5rma.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/c5rma.png" alt="enter image description here"></a></p>
  
  <hr>
  
  <p>P.P.P.P.S:</p>
  
  <p>the content of the file nb-configuration.xml is the following:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project-shared-configuration&gt;
      &lt;properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1"&gt;
          &lt;org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion&gt;1.7-web&lt;/org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion&gt;
          &lt;org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server&gt;gfv3ee6&lt;/org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server&gt;
      &lt;/properties&gt;
  &lt;/project-shared-configuration&gt;
  </code></pre>