akhenry / openmct-yamcs

Open MCT YAMCS plugin
14 stars 9 forks source link

Trouble with YAMCS quickstart example #205

Open ewong-canadensys opened 2 years ago

ewong-canadensys commented 2 years ago

I might be doing something wrong but I get a "Failed to retrieve object taxonomy spacecraft", when browsing to :9000.

Verified the server is running at 8090

Running YAMCS Server and openmct-yamcs on the same ubuntu 18.04 LTS distribution on an i7 intel computer.

Node version v16.13.1

Yamcs Server commit e0d3fbfe7337a051151f2976fc152f0fb850ac63 (HEAD -> master, origin/master, origin/HEAD) Author: Fabian Diet fabian.diet@spaceapplications.com Date: Mon Oct 3 09:14:03 2022 +0200

openmct-yamcs commit a15f1f07c447904722f9cbb27e403585f0a214cf (HEAD -> master, origin/master, origin/HEAD) Merge: ac54e42 f400ce1 Author: Scott Bell scott@traclabs.com Date: Mon Oct 3 21:06:37 2022 +0200

Merge pull request #200 from akhenry/dependabot/npm_and_yarn/babel/eslint-parser-7.19.1

Bump @babel/eslint-parser from 7.18.9 to 7.19.1
scottbell commented 2 years ago

Can you please paste the log you get from running npm start?

ewong-canadensys commented 2 years ago

the stdout from npm start is shown here:

openmct-yamcs@2.1.0 start NODE_ENV=dev webpack-dev-server

[webpack-dev-server] [HPM] Proxy created: /yamcs-proxy -> http://localhost:8090/ [webpack-dev-server] [HPM] Proxy rewrite rule created: "^/yamcs-proxy/" ~> "" [webpack-dev-server] [HPM] Proxy created: /yamcs-proxy-ws -> ws://localhost:8090/api/websocket [webpack-dev-server] [HPM] Proxy rewrite rule created: "^/yamcs-proxy-ws/" ~> "" [webpack-dev-server] Project is running at: [webpack-dev-server] Loopback: http://localhost:9000/ [webpack-dev-server] On Your Network (IPv4): http://192.168.8.29:9000/ [webpack-dev-server] Content not from webpack is served from '/home/canadensys/openmct/openmct-yamcs/example, /home/canadensys/openmct/openmct-yamcs/node_modules/openmct/dist' directory asset openmct-yamcs-example.js 785 KiB [emitted] [minimized] [big] (name: openmct-yamcs-example) orphan modules 121 KiB [orphan] 32 modules runtime modules 27.3 KiB 12 modules cacheable modules 274 KiB modules by path ./node_modules/webpack-dev-server/client/ 55.8 KiB ./node_modules/webpack-dev-server/client/index.js?protocol=ws%3A&hostname=0.0.0.0&port=9000&pathname=%2Fws&logging=info&overlay=true&reconnect=10&hot=true&live-reload=true + 8 modules 27.4 KiB [built] [code generated]

  • 3 modules modules by path ./node_modules/webpack/hot/*.js 4.3 KiB ./node_modules/webpack/hot/dev-server.js 1.59 KiB [built] [code generated]
  • 3 modules modules by path ./node_modules/html-entities/lib/*.js 81.3 KiB ./node_modules/html-entities/lib/index.js 7.74 KiB [built] [code generated]
  • 3 modules

    • 4 modules webpack 5.74.0 compiled successfully in 1082 ms

after running npm install --timing, the following attached log file was produced 2022-10-13T13_20_17_923Z-debug.log

scottbell commented 2 years ago

@ewong-canadensys are there any errors in the command line after you get the Failed to retrieve object taxonomy spacecraft error? Also, is there anything in the DevTools Javascript console in the browser you're using?

ewong-canadensys commented 2 years ago

image

Not sure if this helps, I don't see additional details after the Failed to retrieve error

scottbell commented 2 years ago

Ah, so the error is occurring between the browser and the websocket proxy. Just to double check, there aren't any errors in the console where you typed npm start? That process is starting the webpack-dev-server, which includes a proxy to YAMCS:

proxy: {
            "/yamcs-proxy/*": {
                target: "http://localhost:8090/",
                secure: false,
                changeOrigin: true,
                pathRewrite: {'^/yamcs-proxy/': ''}
            },
            "/yamcs-proxy-ws/*": {
                target: "ws://localhost:8090/api/websocket",
                secure: false,
                changeOrigin: true,
                ws: true,
                pathRewrite: {'^/yamcs-proxy-ws/': ''}
            }
        }
ewong-canadensys commented 2 years ago

no errors are displayed on the console

ozyx commented 2 years ago

Hi @ewong-canadensys ,

Please try downgrading to Node v16 if you're using version >=18. I think you may be experiencing this bug: https://github.com/akhenry/openmct-yamcs/issues/223

Let us know if this resolves your issue!

ewong-canadensys commented 2 years ago

downgraded to 16, still getting this

image

using this version of YAMCS

image
ozyx commented 2 years ago

@ewong-canadensys

Are you running openmct on the same machine as the yamcs instance? I notice in your original screenshot the URL is 192.168.8.29.

You might try updating the location of the proxy in the webpack config:

proxy: {
            "/yamcs-proxy/*": {
                target: "http://192.168.8.29:8090/",
                secure: false,
                changeOrigin: true,
                pathRewrite: {'^/yamcs-proxy/': ''}
            },
            "/yamcs-proxy-ws/*": {
                target: "ws://192.168.8.29:8090/api/websocket",
                secure: false,
                changeOrigin: true,
                ws: true,
                pathRewrite: {'^/yamcs-proxy-ws/': ''}
            }
        }
ewong-canadensys commented 2 years ago

Thanks for the suggestion but openmct and yamcs are running on the same machine

unlikelyzero commented 1 year ago

@ewong-canadensys this appears to be fixed. Can you try again?

ewong-canadensys commented 1 year ago

node -v v16.19.0 npm --version 9.2.0

Latest commit used:

commit 787386277eba237abb72c646b290e89bb9eab56d (HEAD -> master, origin/master, origin/HEAD) Merge: ccfb77b ff56801 Author: John Hill john.c.hill@nasa.gov Date: Tue Dec 20 09:37:57 2022 -0800

Merge pull request #256 from akhenry/dependabot/npm_and_yarn/webpack-cli-5.0.1

Bump webpack-cli from 4.10.0 to 5.0.1

...

Still experiencing the same problem

Both YAMCS and openmct-yamcs running on same machine

openMCT yamcsInstance

akhenry commented 1 year ago

So I notice that an IP address is being used to access the webpack dev server locally, rather than localhost. The Open MCT quickstart example is built with localhost configured as the host. If for some reason webpack dev server is binding to 192.168.8.29 but NOT localhost (I dunno, some quirk of Ubuntu?) then we might expect the behavior you're seeing.

Are you able to access Open MCT via localhost:9000?