Htmengine-traffic-tutorial database migration

I’m trying to install htmengine-traffic-tutorial but facing issue on step “6. Apply database migration”. I tried to check around and found nothing. Besides, I found that found there’s similar issue related to mysql version 5.7.8+ in taurus app, and htm skeleton.
Appreciate if you can point me to where I can look to make change to successfully install this htm application.

P/S: system: ubuntu 16.04 LTS, nupic already installed, mysql 5.7.16-0ubuntu0.16.04.1 (Ubuntu)

Error log:

meharu@meharu-X3V3:~/htmengine-traffic-tutorial$ python python-engine/repository/migrate.py
INFO  [sqlalchemy.engine.base.Engine]   SHOW VARIABLES LIKE 'sql_mode'
INFO  [sqlalchemy.engine.base.Engine]   ()
INFO  [sqlalchemy.engine.base.Engine]   SELECT DATABASE()
INFO  [sqlalchemy.engine.base.Engine]   ()
INFO  [sqlalchemy.engine.base.Engine]   show collation where `Charset` = 'utf8' and `Collation` = 'utf8_bin'
INFO  [sqlalchemy.engine.base.Engine]   ()
INFO  [sqlalchemy.engine.base.Engine]   SELECT CAST('test plain returns' AS CHAR(60)) AS anon_1
INFO  [sqlalchemy.engine.base.Engine]   ()
INFO  [sqlalchemy.engine.base.Engine]   SELECT CAST('test unicode returns' AS CHAR(60)) AS anon_1
INFO  [sqlalchemy.engine.base.Engine]   ()
INFO  [sqlalchemy.engine.base.Engine]   SELECT CAST('test collated returns' AS CHAR CHARACTER SET utf8) COLLATE utf8_bin AS anon_1
INFO  [sqlalchemy.engine.base.Engine]   ()
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [sqlalchemy.engine.base.Engine]   DESCRIBE `alembic_version`
INFO  [sqlalchemy.engine.base.Engine]   ()
INFO  [sqlalchemy.engine.base.Engine]   SELECT alembic_version.version_num 
FROM alembic_version
INFO  [sqlalchemy.engine.base.Engine]   ()
INFO  [sqlalchemy.engine.base.Engine]   DESCRIBE `alembic_version`
INFO  [sqlalchemy.engine.base.Engine]   ()
INFO  [alembic.runtime.migration] Running upgrade  -> 57ab75d58038, Initial htmengine
INFO  [sqlalchemy.engine.base.Engine]   
CREATE TABLE instance_status_history (
	server VARCHAR(100) DEFAULT '' NOT NULL, 
	timestamp TIMESTAMP DEFAULT '0000-00-00 00:00:00', 
	status VARCHAR(32) DEFAULT '' NOT NULL, 
	PRIMARY KEY (server, timestamp)
)


INFO  [sqlalchemy.engine.base.Engine]   ()
INFO  [sqlalchemy.engine.base.Engine]   ROLLBACK
Traceback (most recent call last):
  File "python-engine/repository/migrate.py", line 62, in <module>
    migrate(options.version, offline=options.offline)
  File "python-engine/repository/migrate.py", line 46, in migrate
    alembic.command.upgrade(ALEMBIC_CONFIG, version, sql=offline)
  File "/home/meharu/.local/lib/python2.7/site-packages/alembic/command.py", line 174, in upgrade
    script.run_env()
  File "/home/meharu/.local/lib/python2.7/site-packages/alembic/script/base.py", line 416, in run_env
    util.load_python_file(self.dir, 'env.py')
  File "/home/meharu/.local/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file
    module = load_module_py(module_id, path)
  File "/home/meharu/.local/lib/python2.7/site-packages/alembic/util/compat.py", line 79, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "/home/meharu/htmengine-traffic-tutorial/python-engine/repository/migrations/env.py", line 100, in <module>
    runMigrationsOnline()
  File "/home/meharu/htmengine-traffic-tutorial/python-engine/repository/migrations/env.py", line 91, in runMigrationsOnline
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/home/meharu/.local/lib/python2.7/site-packages/alembic/runtime/environment.py", line 797, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/home/meharu/.local/lib/python2.7/site-packages/alembic/runtime/migration.py", line 314, in run_migrations
    step.migration_fn(**kw)
  File "/home/meharu/htmengine-traffic-tutorial/python-engine/repository/migrations/versions/000_57ab75d58038_initial_htmengine.py", line 50, in upgrade
    sa.PrimaryKeyConstraint('server', 'timestamp')
  File "<string>", line 8, in create_table
  File "<string>", line 3, in create_table
  File "/home/meharu/.local/lib/python2.7/site-packages/alembic/operations/ops.py", line 1098, in create_table
    return operations.invoke(op)
  File "/home/meharu/.local/lib/python2.7/site-packages/alembic/operations/base.py", line 318, in invoke
    return fn(self, operation)
  File "/home/meharu/.local/lib/python2.7/site-packages/alembic/operations/toimpl.py", line 101, in create_table
    operations.impl.create_table(table)
  File "/home/meharu/.local/lib/python2.7/site-packages/alembic/ddl/impl.py", line 194, in create_table
    self._exec(schema.CreateTable(table))
  File "/home/meharu/.local/lib/python2.7/site-packages/alembic/ddl/impl.py", line 118, in _exec
    return conn.execute(construct, *multiparams, **params)
  File "/home/meharu/.local/lib/python2.7/site-packages/SQLAlchemy-0.9.4-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py", line 720, in execute
    return meth(self, multiparams, params)
  File "/home/meharu/.local/lib/python2.7/site-packages/SQLAlchemy-0.9.4-py2.7-linux-x86_64.egg/sqlalchemy/sql/ddl.py", line 67, in _execute_on_connection
    return connection._execute_ddl(self, multiparams, params)
  File "/home/meharu/.local/lib/python2.7/site-packages/SQLAlchemy-0.9.4-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py", line 774, in _execute_ddl
    compiled
  File "/home/meharu/.local/lib/python2.7/site-packages/SQLAlchemy-0.9.4-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py", line 947, in _execute_context
    context)
  File "/home/meharu/.local/lib/python2.7/site-packages/SQLAlchemy-0.9.4-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1108, in _handle_dbapi_exception
    exc_info
  File "/home/meharu/.local/lib/python2.7/site-packages/SQLAlchemy-0.9.4-py2.7-linux-x86_64.egg/sqlalchemy/util/compat.py", line 185, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/home/meharu/.local/lib/python2.7/site-packages/SQLAlchemy-0.9.4-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py", line 940, in _execute_context
    context)
  File "/home/meharu/.local/lib/python2.7/site-packages/SQLAlchemy-0.9.4-py2.7-linux-x86_64.egg/sqlalchemy/engine/default.py", line 435, in do_execute
    cursor.execute(statement, parameters)
  File "build/bdist.linux-x86_64/egg/MySQLdb/cursors.py", line 205, in execute
  File "build/bdist.linux-x86_64/egg/MySQLdb/connections.py", line 36, in defaulterrorhandler
sqlalchemy.exc.OperationalError: (OperationalError) (1067, "Invalid default value for 'timestamp'") "\nCREATE TABLE instance_status_history (\n\tserver VARCHAR(100) DEFAULT '' NOT NULL, \n\ttimestamp TIMESTAMP DEFAULT '0000-00-00 00:00:00', \n\tstatus VARCHAR(32) DEFAULT '' NOT NULL, \n\tPRIMARY KEY (server, timestamp)\n)\n\n" ()
1 Like

Those errors smack of a MySQL Version problem like this one I thought we had fixed. This seems to be the latest version of MySQL I’ve seen used with numenta-apps.

I know @vkruglikov could help, but he’s on vacation. In the meantime, you might try downgrading to MySQL 5.6.

Ok. I proceed with MySQL 5.6 and the migration script is working as expected.

1 Like

@rhyolight
I’m following your video tutorial, but facing problem at “Start HTM Client (Javascript)” stage.

debug log file attached.
Logs:


meharu@meharu-X3V3:~/htmenpm-debug.csv (2.9 KB)

htmengine-node-client@1.0.0 start /home/meharu/htmengine-traffic-tutorial/node-client
node index.js

TrafficPusher starting…
Creating model 1…
Creating model 2…
Creating model 3…
Creating model 4…
Creating model 106…

Creating model 451…
Creating model 453…
/home/meharu/htmengine-traffic-tutorial/node-client/index.js:68
pathDetails[id].id = id;
^

