Skip to content
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

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

Closed
slavap opened this issue Nov 2, 2023 · 6 comments
Closed

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

slavap opened this issue Nov 2, 2023 · 6 comments
Assignees
Labels
for: eclipse something that is specific for Eclipse type: bug

Comments

@slavap
Copy link

slavap commented Nov 2, 2023

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)
@BoykoAlex
Copy link
Contributor

BoykoAlex commented Nov 2, 2023

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.

@slavap
Copy link
Author

slavap commented Nov 2, 2023

@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).

@slavap slavap closed this as completed Nov 2, 2023
@BoykoAlex
Copy link
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...

@slavap
Copy link
Author

slavap commented Nov 2, 2023

@BoykoAlex yes, I'm on Windows 10 x64

@martinlippert
Copy link
Member

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

@BoykoAlex
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: eclipse something that is specific for Eclipse type: bug
Projects
None yet
Development

No branches or pull requests

3 participants