iobroker-javascript-vs-code-extension icon indicating copy to clipboard operation
iobroker-javascript-vs-code-extension copied to clipboard

Can't connect to iobroker

Open itProfi opened this issue 1 year ago • 4 comments

#################################
VSCode Version: 1.89.1
Is new app install: false
Is telemetry enabled: true
Language: en
App host: desktop
Is extension active: false
Extension version: 1.3.2

2024-05-31T17:42:52.483Z INFO IobrokerConnectionService read config: {"ioBrokerUrl":"http://192.168.1.100","socketIoPort":8083,"scriptRoot":"/","adminVersion":"admin6","allowSelfSignedCertificate":false,"username":"admin","collectDebugLog":true}
2024-05-31T17:42:52.484Z WARN LoginService Trying to login to http://192.168.1.100:8083/login
2024-05-31T17:43:53.858Z WARN LoginService Login failed, because of exception. Login not necessary. Error: {"message":"Request failed with status code 503","name":"AxiosError","stack":"AxiosError: Request failed with status code 503\n\tat Re (c:\\Users\\User\\.vscode\\extensions\\nokxs.iobroker-javascript-1.3.2\\dist\\extension.js:2:415032)\n\tat IncomingMessage.<anonymous> (c:\\Users\\User\\.vscode\\extensions\\nokxs.iobroker-javascript-1.3.2\\dist\\extension.js:2:424196)\n\tat IncomingMessage.emit (node:events:529:35)\n\tat endReadableNT (node:internal/streams/readable:1368:12)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:82:21)","config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"adapter":["xhr","http"],"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, */*","User-Agent":"axios/1.2.5","Accept-Encoding":"gzip, compress, deflate, br"},"httpsAgent":{"_events":{},"_eventsCount":2,"defaultPort":443,"protocol":"https:","options":{"rejectUnauthorized":true,"noDelay":true,"path":null},"requests":{},"sockets":{},"freeSockets":{},"keepAliveMsecs":1000,"keepAlive":false,"maxSockets":null,"maxFreeSockets":256,"scheduling":"lifo","maxTotalSockets":null,"totalSocketCount":0,"maxCachedSessions":100,"_sessionCache":{"map":{},"list":[]}},"method":"get","url":"http://192.168.1.100:8083/login"},"code":"ERR_BAD_RESPONSE","status":503}
2024-05-31T17:43:53.859Z INFO SocketIoClient Try to connect to http://192.168.1.100:8083/
2024-05-31T17:43:53.859Z INFO SocketIoClient Created websocket without authorization. AllowSelfSignedCertificate: false. Cooke set: no
2024-05-31T17:43:56.861Z WARN SocketIoClient No READY flag received in 3 seconds. Re-init
2024-05-31T17:43:56.862Z INFO SocketIoClient Start reconnect
2024-05-31T17:43:59.865Z INFO SocketIoClient Try to connect to http://192.168.1.100:8083/
2024-05-31T17:43:59.865Z INFO SocketIoClient Created websocket without authorization. AllowSelfSignedCertificate: false. Cooke set: no
2024-05-31T17:44:02.868Z WARN SocketIoClient No READY flag received in 3 seconds. Re-init
2024-05-31T17:44:02.868Z INFO SocketIoClient Start reconnect
2024-05-31T17:44:03.869Z ERROR Message Could not connect to ioBroker. Check your '.iobroker-config.json' for wrong configuration: Error: Could not connect to 'http://192.168.1.100:8083/' after 10 seconds.
2024-05-31T17:44:03.876Z INFO IobrokerConnectionService read config: {"ioBrokerUrl":"http://192.168.1.100","socketIoPort":8083,"scriptRoot":"/","adminVersion":"admin6","allowSelfSignedCertificate":false,"username":"admin","collectDebugLog":true}
2024-05-31T17:44:03.876Z WARN LoginService Trying to login to http://192.168.1.100:8083/login

admin version 6.17.14 My config { "ioBrokerUrl": "http://192.168.1.100", "socketIoPort": 8083, "scriptRoot": "/", "adminVersion": "admin6", "allowSelfSignedCertificate": false, "username": "admin", "collectDebugLog": true }

itProfi avatar May 31 '24 17:05 itProfi

Try using port 8081.

nokxs avatar May 31 '24 18:05 nokxs

Could not connect to ioBroker. Check your '.iobroker-config.json' for wrong configuration: Error: The connection to ioBroker was not possible. Reason: Error Code: UNKNOWN; Message: connect ECONNREFUSED 192.168.1.100:8081

In my case a have a 8083 port Скриншот 31-05-2024 225221

itProfi avatar May 31 '24 19:05 itProfi

Give me some days. I will try to reproduce your problem.

nokxs avatar Jun 02 '24 11:06 nokxs

I tried to reproduce your problem, but had no luck. After that I had another look into your logs and there seems to be a problem with your iobroker server:

You have authentication enabled and therefore a login is necessary. When calling http://192.168.1.100:8083/login you should normally get either http status code 404 if no login is necessary or 200 if login is needed. In your case the server returned 503 (Service Unavailable). Only if 200 is returned, the connection with password is used.

Could you try two different things and post the result here?

  1. Log out from iobroker (or open a private browsing window) and enter the url http://192.168.1.100:8083/login. Are you redirected to the iobroker login page?
  2. Disable the authentication in iobroker temporally and try connecting with the extension. Does it work now?

nokxs avatar Jun 02 '24 19:06 nokxs

Close stale issue

nokxs avatar Aug 14 '24 20:08 nokxs