Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Basic-scaling random port number in local devserver #435

Closed
jagathwee opened this issue Oct 13, 2020 · 2 comments
Closed

Basic-scaling random port number in local devserver #435

jagathwee opened this issue Oct 13, 2020 · 2 comments

Comments

@jagathwee
Copy link

jagathwee commented Oct 13, 2020

Issue: when scaling is changed from automatic-scaling to basic-scaling, the instance port number is random.

This is the pom.xml configuration:
<plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>appengine-maven-plugin</artifactId> <version>2.4.0</version> <configuration> <devserver.port>8889</devserver.port> </configuration> </plugin>

(1) when automatic-scaling is used, the following is the instance running:
Module instance <module_name> is running at http://localhost:8889/

automatic-scaling configuration works fine for us in the dev environment

(2) when basic-scaling is used (1), the following are the instances running:
Module instance <module_name> is running at http://localhost:8889/
Module instance <module_name> instance 0 is running at http://localhost:56064/

In this basic-scaling setup, any requests sent to http://localhost:8889/ fails, but the requests sent to http://localhost:56064/ works fine as expected. But the problem is instance 0 port number is random. We need to ensure the port number assigned to the instance is predetermined, otherwise, we can not run the automation tools in the local dev environment.

So, I would like to know whether (1) this is the expected behavior of the current implementation, (2) there is a workaround to get the port numbers fixed?

System info:
Cloud SDK: 313
Runtime: Java 8
Appengine: Standard

Thanks

@loosebazooka
Copy link
Contributor

loosebazooka commented Oct 13, 2020

So to answer your questions, (1) yes this is the expected behavior, (2) there's no way to explicitly set the port numbers right now
Some more information is available in this issue: #330
Closing now as I don't think we do much else here. Please re-open if you need more information.

I think your automation tools will need to either use the api directly or parse the information.

@chanseokoh
Copy link
Contributor

chanseokoh commented Nov 23, 2020

For (2), can you try and see if this workaround works? #235 (comment) UPDATE: doesn't work with the current version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants