Geocene / trainset

A lightweight web application for brushing labels onto time series data; useful for building training sets.
https://trainset.geocene.com/
MIT License
163 stars 36 forks source link

Get no response when running on Ubuntu 20.04 #99

Closed cristiancevasco closed 3 years ago

cristiancevasco commented 3 years ago

Hi, Trainset team! I'm raising this issue for some guidance about how to deploy it locally. I'm testing it on a Ubuntu 20.04 instance. Following I gathered the behaviour I see when testing the commands on the README.md doc.

I’ve tested all mayor versions of npm from 3.0.0 to the 6.0.0, including 6.4.1. Of course respecting the version for nodejs --> 10.15.1

When running npm run build --report it states that it’s listening on port 8888 but is not reachable. Checked for open ports in the instance and the port 8888 was effectively open, and the app listening on such port but it didn’t through any response when sending get requests. This is the output when running npm run build --report:

> trainset@1.0.0 build /home/ubuntu/trainset
> node build/build.js

⠏ building for production...Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
⠙ building for production...Webpack Bundle Analyzer is started at http://127.0.0.1:8888
Use Ctrl+C to close it
Hash: e9d1a797449fe90274d1
Version: webpack 4.44.1
Time: 18566ms
Built at: 02/13/2021 1:17:07 PM
                                Asset       Size  Chunks                                Chunk Names
         app.e9d1a797449fe90274d1.css    178 KiB       0  [emitted] [immutable]         app
                           index.html  718 bytes          [emitted]
                      static/.gitkeep    0 bytes          [emitted]
                   static/favicon.ico   16.6 KiB          [emitted]
           static/files/colorlist.csv  134 bytes          [emitted]
     static/files/sample_trainset.csv    242 KiB          [emitted]
static/js/app.269d873e8b157dec6fc2.js    573 KiB       0  [emitted] [immutable]  [big]  app
             static/trainset_logo.png     44 KiB          [emitted]
Entrypoint app [big] = app.e9d1a797449fe90274d1.css static/js/app.269d873e8b157dec6fc2.js

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
  static/js/app.269d873e8b157dec6fc2.js (573 KiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
  app (751 KiB)
      app.e9d1a797449fe90274d1.css
      static/js/app.269d873e8b157dec6fc2.js

WARNING in webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/

  Build complete.

  Tip: built files are meant to be served over an HTTP server.
  Opening index.html over file:// won't work.

Running npm run dev to test it on port 8080 doesn’t work. When I telnet to port 8080 it can establish the connection temporarily but it’s closed by the host immediately. This is the output when running npm run dev:

 DONE  Compiled successfully in 6566ms                                                                                                              1:36:26 PM

 I  Your application is running here: http://localhost:8080

Output when running npm run start:

root@ip-10-35-35-69:/home/ubuntu/trainset# npm run start

> trainset@1.0.0 start /home/ubuntu/trainset
> node server.js

Listening on port 5000

If I run a telnet on port 5000 I can reach it but when sending get requests to such port it’s not able to respond properly and this output is shown on the session where I'm running npm run start:

Error: Can't set headers after they are sent.
    at SendStream.headersAlreadySent (/home/ubuntu/trainset/node_modules/send/index.js:390:13)
    at SendStream.send (/home/ubuntu/trainset/node_modules/send/index.js:617:10)
    at onstat (/home/ubuntu/trainset/node_modules/send/index.js:729:10)
    at FSReqWrap.oncomplete (fs.js:155:5)

Probably there are steps that I'm missing. I would like to understand what I'm doing wrong here and based on the outcome I can help building a more detailed documentation. Thanks in advance for your time.

cristiancevasco commented 3 years ago

Hey, Trainset team! I know you're busy and this is issue is not a priority. But I'm very much interested on having this tool running and, if possible, collaborating with it. I would appreciate if any of you could give me some guidance about the proper ways to run it locally. I'll be very pleased to collaborate with a much detailed documentation. Thanks in advance for you help!

daterdots commented 3 years ago

@cristiancevasco - so sorry, bud. We haven't tested this on Ubuntu. Is there any hope of you just trying to run it in your browser? Do you need to make some mods that require you to run it locally? http://trainset.geocene.com

cristiancevasco commented 3 years ago

Thanks for your response, @daterdots! Currently the browser version hosted by Trainset works perfectly, but since I want to test it for the company I work on we need to test it locally due to compliance reasons. Do you know which other platform has it been proven to run successfully? Maybe I can try with a different OS as host. Thanks again for your help.

daterdots commented 3 years ago

the most extensively we have tested it is on MacOS running Chrome or Safari. The app runs entirely without access to the internet. The hosted version is just to get the app. You could load the page, then airgap your machine, do whatever you need to do (it will work fine), then close the page before reconnecting to the network. Would that work?

cristiancevasco commented 3 years ago

That might work. I'll also try it out on macOS. Thanks again for you answer. Best regards.