TypeError: Cannot set property ‘id’ of null
at /home/meharu/htmengine-traffic-tutorial/node-client/index.js:68:28
at arrayEach (/home/meharu/htmengine-traffic-tutorial/node-client/node_modules/lodash/index.js:1289:13)
at Function. (/home/meharu/htmengine-traffic-tutorial/node-client/node_modules/lodash/index.js:3345:13)
at /home/meharu/htmengine-traffic-tutorial/node-client/index.js:66:7
at /home/meharu/htmengine-traffic-tutorial/node-client/lib/traffic-pusher.js:74:9
at Request._callback (/home/meharu/htmengine-traffic-tutorial/node-client/lib/traffic-data-client.js:31:9)
at Request.self.callback (/home/meharu/htmengine-traffic-tutorial/node-client/node_modules/request/request.js:186:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (/home/meharu/htmengine-traffic-tutorial/node-client/node_modules/request/request.js:1081:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage. (/home/meharu/htmengine-traffic-tutorial/node-client/node_modules/request/request.js:1001:12)
at IncomingMessage.g (events.js:291:16)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)

npm ERR! Linux 4.4.0-57-generic
npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “start”
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! htmengine-node-client@1.0.0 start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the htmengine-node-client@1.0.0 start script ‘node index.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the htmengine-node-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs htmengine-node-client
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls htmengine-node-client
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/meharu/htmengine-traffic-tutorial/node-client/npm-debug.log

See https://github.com/htm-community/skeleton-htmengine-app/pull/14

Hi,
I update the database using the files provided, however I’m still facing the same error.


log:
npm ERR! Linux 4.4.0-57-generic
npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” "start"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! htmengine-node-client@1.0.0 start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the htmengine-node-client@1.0.0 start script ‘node index.js’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the htmengine-node-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs htmengine-node-client
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls htmengine-node-client
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/meharu/htmengine-traffic-tutorial/node-client/npm-debug.log


mysql> describe metric_data;
±----------------------------±------------±-----±----±--------±------+
| Field | Type | Null | Key | Default | Extra |
±----------------------------±------------±-----±----±--------±------+
| uid | varchar(40) | NO | PRI | | |
| rowid | int(11) | NO | PRI | 0 | |
| timestamp | datetime | NO | MUL | NULL | |
| metric_value | double | NO | | NULL | |
| raw_anomaly_score | double | YES | | NULL | |
| anomaly_score | double | YES | MUL | NULL | |
| display_value | int(11) | YES | | NULL | |
| multi_step_best_predictions | text | YES | | NULL | |
±----------------------------±------------±-----±----±--------±------+
8 rows in set (0.01 sec)

Can you run a web browser debugger and inspect the JSON being passed from the server?

After starting HTM HTTP Server (Python), I’m getting “Internal Server Error” when accessing to localhost:8080.
So, I cannot debug whether JSON is being passed or not.

Here’s the log:

Traceback (most recent call last):
  File "/home/meharu/.local/lib/python2.7/site-packages/gevent/pywsgi.py", line 884, in handle_one_response
    self.run_application()
  File "/home/meharu/.local/lib/python2.7/site-packages/gevent/pywsgi.py", line 871, in run_application
    self.process_result()
  File "/home/meharu/.local/lib/python2.7/site-packages/gevent/pywsgi.py", line 860, in process_result
    for data in self.result:
  File "webapp.py", line 107, in handler
    schema.metric.c.uid])
  File "/home/meharu/numenta-apps/htmengine/htmengine/repository/queries.py", line 436, in getCustomMetricByName
    raise ObjectNotFoundError("Custom metric not found for name=%s" % name)
ObjectNotFoundError: Custom metric not found for name=/
{'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch, br',
 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',
 'HTTP_CACHE_CONTROL': 'max-age=0',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_HOST': 'localhost:8080',
 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
 'PATH_INFO': '/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_PORT': '42996',
 'REQUEST_METHOD': 'GET',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'meharu-X3V3',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'gevent/1.1 Python/2.7',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fa9548d41e0>,
 'wsgi.input': <gevent.pywsgi.Input object at 0x7fa939e0b328>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)} failed with ObjectNotFoundError

127.0.0.1 - - [2017-01-06 16:20:52] "GET / HTTP/1.1" 500 161 0.013152
Traceback (most recent call last):
  File "/home/meharu/.local/lib/python2.7/site-packages/gevent/pywsgi.py", line 884, in handle_one_response
    self.run_application()
  File "/home/meharu/.local/lib/python2.7/site-packages/gevent/pywsgi.py", line 871, in run_application
    self.process_result()
  File "/home/meharu/.local/lib/python2.7/site-packages/gevent/pywsgi.py", line 860, in process_result
    for data in self.result:
  File "webapp.py", line 107, in handler
    schema.metric.c.uid])
  File "/home/meharu/numenta-apps/htmengine/htmengine/repository/queries.py", line 436, in getCustomMetricByName
    raise ObjectNotFoundError("Custom metric not found for name=%s" % name)
ObjectNotFoundError: Custom metric not found for name=/favicon.ico
{'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'image/webp,image/*,*/*;q=0.8',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch, br',
 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',
 'HTTP_CONNECTION': 'keep-alive',
 'HTTP_HOST': 'localhost:8080',
 'HTTP_REFERER': 'http://localhost:8080/',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36',
 'PATH_INFO': '/favicon.ico',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '127.0.0.1',
 'REMOTE_PORT': '42998',
 'REQUEST_METHOD': 'GET',
 'SCRIPT_NAME': '',
 'SERVER_NAME': 'meharu-X3V3',
 'SERVER_PORT': '8080',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SOFTWARE': 'gevent/1.1 Python/2.7',
 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fa9548d41e0>,
 'wsgi.input': <gevent.pywsgi.Input object at 0x7fa939e0ba10>,
 'wsgi.multiprocess': False,
 'wsgi.multithread': False,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)} failed with ObjectNotFoundError

127.0.0.1 - - [2017-01-06 16:20:52] "GET /favicon.ico HTTP/1.1" 500 161 0.001962

So did the database migration step work for you this time? If you are past “6. Apply database migration”?

The error you pasted above is a red herring. It is just because you are hitting the HTM Engine HTTP interface with a web browser, but the HTM Engine doesn’t serve web pages. It just needs to be up and running so the Node.js client can interface with it.

So start up the Python Htm HTTP Server in python again, but don’t go there with a web browser. Now start the Node.js web client and let me know if you can tell what problem is occurring between it and the python server using a web inspector.

Ah, sorry for confusing you with the title of the topic.
For the problem regarding step “Apply database migration”, I was able to proceed by downgrading MySQL to version 5.6.

The current problem I am facing now is step: “Start HTM Client (JavaScript)”. After running command “npm start” I’m facing the above error.

And to your question whether I can tell what problem is occurring between web client and python server using web inspector, i don’t know how to check about that. appreciate your guidance on this

After running that command, you’ll have two servers running:

The error you pasted above looks like you pointed your web browser to the HTM Engine on port 8080, which you should not do. The client server will interface with the HTM Engine. When you run npm start, are there any errors in the console output?

I don’t think Node.js client web server on http://localhost:8083 is running, since after running command “npm start” i’m facing this error:

console output after running command:

meharu@meharu-X3V3:~/htmengine-traffic-tutorial/node-client$ npm start

> htmengine-node-client@1.0.0 start /home/meharu/htmengine-traffic-tutorial/node-client
> node index.js

