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

nodejs-mongo devfile sample issues #14009

Closed
5 tasks done
sparkoo opened this issue Jul 24, 2019 · 6 comments
Closed
5 tasks done

nodejs-mongo devfile sample issues #14009

sparkoo opened this issue Jul 24, 2019 · 6 comments
Labels
kind/bug Outline of a bug - must adhere to the bug report template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P2 Has a minor but important impact to the usage or development of the system. status/blocked Issue that can’t be moved forward. Must include a comment on the reason for the blockage.

Comments

@sparkoo
Copy link
Member

sparkoo commented Jul 24, 2019

Describe the bug

https://github.com/eclipse/che-devfile-registry/tree/master/devfiles/nodejs-mongo
3 issues

/projects/nodejs-mongodb-app/node_modules/mongodb/lib/server.js:242
        process.nextTick(function() { throw err; })
                                      ^
Error: connect ETIMEDOUT 10.109.232.241:27017
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
Emitted 'error' event at:
    at NativeConnection.Connection.error (/projects/nodejs-mongodb-app/node_modules/mongoose/lib/connection.js:443:8)
    at /projects/nodejs-mongodb-app/node_modules/mongoose/lib/connection.js:472:15
    at /projects/nodejs-mongodb-app/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:59:21
    at /projects/nodejs-mongodb-app/node_modules/mongodb/lib/db.js:232:14
    at Server.<anonymous> (/projects/nodejs-mongodb-app/node_modules/mongodb/lib/server.js:240:9)
    at Object.onceWrapper (events.js:273:13)
    at Server.emit (events.js:182:13)
    at Pool.<anonymous> (/projects/nodejs-mongodb-app/node_modules/mongodb-core/lib/topologies/server.js:308:68)
    at Pool.emit (events.js:182:13)
    at Connection.<anonymous> (/projects/nodejs-mongodb-app/node_modules/mongodb-core/lib/connection/pool.js:115:12)
    at Object.onceWrapper (events.js:273:13)
    at Connection.emit (events.js:182:13)
    at Socket.<anonymous> (/projects/nodejs-mongodb-app/node_modules/mongodb-core/lib/connection/connection.js:144:49)
    at Object.onceWrapper (events.js:273:13)
    at Socket.emit (events.js:182:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
[nodemon] app crashed - waiting for file changes before starting...

Che version

  • nightly

Steps to reproduce

  1. import devfile https://github.com/eclipse/che-devfile-registry/tree/master/devfiles/nodejs-mongo
  2. run run the web app task
  3. ! page with URL getting 404 appears
  4. wait for some time doing nothing
  5. ! see Error in terminal
  6. run create test user
  7. ! nothing visible happens

Expected behavior

Runtime

  • minikube (include output of minikube version and kubectl version)

Screenshots

Installation method

  • chectl

Environment

  • my computer
    • Linux
@amisevsk
Copy link
Contributor

This is tricky as the sample app here is a backend app; the main interaction would be via curl/wget.

@sparkoo Do you think adding tasks for "test [x] API path" would resolve this issue?

@slemeur
Copy link
Contributor

slemeur commented Jul 24, 2019

Adding it to 7.1.0 as related to #13945

@slemeur slemeur added kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system. team/platform labels Jul 24, 2019
@slemeur slemeur added this to the 7.1.0 milestone Jul 24, 2019
@mkuznyetsov
Copy link
Contributor

the issue with this sample, that it doesn't work on minikube/minishift instances without userland-proxy=false, which is not enforced anymore in chectl/docs.
that's why application cannot connect to mongodb container and fails (2 & 3 points of the issue)
@benoitf @davidfestal could you suggest something on this?

as for run the web app task opens URL that returns 404, this would be solved by Preview URL feature (#13945) , as default preview path / indeed points to 404, where it should be /api/articles

@skabashnyuk skabashnyuk added the status/blocked Issue that can’t be moved forward. Must include a comment on the reason for the blockage. label Aug 8, 2019
@amisevsk
Copy link
Contributor

amisevsk commented Aug 8, 2019

I think the main issue here is that the sample app used is a bad example. It's meant to be a backend API; the way to test it would be via something like postman.

Even if we redirect to /api/articles, the user cannot do anything with that web page, it just shows the json response that the server would give if you used curl. There's no way to post data, except by tasks.

I'm working on updating some of the config to make this smoother for 7.0, but even with workarounds, Che is ill-suited to working on this app without additional software. Some endpoints require JWT auth.

@l0rd
Copy link
Contributor

l0rd commented Aug 29, 2019

I have opened #14392 to completely replace the nodejs + mongodb sample

@skabashnyuk skabashnyuk modified the milestones: 7.x, Backlog - Platform Oct 10, 2019
@skabashnyuk skabashnyuk removed this from the Backlog - Platform milestone Oct 10, 2019
@che-bot
Copy link
Contributor

che-bot commented Apr 8, 2020

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 8, 2020
@che-bot che-bot closed this as completed Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P2 Has a minor but important impact to the usage or development of the system. status/blocked Issue that can’t be moved forward. Must include a comment on the reason for the blockage.
Projects
None yet
Development

No branches or pull requests

8 participants