-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gretty 3.0.2 java.net.ConnectException: Connection refused #147
Comments
I'm seeing something similar, when using jetty9 as the container:
Downgrading to org.gretty:gretty:3.0.1 fixes it. |
@pmarchwiak @acestars Is it possible for you to provide a reproducing sample project? Otherwise, do you have some more details about your setup? Do you use grettys' random port feature? Edit: |
I did some analysis and I think Gretty now lacks error handling when treating @omikron-tvr @acestars can you please also check if your test succeeds using a clean build? Or, is indeed only reproducible with that properties file in the build directory? |
@f4lco My conclusion regarding the gradle version was wrong. My reproducing case looks like this: cd integrationTests/testJettyRandomPorts
gradle integrationTest
# abort with <C-c> when the app has started
gradle appRun This fails irregardless of the exact gradle version. Without
|
Confirmed after i deleted gretty_ports.properties i can do appRun. |
I can reproduce using one of the integration test apps in this repo,
That same command works fine when using 3.0.1. As far as I know, the app where I originally observed this is not using
|
…ugin#147) Because gretty-gradle-plugin#138 removed adequate error handling, the check for already used ports was broken and caused Gretty to fail in case the 'gretty_ports.properties' file was present. I think the check is now obsolete because gretty-gradle-plugin#138 removed the ability to manually specify fixed service and status ports for Gretty. As a result, Gretty's ports will never clash from one Gretty invocation to the next. If the check was restored, it would only check if the previous Gretty invocation had already terminated. If one of the *servlet container ports* clashed, I deem the current behavior (BindException) sufficient.
…ugin#147) Because gretty-gradle-plugin#138 removed adequate error handling, the check for already used ports was broken and caused Gretty to fail in case the 'gretty_ports.properties' file was present. I think the check is now obsolete because gretty-gradle-plugin#138 removed the ability to manually specify fixed service and status ports for Gretty. As a result, Gretty's ports will never clash from one Gretty invocation to the next. If the check was restored, it would only check if the previous Gretty invocation had already terminated. If one of the *servlet container ports* clashed, I deem the current behavior (BindException) sufficient.
…ugin#147) Because gretty-gradle-plugin#138 removed adequate error handling, the check for already used ports was broken and caused Gretty to fail in case the 'gretty_ports.properties' file was present. I think the check is now obsolete because gretty-gradle-plugin#138 removed the ability to manually specify fixed service and status ports for Gretty. As a result, Gretty's ports will never clash from one Gretty invocation to the next. If the check was restored, it would only check if the previous Gretty invocation had already terminated. If one of the *servlet container ports* clashed, I deem the current behavior (BindException) sufficient.
Remove malformed check for already used ports (fixes #147)
I am getting the same exception in 3.0.3 [pid 3679] bind(41, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::ffff:10.10.0.58", &sin6_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, 28) = -1 EADDRNOTAVAIL (Cannot assign requested address) |
I have already tried version 3.0.2 but there's error about connection refused. is there any new config?
Edit1: I am using gradle 6.3-rc1
Edit2: I already tried gradle 6.3 but still error
The text was updated successfully, but these errors were encountered: