Skip to content

Strange error port out of range:-1 for language server #1137

Closed

Description

@slavap

Just upgraded from 4.20 to 4.20.1 and now getting the following error on Eclipse STS startup:

image

17:05:52.189 [Project-Reconciler-1] ERROR o.s.i.v.b.v.g.ProjectVersionDiagnosticProvider - 
java.lang.IllegalArgumentException: port out of range:-1
	at java.base/java.net.InetSocketAddress.checkPort(InetSocketAddress.java:152)
	at java.base/java.net.InetSocketAddress.<init>(InetSocketAddress.java:233)
	at org.springframework.ide.vscode.boot.app.RestTemplateFactory.createRestTemplate(RestTemplateFactory.java:53)
	at org.springframework.ide.vscode.boot.validation.generations.SpringProjectsClient.get(SpringProjectsClient.java:78)
	at org.springframework.ide.vscode.boot.validation.generations.SpringProjectsClient.fromEmbedded(SpringProjectsClient.java:57)
	at org.springframework.ide.vscode.boot.validation.generations.SpringProjectsClient.getSpringProjects(SpringProjectsClient.java:44)
	at org.springframework.ide.vscode.boot.validation.generations.SpringIoProjectsProvider.cache(SpringIoProjectsProvider.java:84)
	at org.springframework.ide.vscode.boot.validation.generations.SpringIoProjectsProvider.getProject(SpringIoProjectsProvider.java:75)
	at org.springframework.ide.vscode.boot.validation.generations.UpdateBootVersion.validate(UpdateBootVersion.java:49)
	at org.springframework.ide.vscode.boot.validation.generations.ProjectVersionDiagnosticProvider.getDiagnostics(ProjectVersionDiagnosticProvider.java:60)
	at org.springframework.ide.vscode.boot.validation.BootVersionValidationEngine.reconcile(BootVersionValidationEngine.java:50)
	at org.springframework.ide.vscode.boot.common.ProjectReconcileScheduler.lambda$scheduleValidation$0(ProjectReconcileScheduler.java:85)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at org.springframework.ide.vscode.boot.common.ProjectReconcileScheduler.lambda$scheduleValidation$1(ProjectReconcileScheduler.java:83)
	at reactor.core.publisher.MonoPeekTerminal$MonoTerminalPeekSubscriber.onNext(MonoPeekTerminal.java:171)
	at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onNext(FluxOnAssembly.java:539)
	at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

Activity

  1. BoykoAlex commented on Nov 2, 2023

    @BoykoAlex
    Contributor

    Open Preferences. General -> Network Connections. What do you see on that page? Likely you have a proxy setup without the port value...
    Perhaps there is an assumption for the default port value if it is not specified... and this would be a bug on the sts spring boot ls. Try specifying the port explicitly. If you don't use proxy then switch the Active Provider to Direct.

  2. slavap commented on Nov 2, 2023

    @slavap
    Author

    @BoykoAlex Thank you, switching to Direct resolved the problem, I have no proxy, and for some reason it was Native there (though I never changed it, so probably default of some kind).

  3. BoykoAlex commented on Nov 2, 2023

    @BoykoAlex
    Contributor

    Hmm... maybe there is a bug in STS here. I cannot really select Native on my mac as it always switches to Direct on restart. On Windows, however, I recall i had to switch it to Direct as well since it was showing Native and a similar issue with a port... At the time I thought i had Native as the set value in the workspace... I'll give it another try tomorrow on Windows since there might be a bug...

  4. slavap commented on Nov 2, 2023

    @slavap
    Author

    @BoykoAlex yes, I'm on Windows 10 x64

  5. martinlippert commented on Nov 2, 2023

    @martinlippert
    Member

    Re-opening this for a long as there are some ongoing investigations...

  6. BoykoAlex commented on Nov 2, 2023

    @BoykoAlex
    Contributor

    Fixed with c30c2a6. Native setting without URL on Win sends empty url with no host and port to the LS config

  7. added this to the 4.21.0.RELEASE milestone on Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

for: eclipsetype: bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions