opencode icon indicating copy to clipboard operation
opencode copied to clipboard

When deploying open-source code offline, encountering the error message: "Unable to connect. Is the computer able to access the URL?"

Open wxy119-119 opened this issue 10 months ago • 14 comments

Description

I used npm to package opencode-ai-1.1.28.tgz and opencode-linux-x64-1.1.28.tgz for offline deployment. My model service URL is 192.168.8.2:17432/v1, which is started using the vLLM method. I performed the installation on the server 192.168.8.251. After the installation was complete, starting OpenCode resulted in the error: "Unable to connect. Is the computer able to access the URL?". It is important to note that the two servers can communicate with each other.

Plugins

NO

OpenCode version

1.1.28

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

wxy119-119 avatar Jan 21 '26 07:01 wxy119-119

This issue might be a duplicate of existing issues. Please check:

  • #1555: LM Studio Missing as Provider, custom provider for LM Studio non-functional - mentions the same 'Unable to connect. Is the computer able to access the URL?' error when configuring a local model service
  • #2205: Custom commands fail when (even unused) provider is in config file - describes connection failures when using custom providers with local URLs
  • #4255: OpenCode v1.0.25 Hangs Indefinitely with LM Studio + Qwen Models - comprehensive report of connection/hanging issues with local vLLM-compatible APIs
  • #508: Better support for LM Studio local provider/models - feature request for improved local provider configuration and documentation

Feel free to ignore if your specific case differs, but these issues cover similar offline deployment scenarios with local model services.

github-actions[bot] avatar Jan 21 '26 07:01 github-actions[bot]

error=BunInstallFailedError failed to install builtin plugin

1dao avatar Jan 21 '26 07:01 1dao

error=BunInstallFailedError failed to install builtin plugin The error I'm encountering is: "Unable to connect. Is the computer able to access the url?"

wxy119-119 avatar Jan 21 '26 08:01 wxy119-119

this is backend error,ui tips is : Unable to connect. Is the computer able to access the URL

1dao avatar Jan 21 '26 08:01 1dao

INFO 2026-01-21T08:34:08 +0ms service=bun cmd=["C:\software\OpenCode\opencode-cli.exe","add","--force","--exact","--no-cache","--cwd","C:\Users\xx\.cache\opencode","[email protected]"] cwd=C:\Users\makiv.cache\opencode running INFO 2026-01-21T08:34:08 +34ms service=bun code=1 stdout=bun add v1.3.5 (1e86cebd) stderr=Resolving dependencies Resolved, downloaded and extracted [6] error: ConnectionRefused downloading package manifest @opencode-ai/plugin done

1dao avatar Jan 21 '26 08:01 1dao

I've fixed my issue. Oh My OpenCode tries to update from GitHub on startup, and it fails to launch if the proxy is not enabled. Even when the proxy is enabled, it still throws errors on startup. It's best to disable Oh My OpenCode entirely. Additionally, if the https_proxy environment variable is set but the proxy itself is not turned on, the same problem will occur.

1dao avatar Jan 21 '26 10:01 1dao

我已经解决了我的问题。哦,我的OpenCode在启动时尝试从GitHub更新,如果代理未启用,它会失败启动。即使启用了代理,启动时仍然会报错。最好完全禁用“哦,我的OpenCode”。此外,如果https_proxy环境变量被设置但代理本身未被启用,也会出现同样的问题。

I've resolved the issue. The error no longer occurs after I rolled back to version 1.1.21.

wxy119-119 avatar Jan 22 '26 03:01 wxy119-119

If you’re in network-restricted environments, I’d use OpenCode Sentinel — this project includes built-in support for offline dependency configuration, enabling one-click installation of all required dependencies without any network access 👍👍.

Also, it cuts all network access except to your LLM, so it works flawlessly in network-restricted environments.

Repo: https://github.com/oneoflzx/opencode-sentinel

OneOfLzx avatar Jan 22 '26 06:01 OneOfLzx

This can happen if the server crashes, is just starting, etc. In most even semi-serious deployments, the server would restart automatically, so it would be nice if opencode would retry here.

lee-b avatar Jan 27 '26 13:01 lee-b

Edit: Resolved by simply restarting IDE

Having the same problem. LLM parameters are fine, i cross checked credentials with continue, there it works.

Setting log-level to DEBUG and enable logging gives me:

`AKS:xxx ~ took 5s ❯ opencode --print-logs INFO 2026-01-29T15:46:02 +368ms service=default version=1.1.42 args=["--print-logs"] opencode INFO 2026-01-29T15:46:02 +2ms service=config path=/home/xxx/.config/opencode/config.json loading INFO 2026-01-29T15:46:02 +1ms service=config path=/home/xx/.config/opencode/opencode.json loading INFO 2026-01-29T15:46:02 +2ms service=config path=/home/xxx/.config/opencode/opencode.jsonc loading

AKS:xx ~ took 9s AKS:lwm ~ took 5s ❯ opencode --print-logs INFO 2026-01-29T15:46:02 +368ms service=default version=1.1.42 args=["--print-logs"] opencode INFO 2026-01-29T15:46:02 +2ms service=config path=/home/xxx/.config/opencode/config.json loading INFO 2026-01-29T15:46:02 +1ms service=config path=/home/xxx/.config/opencode/opencode.json loading INFO 2026-01-29T15:46:02 +2ms service=config path=/home/xxx/.config/opencode/opencode.jsonc loading

AKS:xx~ took 9s `

TyGu1 avatar Jan 29 '26 15:01 TyGu1

same issue when i try to open web page of "opencode serve"

jakiechris avatar Jan 30 '26 16:01 jakiechris

I've encountered the same problem. Once the AI ​​starts using the GLOB tool, it throws this error. Is there a way to use OpenCode in an offline environment?

wind-rain-sky avatar Jan 31 '26 05:01 wind-rain-sky

I've encountered the same problem. Once the AI ​​starts using the GLOB tool, it throws this error. Is there a way to use OpenCode in an offline environment?

@wind-rain-sky - In my environment, it turned out the problem for GREP/GLOB error was a lack of rg (ripgrep deb package). - There was an unsuccessful attempt to call the tool. Then, it looks like, some faulty error handler was accessing the network, resulting in this vague message. After rg installation there were no more errors in offline environment.

Gdimitron avatar Feb 02 '26 17:02 Gdimitron

To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

github-actions[bot] avatar Apr 04 '26 03:04 github-actions[bot]