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

Cannot connect to cyclotron-svc (getTopDashboards) #54

Open
snapfast opened this issue Mar 23, 2020 · 8 comments
Open

Cannot connect to cyclotron-svc (getTopDashboards) #54

snapfast opened this issue Mar 23, 2020 · 8 comments

Comments

@snapfast
Copy link

snapfast commented Mar 23, 2020

cyclotron-site$ npm start`

> [email protected] start /home/nightshade/projects/heroku-apps/sars22/cyclotron-site
> npx gulp server

[04:19:31] Requiring external module coffeescript/register
[04:19:32] Using gulpfile ~/projects/heroku-apps/sars22/cyclotron-site/gulpfile.coffee
[04:19:32] Starting 'server'...
[04:19:32] Starting 'build'...
[04:19:32] Starting 'vendor'...
[04:19:32] Starting 'assets'...
[04:19:32] Starting 'pug'...
[04:19:32] Starting 'styles'...
[04:19:32] Starting 'scripts'...
[04:19:32] Starting 'bower-install'...
[04:19:32] Using cwd: /home/nightshade/projects/heroku-apps/sars22/cyclotron-site
[04:19:32] Using bower dir: ./bower_components
[04:19:34] Finished 'styles' after 2.2 s
[04:19:34] Finished 'assets' after 2.28 s
[04:19:35] Finished 'scripts' after 3.01 s
[04:19:36] Finished 'pug' after 3.58 s
[04:19:39] Finished 'bower-install' after 6.45 s
[04:19:39] Starting 'vendor-fonts'...
[04:19:39] Starting 'vendor-scripts'...
[04:19:39] Starting 'vendor-styles'...
[04:19:39] Starting 'vendor-img'...
[04:19:40] Finished 'vendor-img' after 996 ms
[04:19:40] Finished 'vendor-styles' after 1.02 s
[04:19:40] Finished 'vendor-fonts' after 1.02 s
[04:19:40] Finished 'vendor-scripts' after 1.02 s
[04:19:40] Finished 'vendor' after 7.47 s
[04:19:40] Finished 'build' after 7.47 s
[04:19:40] Starting 'watch'...
[04:19:40] Starting 'webserver'...
[04:19:40] Option open does not work in gulp-connect v 2.*. Please read "readme" https://github.com/AveVlad/gulp-connect
[04:19:40] Starting server...
[04:19:40] Server started http://0.0.0.0:8080
[04:19:40] Running server

I am unable to get connect the site to the svc. I am able to see the http://localhost:8077 api page. But somehow site is not getting connected.
Shows error Cannot connect to cyclotron-svc (getTopDashboards)

@baumandm
Copy link
Collaborator

Hi @rahbal, did you configure the _public/js/conf/configService.js file after building the website? It gets generated on first build from sample.configService.js, and contains this by default:

restServiceUrl: 'http://localhost:8077',

From what you said, that's probably correct, but if you changed it you might run into errors.

If that's not the issue, did you correctly start MongoDB and connect the service to it? You can test this via http://localhost:8077/dashboards. It should have deployed some example dashboards automatically on startup, so you should get some JSON response. If there are any errors, it's likely that the website is connecting correctly, but is unable to get a valid response.

Lastly, you can open the browser console and look for any more detailed errors when you load the site.

@snapfast
Copy link
Author

Yes, all dashboards are visible on this url http://localhost:8077/dashboards

Only cyclotron-site is showing that it is not able to connect to the cyclotron-svc.

@baumandm
Copy link
Collaborator

Any luck finding errors in the browser developer console?

@karel1980
Copy link

I bumped into what looks like the same issue:
image

@karel1980
Copy link

I started by running cyclontron-svc using the sample.config.js; settings analytics enabled = true in that file gets rid of the 405, but now I get a 500. The error on the console of cyclontron-svc says Error [MongoError]: The 'cursor' option is required, except for aggregate with the explain argument. I haven't investigated yet, pretty sure that's a configuration error on my behalf

@karel1980
Copy link

upgrading mongoose to 6.2.10 seems to make the error go away; fyi I'm running mongo 4.4, that's probably relevant

@karel1980
Copy link

I'll create a PR; I find any tests in cyclotron-svc, though I have to admit I didn't look very hard.

@karel1980
Copy link

Since there is an open PR for bumping mongoose that's 3 years old [0] I don't think this project is being maintained very actively anymore.
[0] #49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants