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

[bug]: Port 20426 is not available after 30 seconds. #480

Open
1 task done
weberk opened this issue Jan 4, 2025 · 4 comments
Open
1 task done

[bug]: Port 20426 is not available after 30 seconds. #480

weberk opened this issue Jan 4, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@weberk
Copy link

weberk commented Jan 4, 2025

No existing issues.

  • There is no existing issue for my problem.

Describe the bug

dev-server watch is automatically terminating after first access to port 8081

reason is that hidden admin port 20426 has no process connected to.

To Reproduce

  1. execute dev-server watch
  2. verifiy there is a timeout connecting to port 20426
  3. use the browser to access http://localhost:8081

Expected behavior

The admin GUI should be loaded.
Please advise how to return to a working version again. No backup available.

Screenshots & Logfiles

Port 20426 is not available after 30 seconds.
Starting browser-sync
[HPM] Proxy created: /browser-sync/**  -> http://127.0.0.1:22426
[HPM] Proxy created: /  -> http://127.0.0.1:20426
Starting web server on port 8081
...
2025-01-04 18:27:59.736  - info: host.dev-uvr16xx_bl-net-macBookPro.local received SIGINT

node:internal/process/promises:394
    triggerUncaughtException(err, true /* fromPromise */);
...
AxiosError: connect ECONNREFUSED 127.0.0.1:20426
    at AxiosError.from (/opt/homebrew/lib/node_modules/@iobroker/dev-server/node_modules/axios/dist/node/axios.cjs:876:14)
    at RedirectableRequest.handleRequestError (/opt/homebrew/lib/node_modules/@iobroker/dev-server/node_modules/axios/dist/node/axios.cjs:3156:25)
    at RedirectableRequest.emit (node:events:507:28)
    at eventHandlers.<computed> (/opt/homebrew/lib/node_modules/@iobroker/dev-server/node_modules/follow-redirects/index.js:49:24)
    at ClientRequest.emit (node:events:507:28)
    at emitErrorEvent (node:_http_client:104:11)
    at Socket.socketErrorListener (node:_http_client:512:5)
    at Socket.emit (node:events:507:28)
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at Axios.request (/opt/homebrew/lib/node_modules/@iobroker/dev-server/node_modules/axios/dist/node/axios.cjs:4287:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async /opt/homebrew/lib/node_modules/@iobroker/dev-server/dist/index.js:619:30 {
  port: 20426,
  address: '127.0.0.1',
  syscall: 'connect',
  code: 'ECONNREFUSED',
...
2025-01-04 18:28:00.349  - info: host.dev-uvr16xx_bl-net-macBookPro.local terminated

Adapter version

7.4.10

js-controller version

7.0.6

Node version

23.2.0

Operating system

MacOs Sequoia

Additional context

happend after accepting the update to admin adapter version 7.4.10 with the admin GUI
next dev-server watch was producing the described error situation
tried dev-server update, with no improvement

@weberk weberk added the bug Something isn't working label Jan 4, 2025
@weberk weberk changed the title [bug]: Port 20426 is not available after 30 seconds. Starting browser-sync [HPM] Proxy created: /browser-sync/** -> http://127.0.0.1:22426 [HPM] Proxy created: / -> http://127.0.0.1:20426 Starting web server on port 8081 [bug]: Port 20426 is not available after 30 seconds. Jan 4, 2025
@mcm1957
Copy link
Contributor

mcm1957 commented Jan 4, 2025

This (most likely) is NO bug of admin but related to dev-server. So it could be logged at https://github.com/[ioBroker/dev-server](https://github.com/ioBroker/dev-server). The proxy is an extension managed by dev-server and not in use during normal admin usage at target systems.

But in general I would reommend to discuss such questions at auf telegramm / discord channel first. Invote links can be found at www.iobroker.dev.

In addtion I would not expect that an gui based admin update within a running dev-server session is working. But thats also somethi g to dicuss at telegramm / discord.

@Apollon77 Apollon77 transferred this issue from ioBroker/ioBroker.admin Jan 4, 2025
@oweitman
Copy link

oweitman commented Jan 4, 2025

my observation showed that closing the open browser tabs used in a previous run for the dev server worked around the problem.

@weberk
Copy link
Author

weberk commented Jan 5, 2025

Closing the tab and even using a different browser (Chrome and Safari) did not changed the effect: dev-server stops with the mentioned exception on first access of localhost:8081.

I would say the admin.0 instance does not succeed to start?

await this.updateObject('system.adapter.admin.0', (admin) => {
           admin.native.port = this.getPort(adminPort, HIDDEN_ADMIN_PORT_OFFSET);
           admin.native.bind = '127.0.0.1';
           return admin;
       });

@weberk
Copy link
Author

weberk commented Jan 8, 2025

Workarround
Ich habs repariert, indem ich das .dev-server-Verzeichnis im Adapter-Basisverzeichnis gelöscht hab und den dev-server in dem Adapter neu konfigurieren hab lassen mit:
dev-server setup
Danach startete mein Adapter inklusive der admin.0-Instanz wieder gemeinsam und fehlerfrei.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants