Stuck on the dashboard page with "error connecting to the websocket client"
eercanayar opened this issue · 3 comments
Description
After initial installation with docker on Mac OSX, the dashboard page stuck with error connecting to the websocket client {message: "Timeout", requestId: "e324c120-07a0-11ea-8604-5dc8e2c99843"}
error on the Chrome console. The front-end waits with a loading animation with Loading Streams ...
notice.
Steps to Reproduce
- Follow instructions on Installing on macOS
- Go to http://localhost:8081/dashboard on the browser.
Versions
1.4
Additional Information
$ docker ps
output:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
47762f26de1c cedalo/streamsheets-webui:1.4 "docker-entrypoint.s…" 37 minutes ago Up 37 minutes 0.0.0.0:9000->9000/tcp streamsheets-webui
70db460a2b6f cedalo/streamsheets-service-machines:1.4 "docker-entrypoint.s…" 37 minutes ago Up 37 minutes 8089/tcp streamsheets-service-machines
30266cb70ba6 cedalo/streamsheets-gateway:1.4 "docker-entrypoint.s…" 37 minutes ago Up 37 minutes 0.0.0.0:8080->8080/tcp, 0.0.0.0:8088->8088/tcp streamsheets-gateway
38fe16752a7e cedalo/streamsheets-service-graphs:1.4 "docker-entrypoint.s…" 37 minutes ago Up 37 minutes streamsheets-service-graphs
bd549d633cea redis:4.0.11-alpine "docker-entrypoint.s…" 37 minutes ago Up 37 minutes 6379/tcp streamsheets-internal-redis
0eff41a520e0 eclipse-mosquitto:1.6 "/docker-entrypoint.…" 37 minutes ago Created broker
0260df83d938 mongo:3.6 "docker-entrypoint.s…" 37 minutes ago Up 37 minutes 27017/tcp streamsheets-internal-database
a2e6eb5ccc98 cedalo/reverseproxy:1.4 "nginx -g 'daemon of…" 37 minutes ago Up 37 minutes 80/tcp, 0.0.0.0:8081->8081/tcp reverseproxy
fc292a439934 eclipse-mosquitto:1.5 "/docker-entrypoint.…" 37 minutes ago Up 37 minutes 1883/tcp streamsheets-internal-broker
3ea210d14a1f cedalo/streamsheets-installer:1.4-macos "/install" 42 minutes ago Exited (0) 42 minutes ago hardcore_wilson
Browser console output after few minutes:
GatewayClient.js:7 Init GatwayClient 2019-11-15T12:16:37.659Z
[Violation] Forced reflow while executing JavaScript took 33ms
BaseGatewayClient.js:848 Client 'Web Worker Gateway Client' connected
BaseGatewayClient.js:91 Sending empty request.
BaseGatewayClient.js:808 Got event {type: "graphserver_connected", service: {…}}
BaseGatewayClient.js:808 Got event {type: "machineserver_connected", service: {…}}
HTTPGatewayAPI.js:323 Sending request to Gateway GetMetaInformationHTTPRequest {_name: "Request", _baseEndpoint: "http://127.0.0.1:8081/api/v1.0", _token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZ…Tk3fQ.rolTaY3eLx5SMoNuxhyNX94dPsK_pSp9Y3PMYs1F5NY"}
HTTPGatewayAPI.js:323 Sending request to Gateway GraphQLHTTPRequest {_name: "Request", _baseEndpoint: "http://127.0.0.1:8081/api/v1.0", _token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZ…Tk3fQ.rolTaY3eLx5SMoNuxhyNX94dPsK_pSp9Y3PMYs1F5NY", _query: "{↵ me {↵ id↵ username↵ lastName↵ …me↵ settings {↵ locale↵ }↵ }↵ }", _variables: undefined}
HTTPGatewayAPI.js:327 Got response from Gateway {graphs: {…}, machines: {…}, gateway: {…}}
HTTPGatewayAPI.js:327 Got response from Gateway {data: {…}}
HTTPGatewayAPI.js:323 Sending request to Gateway GetMachineDefinitionsHTTPRequest {_name: "Request", _baseEndpoint: "http://127.0.0.1:8081/api/v1.0", _token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZ…Tk3fQ.rolTaY3eLx5SMoNuxhyNX94dPsK_pSp9Y3PMYs1F5NY"}
HTTPGatewayAPI.js:327 Got response from Gateway []
WebSocketGatewayAPI.js:445 Sending request to Gateway DSConfigurationLoadAllSocketRequest {_name: "Request", _ws: WebSocket, _id: "c6546450-07a1-11ea-bb68-1f5d578167ec", _type: "stream_config_load_all", _topic: "api/v1.1/digitalmachine/services/streams/input"}
BaseGatewayClient.js:91 Sending empty request.
BaseGatewayClient.js:91 Sending empty request.
DefaultLayout.js:74 error connecting to the websocket client {message: "Timeout", requestId: "c6546450-07a1-11ea-bb68-1f5d578167ec"}
initializeAll @ DefaultLayout.js:74
async function (async)
initializeAll @ DefaultLayout.js:52
componentDidMount @ DefaultLayout.js:87
Wj @ react-dom.production.min.js:249
exports.unstable_runWithPriority @ scheduler.production.min.js:18
Yf @ react-dom.production.min.js:119
Kj @ react-dom.production.min.js:242
xj @ react-dom.production.min.js:220
(anonymous) @ react-dom.production.min.js:120
exports.unstable_runWithPriority @ scheduler.production.min.js:18
Yf @ react-dom.production.min.js:119
ag @ react-dom.production.min.js:120
bg @ react-dom.production.min.js:119
Hg @ react-dom.production.min.js:211
enqueueSetState @ react-dom.production.min.js:132
D.setState @ react.production.min.js:13
componentDidMount @ App.js:26
async function (async)
componentDidMount @ App.js:24
Wj @ react-dom.production.min.js:249
exports.unstable_runWithPriority @ scheduler.production.min.js:18
Yf @ react-dom.production.min.js:119
Kj @ react-dom.production.min.js:242
xj @ react-dom.production.min.js:220
Hg @ react-dom.production.min.js:211
gk @ react-dom.production.min.js:277
hk @ react-dom.production.min.js:277
(anonymous) @ react-dom.production.min.js:287
Rj @ react-dom.production.min.js:222
sk @ react-dom.production.min.js:287
render @ react-dom.production.min.js:288
(anonymous) @ index.js:16
webpack_require @ bootstrap 721dd1cec0d65a677a4a:49
(anonymous) @ main.affc4344.js:115035
webpack_require @ bootstrap 721dd1cec0d65a677a4a:49
(anonymous) @ bootstrap 721dd1cec0d65a677a4a:144
(anonymous) @ bootstrap 721dd1cec0d65a677a4a:144
BaseGatewayClient.js:91 Sending empty request.
BaseGatewayClient.js:91 Sending empty request.
BaseGatewayClient.js:91 Sending empty request.
BaseGatewayClient.js:91 Sending empty request.
BaseGatewayClient.js:91 Sending empty request.
BaseGatewayClient.js:91 Sending empty request.
BaseGatewayClient.js:91 Sending empty request.
BaseGatewayClient.js:91 Sending empty request.
BaseGatewayClient.js:91 Sending empty request.
BaseGatewayClient.js:91 Sending empty request.
BaseGatewayClient.js:91 Sending empty request.
It looks like the streams service has not been started correctly. Can you edit the Docker Compose file streamsheets/services/docker-compose/docker-compose.prod.yml, then comment out the following section under streamsheets-service-streams
and send us the output of the streamsheets-service-streams
container?
logging:
driver: "none"
-->
# logging:
# driver: "none"
I've stopped the docker daemon after opening the issue. When I started again, there is no containers running; as expected.
I edited the yml file as you described. Then runned sh start.sh
to start containers. Here is the log:
$ sh start.sh
docker-compose up on base services...
Starting reverseproxy ...
Starting broker ... error
Starting streamsheets-internal-broker ...
Starting reverseproxy ... done
Starting streamsheets-internal-redis ...
Starting streamsheets-internal-broker ... done
Starting streamsheets-internal-database ... done
Starting streamsheets-internal-redis ... done
Starting streamsheets-service-graphs ... done
Starting streamsheets-gateway ... done
Starting streamsheets-service-machines ... done
Starting streamsheets-webui ... doneERROR: for broker Cannot start service broker: driver failed programming external connectivity on endpoint broker (3ae68aed0b692bf051905ab49389742f71ec4553baabd81916ba58b93535166d): Error starting userland proxy: listen tcp 0.0.0.0:1883: bind: address already in use
ERROR: Encountered errors while bringing up the project.
This' gave 1883 port error. I've noticed that I've already running a mosquitto installed on my system. So I've stopped it, and restarted the docker daemon again. Running the sh start.sh
again; and boom! It works. 🎉
The summary is, users should notice that Streamsheet's multi-container Docker app uses generic ports like 1883 (mqtt), 27017 (mongodb). Since we're all IoT developers/architects; it's very common to have a running mongodb, mqtt or similar software locally.
Thanks for your feedback! Glad to hear that it works now!
In any case, we will add a note regarding the ports to the documentation.