TrafficPusher starting...
Creating model 1...
Creating model 2...
Creating model 3...
Creating model 4...
Creating model 106...
Creating model 107...
Creating model 108...
Creating model 110...
Creating model 119...
Creating model 122...
Creating model 123...
Creating model 124...
Creating model 126...
Creating model 129...
Creating model 137...
Creating model 140...
Creating model 141...
Creating model 142...
Creating model 145...
Creating model 148...
Creating model 149...
Creating model 150...
Creating model 153...
Creating model 154...
Creating model 155...
Creating model 157...
Creating model 159...
Creating model 160...
Creating model 164...
Creating model 165...
Creating model 167...
Creating model 168...
Creating model 169...
Creating model 170...
Creating model 171...
Creating model 172...
Creating model 177...
Creating model 178...
Creating model 184...
Creating model 185...
Creating model 186...
Creating model 190...
Creating model 191...
Creating model 195...
Creating model 199...
Creating model 202...
Creating model 204...
Creating model 205...
Creating model 206...
Creating model 207...
Creating model 208...
Creating model 211...
Creating model 212...
Creating model 213...
Creating model 215...
Creating model 217...
Creating model 221...
Creating model 222...
Creating model 223...
Creating model 224...
Creating model 225...
Creating model 257...
Creating model 258...
Creating model 259...
Creating model 261...
Creating model 262...
Creating model 263...
Creating model 264...
Creating model 265...
Creating model 295...
Creating model 298...
Creating model 311...
Creating model 313...
Creating model 315...
Creating model 316...
Creating model 318...
Creating model 319...
Creating model 324...
Creating model 325...
Creating model 329...
Creating model 330...
Creating model 331...
Creating model 332...
Creating model 338...
Creating model 339...
Creating model 344...
Creating model 345...
Creating model 347...
Creating model 349...
Creating model 350...
Creating model 351...
Creating model 354...
Creating model 364...
Creating model 365...
Creating model 369...
Creating model 375...
Creating model 376...
Creating model 377...
Creating model 378...
Creating model 379...
Creating model 380...
Creating model 381...
Creating model 382...
Creating model 383...
Creating model 384...
Creating model 385...
Creating model 387...
Creating model 388...
Creating model 389...
Creating model 390...
Creating model 394...
Creating model 395...
Creating model 398...
Creating model 399...
Creating model 402...
Creating model 405...
Creating model 406...
Creating model 410...
Creating model 411...
Creating model 412...
Creating model 413...
Creating model 416...
Creating model 417...
Creating model 418...
Creating model 419...
Creating model 422...
Creating model 423...
Creating model 424...
Creating model 425...
Creating model 426...
Creating model 427...
Creating model 428...
Creating model 430...
Creating model 431...
Creating model 432...
Creating model 433...
Creating model 434...
Creating model 435...
Creating model 436...
Creating model 437...
Creating model 439...
Creating model 440...
Creating model 441...
Creating model 442...
Creating model 443...
Creating model 444...
Creating model 445...
Creating model 446...
Creating model 447...
Creating model 448...
Creating model 450...
Creating model 451...
Creating model 453...
/home/meharu/htmengine-traffic-tutorial/node-client/index.js:68
        pathDetails[id].id = id;
                           ^

TypeError: Cannot set property 'id' of null
    at /home/meharu/htmengine-traffic-tutorial/node-client/index.js:68:28
    at arrayEach (/home/meharu/htmengine-traffic-tutorial/node-client/node_modules/lodash/index.js:1289:13)
    at Function.<anonymous> (/home/meharu/htmengine-traffic-tutorial/node-client/node_modules/lodash/index.js:3345:13)
    at /home/meharu/htmengine-traffic-tutorial/node-client/index.js:66:7
    at /home/meharu/htmengine-traffic-tutorial/node-client/lib/traffic-pusher.js:74:9
    at Request._callback (/home/meharu/htmengine-traffic-tutorial/node-client/lib/traffic-data-client.js:31:9)
    at Request.self.callback (/home/meharu/htmengine-traffic-tutorial/node-client/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (/home/meharu/htmengine-traffic-tutorial/node-client/node_modules/request/request.js:1081:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (/home/meharu/htmengine-traffic-tutorial/node-client/node_modules/request/request.js:1001:12)
    at IncomingMessage.g (events.js:291:16)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)

npm ERR! Linux 4.4.0-57-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! htmengine-node-client@1.0.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the htmengine-node-client@1.0.0 start script 'node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the htmengine-node-client package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs htmengine-node-client
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls htmengine-node-client
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/meharu/htmengine-traffic-tutorial/node-client/npm-debug.log
meharu@meharu-X3V3:~/htmengine-traffic-tutorial/node-client$

Ok, I’m not very sure the data coming from RiverView is up-to-date anymore. But you can add a null-check in the node-client code here:

Replace with:

if (pathDetails[id]) {
    pathDetails[id].id = id;
    allPathDetails.push(pathDetails[id]);
}

8 posts were split to a new topic: RiverView traffic tutorial problem

This “Htmengine-traffic-tutorial database migration” started off as a database migration problem and has morphed into a a RiverView issues, making it hard to get primed on the current state of things - one has to read a bunch of no-longer-relevant detail to get to the current problem. I recommend branching it into a new topic that deals with the current problem at hand. Perhaps something along the lines of “RiverView-traffic-tutorial problem”?

Thanks @vkruglikov, I have moved the posts regarding the RV problem to another thread.