heroku / cli

Heroku CLI
https://devcenter.heroku.com/articles/heroku-cli
ISC License
856 stars 224 forks source link

heroku local ignores port in java web app #1241

Open tafelito opened 5 years ago

tafelito commented 5 years ago

Do you want to request a feature or report a bug?

bug

What is the current behavior?

I'm running a java web app with heroku local and is always running at port 8080 even if I try to manually set it to a different port. It always worked with the default port 5000, but for some reason this has changed. I updated to latest heroku version 7.24.3 and still the same.
I tried running it as heroku local, heroku local web, heroku local -p 5000, heroku local --port=5000

java-server git:(master) ✗ heroku local
[OKAY] Loaded ENV .env File as KEY=VALUE Format
11:38:32 AM web.1 |    .   ____          _            __ _ _
11:38:32 AM web.1 |   /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
11:38:32 AM web.1 |  ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
11:38:32 AM web.1 |   \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
11:38:32 AM web.1 |    '  |____| .__|_| |_|_| |_\__, | / / / /
11:38:32 AM web.1 |   =========|_|==============|___/=/_/_/_/
11:38:32 AM web.1 |   :: Spring Boot ::        (v2.1.1.RELEASE)
11:38:33 AM web.1 |  2019-05-16 11:38:33.503  INFO 3387 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
11:38:36 AM web.1 |  2019-05-16 11:38:36.308  INFO 3387 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''

What is the expected behavior?

I just updated to macOS Mojave 10.14.5 and I'm using heroku 7.24.3. I'm not using any type of proxy

deveshk1 commented 4 years ago

same problem occuered for me,

try removing the --server -port =$PORT or whatever port type defined in Procfile. so your procfile should look like :

web: java -jar target/YOUR APP NAME.war

let me know if its working...thanks