Changing Port no. on AppEngine Flex environment

493 views
Skip to first unread message

Abhishek Verma

unread,
Feb 15, 2019, 4:07:28 PM2/15/19
to Google App Engine
I want to run my spring boot application on port 8400. i configured server.port=8400 in application.properties. I gave following configuration:
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<version>1</version>
<enableJarClasses>false</enableJarClasses>
<port>8400</port>
<host>0.0.0.0</host>
<admin_host>0.0.0.0</admin_host>
</configuration>
</plugin>
but its not working. it always hits 8080 from appspot.com. Please help. Also how can I run on random port ?

George (Cloud Platform Support)

unread,
Feb 25, 2019, 9:10:55 PM2/25/19
to Google App Engine
Hello Abhishek, 

Where do you configure your port with the <plugin> markup? In Flexible Environment, the usual way to specify network settings is in your app.yaml configuration file, for example:

network:
  instance_tag: TAG_NAME
  name: NETWORK_NAME
  subnetwork_name: SUBNETWORK_NAME
  session_affinity: true
  forwarded_ports:
    - PORT
    - HOST_PORT:CONTAINER_PORT
    - PORT/tcp
    - HOST_PORT:CONTAINER_PORT/udp

You may check related information on the "Configuring your App with app.yaml" page.
Reply all
Reply to author
Forward
0 new messages