changing the address port of Google App Engine - Eclipse

11,859

Solution 1

From the documentation. You can add the argument ( under Run configurations --> Arguments )

--port=1234

Now when the address is in use you have something either already running on that port, which usually is another instance of GAE, make sure to close all running instances from the eclipse console, then try again. Or just check whats using the default port by going there in a browser.

Solution 2

In case of Maven build you need to change the "pom.xml" file.

(Ref.: https://cloud.google.com/appengine/docs/java/tools/maven#specifying_a_port_for_local_testing)

find out the block like:

<plugin>
     <groupId>com.google.appengine</groupId>
     <artifactId>appengine-maven-plugin</artifactId>
     <version>1.9.15</version>
     <configuration>
         <enableJarClasses>false</enableJarClasses>
         <port>8181</port>
         <address>0.0.0.0</address>
     </configuration>
</plugin>

and if there is no "<port...</port>" tag try to add one like above and change the port no. (in my case i change it to 8181) as you desire.

Solution 3

  • Go to pom.xml file in your maven project.
  • search for the tag < port > ( normally in maven projects it comes as < port > 8080 < /port--> as a comment in the following piece of code or similar to that

< plugin >
     < groupId >com.google.appengine< /groupId >
     < artifactId >appengine-maven-plugin< /artifactId >
     < version >1.9.4< /version >
     < configuration >
          < enableJarClasses >false< /enableJarClasses >
          < !-- address>0.0.0.0< /address >
          < port >8080< /port -- >
          < port >1234< /port > //**add your port here with < port > tags...**
     < /configuration >
< /plugin >

).

  • save pom.xml file.

Solution 4

If the port is unused intentionally and still if you are unable to claim that port then and abnormal termination of the service is causing the issue. So to fix it.

You have to kill the process.

--->Go to command/terminal
--->type ps java (Shows the process for java)
---> then check the particular process to kill it or use (killall -9 java).

Solution 5

In Eclipse, the easiest way to run the server on a different port is by creating a new App Engine Server instance. In the wizard you can select the port number you want.

Share:
11,859
rzqr
Author by

rzqr

Updated on June 24, 2022

Comments

  • rzqr
    rzqr almost 2 years

    Is it possible to change the port address (8888) of Google App Engine ? If yes, how do I to change the port address ?

    IDE : Eclipse 4.3

    Because I always got when I try to debug my webapp :

    Could not open the requested socket: Address already in use: bind

    Thanks in advance.