Conversation
…ompile), and erroring out
|
Any idea if applying this PR to an existing Raspbian Lite and then running "./iiab-install --reinstall" might have a shot? Aside: Is it premature to test that on Ubuntu 18.04 too? (Obviously a clean install of IIAB is always best, regardless of either OS above, or others!) |
|
On Tue, May 22, 2018 at 9:24 PM, A Holt ***@***.***> wrote:
Any idea if applying this PR to an existing Raspbian Lite and then running
"./iiab-install --reinstall" might have a shot?
I have not tested upgrade. But I did add a clause which might make the
upgrade more automatic.
Aside: Is it premature to test that on Ubuntu 18.04 too?
Give it a shot!
… *(Obviously a clean install of IIAB is always best, regardless of either
OS above, or others!)*
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#814 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB04HG4_1yKX3lXVe3s1dLk-hqYUiSB-ks5t1OSOgaJpZM4UJljI>
.
|
|
I ran the following on IIAB 6.5/master on U18/Desktop: (10.8.0.10) This completed without error. How should I test?
@georgejhunt can you log in (10.8.0.10) to confirm things are as they should be? |
|
PS i have a U18/Server machine (Ubuntu 18.04/Server @ 10.8.0.26) that can be tested later today if that's also helpful? |
|
There was a typo that did not make it into the final smoke test. It turns
out that if a client has logged in once, it remembers the login, activities
visited (colored), and does not attempt a login (probably stored in
cookies) -- so my smoke test was invalid.
I need to reboot 10.8.0.10. I do not think that an upgrade is possible
without a reboot (this machine has been up for 5 days).
There may be additional problems, which will surface after the reboot.
During the mongodb install, there is a preallocation of 301MB in
/var/lib/mongodb, which we never use because we put the files in
/library/dbdata/ -- there may be some fine tuning possible to prevent this
first prealloction
…On Wed, May 23, 2018 at 10:10 AM, A Holt ***@***.***> wrote:
PS i have a U18/Server machine (Ubuntu 18.04/Server @ 10.8.0.26) that can
be tested later today if that's also helpful?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#814 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB04HJhBiXPEW4K1h_zxqGrcl_QyQCZ9ks5t1ZfogaJpZM4UJljI>
.
|
Feel free, Thanks! |
|
I am having a difficult time reqlicating the failure Adam has on his
ugraded machine, with my own install from scratch.
I deleted the mongodb files on both his and mine, and deleted the cookies
on my browser in each test. I was able to log in on my machine, and got the
following error when running the server from the command line on Adam's
machine (when clicking "done" on the log in)
GET /icons/entry-cancel.svg 304 1.095 ms - -
GET /fonts/NotoEmoji.woff 304 1.039 ms - -
TypeError: Cannot read property 'find' of undefined
at /opt/iiab/sugarizer-server-1.0/api/controller/users.js:237:14
at Db.collection
(/opt/iiab/sugarizer-server-1.0/node_modules/mongodb/lib/mongodb/db.js:526:27)
at Object.exports.getAllUsers
(/opt/iiab/sugarizer-server-1.0/api/controller/users.js:234:5)
at Object.exports.addUser
(/opt/iiab/sugarizer-server-1.0/api/controller/users.js:396:10)
at exports.signup
(/opt/iiab/sugarizer-server-1.0/api/controller/auth.js:150:8)
at callbacks
(/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/router/index.js:164:37)
at param
(/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/router/index.js:138:11)
at pass
(/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch
(/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/router/index.js:173:5)
at Object.router [as handle]
(/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/router/index.js:33:10)
POST /auth/signup/?0.41181664564493636 500 6.476 ms - 1135
The error appears to be at line 237 of api/controlers/users.js:
//get all users
exports.getAllUsers = function(query, options, callback) {
//get data
db.collection(usersCollection, function(err, collection) {
//get users
collection.find(query, function(err, users) { <line 237>
//skip sort limit
there are some collections in the database
drwxr-xr-x 4 mongodb root 4096 May 23 19:32 ./
drwxr-xr-x 4 www-data root 4096 May 23 13:00 ../
-rw------- 1 mongodb mongodb 16384 May 23 19:31
collection-0--5831777489380373074.wt
-rw------- 1 mongodb mongodb 32768 May 23 19:32
collection-2--5831777489380373074.wt
-rw------- 1 mongodb mongodb 4096 May 23 19:31
collection-4--5831777489380373074.wt
drwx------ 2 mongodb mongodb 4096 May 23 19:39 diagnostic.data/
-rw------- 1 mongodb mongodb 16384 May 23 19:31
index-1--5831777489380373074.wt
-rw------- 1 mongodb mongodb 32768 May 23 19:32
index-3--5831777489380373074.wt
…On Wed, May 23, 2018 at 2:58 PM, A Holt ***@***.***> wrote:
I need to reboot 10.8.0.10
Feel free, Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#814 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB04HDXgaF38VgKyTYm3az2iI4c1RpLZks5t1dt_gaJpZM4UJljI>
.
|
|
I wonder if not being able to read the collection might not just represent
not being able to connect to the database. I verified that port 27018 was
open via "netstat -nat". Is there an alert to provide user feedback if the
database is not available?
…On Wed, May 23, 2018 at 4:45 PM, George Hunt ***@***.***> wrote:
I am having a difficult time reqlicating the failure Adam has on his
ugraded machine, with my own install from scratch.
I deleted the mongodb files on both his and mine, and deleted the cookies
on my browser in each test. I was able to log in on my machine, and got the
following error when running the server from the command line on Adam's
machine (when clicking "done" on the log in)
GET /icons/entry-cancel.svg 304 1.095 ms - -
GET /fonts/NotoEmoji.woff 304 1.039 ms - -
TypeError: Cannot read property 'find' of undefined
at /opt/iiab/sugarizer-server-1.0/api/controller/users.js:237:14
at Db.collection (/opt/iiab/sugarizer-server-1.
0/node_modules/mongodb/lib/mongodb/db.js:526:27)
at Object.exports.getAllUsers (/opt/iiab/sugarizer-server-1.
0/api/controller/users.js:234:5)
at Object.exports.addUser (/opt/iiab/sugarizer-server-1.
0/api/controller/users.js:396:10)
at exports.signup (/opt/iiab/sugarizer-server-1.
0/api/controller/auth.js:150:8)
at callbacks (/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/
router/index.js:164:37)
at param (/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/
router/index.js:138:11)
at pass (/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/
router/index.js:145:5)
at Router._dispatch (/opt/iiab/sugarizer-server-1.
0/node_modules/express/lib/router/index.js:173:5)
at Object.router [as handle] (/opt/iiab/sugarizer-server-1.
0/node_modules/express/lib/router/index.js:33:10)
POST /auth/signup/?0.41181664564493636 500 6.476 ms - 1135
The error appears to be at line 237 of api/controlers/users.js:
//get all users
exports.getAllUsers = function(query, options, callback) {
//get data
db.collection(usersCollection, function(err, collection) {
//get users
collection.find(query, function(err, users) { <line 237>
//skip sort limit
there are some collections in the database
drwxr-xr-x 4 mongodb root 4096 May 23 19:32 ./
drwxr-xr-x 4 www-data root 4096 May 23 13:00 ../
-rw------- 1 mongodb mongodb 16384 May 23 19:31 collection-0--
5831777489380373074.wt
-rw------- 1 mongodb mongodb 32768 May 23 19:32 collection-2--
5831777489380373074.wt
-rw------- 1 mongodb mongodb 4096 May 23 19:31 collection-4--
5831777489380373074.wt
drwx------ 2 mongodb mongodb 4096 May 23 19:39 diagnostic.data/
-rw------- 1 mongodb mongodb 16384 May 23 19:31
index-1--5831777489380373074.wt
-rw------- 1 mongodb mongodb 32768 May 23 19:32
index-3--5831777489380373074.wt
On Wed, May 23, 2018 at 2:58 PM, A Holt ***@***.***> wrote:
> I need to reboot 10.8.0.10
>
> Feel free, Thanks!
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#814 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AB04HDXgaF38VgKyTYm3az2iI4c1RpLZks5t1dt_gaJpZM4UJljI>
> .
>
|
|
Thx @georgejhunt for your tremendous progress! @llaske do you have ideas on some of the MongoDB & api/controlers/users.js issues George is facing on-ticket above? |
|
I've reproduced the issue on my Sugarizer testing environment. You could test it by launch the mongo interactive command line:
|
|
Thanks Lionel, that information helps.
…On Thu, May 24, 2018 at 2:56 AM, Lionel LASKE ***@***.***> wrote:
I've reproduced the issue on my Sugarizer testing environment.
This error happens when MongoDB is not running or not reachable from the
server.
Are you sure your MongoDB services is running ?
You could test it by launch the mongo interactive command line:
mongo --port 27018
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#814 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB04HE2MvGtg9_W1zmK0u4F0GcqonZwRks5t1oPXgaJpZM4UJljI>
.
|
|
But it is a little confusing, since there are many connections to port
27018 that have been established:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:8008 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:1705 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:27018 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5939 0.0.0.0:* LISTEN
tcp 0 0 10.8.0.10:53 0.0.0.0:* LISTEN
tcp 0 0 192.168.0.121:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:27018 127.0.0.1:60498
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60500
ESTABLISHED
tcp 0 0 127.0.0.1:60506 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60486
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60480
ESTABLISHED
tcp 0 0 127.0.0.1:60496 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:60494 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60490
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60502
ESTABLISHED
tcp 0 0 127.0.0.1:60504 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:60486 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60494
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60492
ESTABLISHED
tcp 0 0 127.0.0.1:60500 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:60498 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60484
ESTABLISHED
tcp 0 0 127.0.0.1:60482 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:60502 127.0.0.1:27018
ESTABLISHED
tcp 0 0 192.168.0.121:45028 162.220.221.4:5938
ESTABLISHED
tcp 0 0 127.0.0.1:60492 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60506
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60504
ESTABLISHED
tcp 0 0 127.0.0.1:60484 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60482
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60488
ESTABLISHED
tcp 0 0 127.0.0.1:60480 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:60488 127.0.0.1:27018
ESTABLISHED
tcp 0 36 10.8.0.10:22 10.8.0.62:50428
ESTABLISHED
tcp 0 0 127.0.0.1:60478 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60478
ESTABLISHED
tcp 0 0 192.168.0.121:22 192.168.0.111:62207
ESTABLISHED
tcp 0 0 127.0.0.1:60490 127.0.0.1:27018
ESTABLISHED
tcp 0 0 127.0.0.1:27018 127.0.0.1:60496
ESTABLISHED
tcp6 0 0 :::8039 :::* LISTEN
tcp6 0 0 :::1705 :::* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 :::4949 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::631 :::* LISTEN
tcp6 0 0 :::8089 :::* LISTEN
tcp6 0 0 :::443 :::* LISTEN
And the netstat -np shows that both mongod, and node have reciprocal
connections to one another:
root@box:/home/iiab-admin# netstat -np|grep 27018
tcp 0 0 127.0.0.1:27018 127.0.0.1:60498
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:27018 127.0.0.1:60500
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:60506 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:27018 127.0.0.1:60486
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:27018 127.0.0.1:60480
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:60496 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:60494 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:27018 127.0.0.1:60490
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:27018 127.0.0.1:60502
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:60504 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:60486 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:27018 127.0.0.1:60494
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:27018 127.0.0.1:60492
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:60500 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:60498 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:27018 127.0.0.1:60484
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:60482 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:60502 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:60492 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:27018 127.0.0.1:60506
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:27018 127.0.0.1:60504
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:60484 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:27018 127.0.0.1:60482
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:27018 127.0.0.1:60488
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:60480 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:60488 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:60478 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:27018 127.0.0.1:60478
ESTABLISHED 19874/mongod
tcp 0 0 127.0.0.1:60490 127.0.0.1:27018
ESTABLISHED 19908/node
tcp 0 0 127.0.0.1:27018 127.0.0.1:60496
ESTABLISHED 19874/mongod
root@box:/home/iiab-admin#
So I do not know what other information would help track this down
node and mongodb are both running. The systemd unit files for each are as
follows:
[Unit]
Description=Node.js Sugarizer Server
Requires=mongodb.service
After=mongodb.service # Requires the mongodb service to run first
[Service]
WorkingDirectory=/opt/iiab/sugarizer-server/
ExecStart=/usr/bin/node /opt/iiab/sugarizer-server/sugarizer.js
Type=simple
Restart=always
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=sugarizer
#User=<alternate user>
#Group=<alternate group>
#Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target
[Unit]
Description=High-performance, schema-free document-oriented database
After=syslog.target network.target
[Service]
Type=forking
User=mongodb
Group=mongodb
PIDFile=/var/run/mongodb/mongod.pid
#EnvironmentFile=/etc/sysconfig/mongodb
ExecStart=/usr/bin/mongod --fork -f /etc/mongod.conf
[Install]
WantedBy=multi-user.target
The traceback of the error when I run node from the command line is still:
TypeError: Cannot read property 'find' of undefined
at /opt/iiab/sugarizer-server-1.0/api/controller/users.js:237:14
at Db.collection
(/opt/iiab/sugarizer-server-1.0/node_modules/mongodb/lib/mongodb/db.js:526:27)
at Object.exports.getAllUsers
(/opt/iiab/sugarizer-server-1.0/api/controller/users.js:234:5)
at Object.exports.addUser
(/opt/iiab/sugarizer-server-1.0/api/controller/users.js:396:10)
at exports.signup
(/opt/iiab/sugarizer-server-1.0/api/controller/auth.js:150:8)
at callbacks
(/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/router/index.js:164:37)
at param
(/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/router/index.js:138:11)
at pass
(/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/router/index.js:145:5)
at Router._dispatch
(/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/router/index.js:173:5)
at Object.router [as handle]
(/opt/iiab/sugarizer-server-1.0/node_modules/express/lib/router/index.js:33:10)
POST /auth/signup/?0.681723046420609 500 6.538 ms - 1135
…On Thu, May 24, 2018 at 5:25 PM, George Hunt ***@***.***> wrote:
Thanks Lionel, that information helps.
On Thu, May 24, 2018 at 2:56 AM, Lionel LASKE ***@***.***>
wrote:
> I've reproduced the issue on my Sugarizer testing environment.
> This error happens when MongoDB is not running or not reachable from the
> server.
> Are you sure your MongoDB services is running ?
>
> You could test it by launch the mongo interactive command line:
>
> mongo --port 27018
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#814 (comment)>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AB04HE2MvGtg9_W1zmK0u4F0GcqonZwRks5t1oPXgaJpZM4UJljI>
> .
>
|
|
Hmmm. Strange. Could you launch in one another terminal the mongo command line to check if mongo is really listening:
Should answer something like that: Also I've seen the line:
It don't mention the port 27018. I expected something like:
But may be port settings is mentioned in the mongod.conf. Could you check? |
|
Ooohh, interesting. So it means than Sugarizer can't connect to the MongoDB database :-( Not sure to understand which process open 820 connections to MongoDB ? |
|
I'm not sure why you are assuming that sugarizer cannot connect to mongodb.
The followiing is the tail of the log after starting mongod, and waiting
for 10 minutes, but not starting sugarizer-server.
2018-05-29T15:43:43.649+0000 I STORAGE [initandlisten] WiredTiger message
[1527608623:649144][19346:0x7fcb54451f80], txn-recover: Main recovery loop:
starting at 7/7424
2018-05-29T15:43:43.767+0000 I STORAGE [initandlisten] WiredTiger message
[1527608623:767136][19346:0x7fcb54451f80], txn-recover: Recovering log 7
through 8
2018-05-29T15:43:43.876+0000 I STORAGE [initandlisten] WiredTiger message
[1527608623:876022][19346:0x7fcb54451f80], txn-recover: Recovering log 8
through 8
2018-05-29T15:43:44.357+0000 W STORAGE [initandlisten] Detected
configuration for non-active storage engine mmapv1 when current storage
engine is wiredTiger
2018-05-29T15:43:44.357+0000 I CONTROL [initandlisten]
2018-05-29T15:43:44.357+0000 I CONTROL [initandlisten] ** WARNING: Access
control is not enabled for the database.
2018-05-29T15:43:44.357+0000 I CONTROL [initandlisten] ** Read
and write access to data and configuration is unrestricted.
2018-05-29T15:43:44.357+0000 I CONTROL [initandlisten] ** WARNING: You are
running this process as the root user, which is not recommended.
2018-05-29T15:43:44.357+0000 I CONTROL [initandlisten]
2018-05-29T15:43:44.376+0000 I FTDC [initandlisten] Initializing
full-time diagnostic data capture with directory
'/library/dbdata/mongodb/diagnostic.data'
2018-05-29T15:43:44.377+0000 I NETWORK [initandlisten] waiting for
connections on port 27018
And after I start sugarizer-server ( and wait for 10 minutes), the tail of
the mongod.log file is:
2018-05-29T16:00:23.272+0000 I NETWORK [conn878] end connection
127.0.0.1:45238 (816 connections now open)
2018-05-29T16:00:23.272+0000 I NETWORK [conn879] end connection
127.0.0.1:45240 (815 connections now open)
2018-05-29T16:00:24.270+0000 I NETWORK [listener] connection accepted from
127.0.0.1:45244 #881 (816 connections now open)
2018-05-29T16:00:24.271+0000 I NETWORK [listener] connection accepted from
127.0.0.1:45246 #882 (817 connections now open)
2018-05-29T16:00:24.272+0000 I NETWORK [listener] connection accepted from
127.0.0.1:45248 #883 (818 connections now open)
2018-05-29T16:00:24.273+0000 I NETWORK [listener] connection accepted from
127.0.0.1:45250 #884 (819 connections now open)
2018-05-29T16:00:24.273+0000 I NETWORK [listener] connection refused
because too many open connections: 820
2018-05-29T16:00:24.274+0000 I NETWORK [conn881] end connection
127.0.0.1:45244 (818 connections now open)
2018-05-29T16:00:24.274+0000 I NETWORK [conn882] end connection
127.0.0.1:45246 (817 connections now open)
2018-05-29T16:00:24.274+0000 I NETWORK [conn883] end connection
127.0.0.1:45248 (816 connections now open)
2018-05-29T16:00:24.275+0000 I NETWORK [conn884] end connection
127.0.0.1:45250 (815 connections now open)
~
967,1
Bot
~
…On Tue, May 29, 2018 at 7:59 AM, Lionel LASKE ***@***.***> wrote:
Ooohh, interesting. So it means than Sugarizer can't connect to the
MongoDB database :-(
Stupid question: are you sure the port configured in the database section
of sugarizer.ini is the same than the one MongoDB is listening ?
Default port in sugarizer.ini is 27018 but default port for MongoDB is
often 27017.
Not sure to understand which process open 820 connections to MongoDB ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#814 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB04HP_I8QFQPa4FirxnWjukwWVW9lvpks5t3WI9gaJpZM4UJljI>
.
|
|
If you see continuously the message "Waiting for DB..." when starting node, it means that Sugarizer is unable to connect to MongoDB. It's why I'm assuming that something goes wrong on the connection between node and MongoDB. Just to eliminate an option, could you ensure than the |
|
This PR appears to be working on RPi
|
|
Yes, the problem is only on ubuntu 1804
…On Wed, May 30, 2018 at 8:27 AM, Jerry Vonau ***@***.***> wrote:
This PR appears to be working on RPi
***@***.***:/opt/iiab/iiab $ systemctl status mongodb
● mongodb.service - High-performance, schema-free document-oriented
database
Loaded: loaded (/etc/systemd/system/mongodb.service; enabled; vendor
preset:
Active: active (running) since Wed 2018-05-30 14:17:12 UTC; 1min 41s ago
Main PID: 589 (mongod)
CGroup: /system.slice/mongodb.service
└─589 /usr/bin/mongod -f /etc/mongod.conf
May 30 14:17:12 box.lan systemd[1]: Started High-performance, schema-free
docume
May 30 14:17:15 box.lan mongod[589]: note: noprealloc may hurt performance
in ma
May 30 14:17:15 box.lan mongod[589]: all output going to:
/var/log/mongodb/mongo
May 30 14:17:15 box.lan mongod[589]: log file
[/var/log/mongodb/mongod.log] exis
***@***.***:/opt/iiab/iiab $ cat /var/log/mongodb/mongod.log
Wed May 30 14:17:15.573 [initandlisten] MongoDB starting : pid=589
port=27018 dbpath=/library/dbdata/mongodb 32-bit host=box.lan
Wed May 30 14:17:15.574 [initandlisten]
Wed May 30 14:17:15.574 [initandlisten] ** NOTE: This is a 32 bit MongoDB
binary.
Wed May 30 14:17:15.574 [initandlisten] ** 32 bit builds are limited to
less than 2GB of data (or less with --journal).
Wed May 30 14:17:15.574 [initandlisten] ** See http://dochub.mongodb.org/
core/32bit
Wed May 30 14:17:15.574 [initandlisten]
Wed May 30 14:17:15.574 [initandlisten] db version v2.4.14
Wed May 30 14:17:15.574 [initandlisten] git version: nogitversion
Wed May 30 14:17:15.574 [initandlisten] build info: Linux bm-wb-03
3.19.0-trunk-armmp #1 <#1> SMP Debian
3.19.1-1~exp1+plugwash1 (2015-03-28) armv7l BOOST_LIB_VERSION=1_58
Wed May 30 14:17:15.574 [initandlisten] allocator: system
Wed May 30 14:17:15.575 [initandlisten] options: { bind_ip: "127.0.0.1",
config: "/etc/mongod.conf", dbpath: "/library/dbdata/mongodb", journal:
"true", logpath: "/var/log/mongodb/mongod.log", maxConns: 10000,
noprealloc: "true", port: 27018, smallfiles: "true" }
Wed May 30 14:17:15.734 [initandlisten] journal
dir=/library/dbdata/mongodb/journal
Wed May 30 14:17:15.734 [initandlisten] recover begin
Wed May 30 14:17:15.745 [initandlisten] recover lsn: 0
Wed May 30 14:17:15.745 [initandlisten] recover /library/dbdata/mongodb/
journal/j._0
Wed May 30 14:17:15.901 [initandlisten] recover cleaning up
Wed May 30 14:17:15.901 [initandlisten] removeJournalFiles
Wed May 30 14:17:15.975 [initandlisten] recover done
Wed May 30 14:17:15.976 [initandlisten] preallocating a journal file
/library/dbdata/mongodb/journal/prealloc.0
Wed May 30 14:17:46.931 [initandlisten] --maxConns too high, can only
handle 819
Wed May 30 14:17:46.932 [initandlisten] waiting for connections on port
27018
Wed May 30 14:17:46.932 [websvr] admin web console waiting for connections
on port 28018
Wed May 30 14:17:52.306 [initandlisten] connection accepted from
127.0.0.1:35722 #1 <#1> (1 connection
now open)
Wed May 30 14:17:52.307 [initandlisten] connection accepted from
127.0.0.1:35724 #2 <#2> (2 connections
now open)
Wed May 30 14:17:52.307 [initandlisten] connection accepted from
127.0.0.1:35726 #3 <#3> (3 connections
now open)
Wed May 30 14:17:52.431 [initandlisten] connection accepted from
127.0.0.1:35728 #4 <#4> (4 connections
now open)
Wed May 30 14:17:52.431 [initandlisten] connection accepted from
127.0.0.1:35730 #5 <#5> (5 connections
now open)
Wed May 30 14:17:52.431 [initandlisten] connection accepted from
127.0.0.1:35732 #6 <#6> (6 connections
now open)
Wed May 30 14:17:52.484 [initandlisten] connection accepted from
127.0.0.1:35734 #7 <#7> (7 connections
now open)
Wed May 30 14:17:52.485 [initandlisten] connection accepted from
127.0.0.1:35736 #8 <#8> (8 connections
now open)
Wed May 30 14:17:52.485 [initandlisten] connection accepted from
127.0.0.1:35738 #9 <#9> (9 connections
now open)
Wed May 30 14:17:52.534 [initandlisten] connection accepted from
127.0.0.1:35740 #10 <#10> (10
connections now open)
Wed May 30 14:17:52.542 [initandlisten] connection accepted from
127.0.0.1:35742 #11 <#11> (11
connections now open)
Wed May 30 14:17:52.543 [initandlisten] connection accepted from
127.0.0.1:35744 #12 <#12> (12
connections now open)
Wed May 30 14:17:52.560 [initandlisten] connection accepted from
127.0.0.1:35746 #13 <#13> (13
connections now open)
Wed May 30 14:17:52.561 [initandlisten] connection accepted from
127.0.0.1:35748 #14 <#14> (14
connections now open)
Wed May 30 14:17:52.595 [initandlisten] connection accepted from
127.0.0.1:35750 #15 <#15> (15
connections now open)
systemctl status sugarizer -l
● sugarizer.service - Node.js Sugarizer Server
Loaded: loaded (/etc/systemd/system/sugarizer.service; enabled; vendor
preset: enabled)
Active: active (running) since Wed 2018-05-30 15:17:13 UTC; 3min 27s ago
Main PID: 583 (node)
CGroup: /system.slice/sugarizer.service
└─583 /usr/bin/node /opt/iiab/sugarizer-server/sugarizer.js
May 30 15:20:23 box.lan sugarizer[583]: at require
(internal/module.js:20:19)
May 30 15:20:23 box.lan sugarizer[583]: at Object.
(/opt/iiab/sugarizer-server-1.0/node_modules/mong
May 30 15:20:23 box.lan sugarizer[583]: at Module._compile
(module.js:577:32)
May 30 15:20:23 box.lan sugarizer[583]: at Object.Module._extensions..js
(module.js:586:10)
May 30 15:20:23 box.lan sugarizer[583]: at Module.load (module.js:494:32)
May 30 15:20:23 box.lan sugarizer[583]: at tryModuleLoad (module.js:453:12)
May 30 15:20:23 box.lan sugarizer[583]: at Function.Module._load
(module.js:445:3) code: 'MODULE_NOT_FOUND' }
May 30 15:20:23 box.lan sugarizer[583]: js-bson: Failed to load c++ bson
extension, using pure JS version
May 30 15:20:26 box.lan sugarizer[583]: Sugarizer Server is listening on
port 8089...
May 30 15:20:26 box.lan sugarizer[583]: Presence Server is listening on
port 8039...
journalctl -u sugarizer -l
-- Logs begin at Thu 2016-11-03 17:16:43 UTC, end at Wed 2018-05-30
15:22:02 UTC. --
May 30 15:17:13 box.lan systemd[1]: Started Node.js Sugarizer Server.
May 30 15:20:23 box.lan sugarizer[583]: { Error: Cannot find module
'../build/Release/bson'
May 30 15:20:23 box.lan sugarizer[583]: at Function.Module._resolveFilename
(module.js:476:15)
May 30 15:20:23 box.lan sugarizer[583]: at Function.Module._load
(module.js:424:25)
May 30 15:20:23 box.lan sugarizer[583]: at Module.require
(module.js:504:17)
May 30 15:20:23 box.lan sugarizer[583]: at require
(internal/module.js:20:19)
May 30 15:20:23 box.lan sugarizer[583]: at Object.
(/opt/iiab/sugarizer-server-1.0/node_modules/mong
May 30 15:20:23 box.lan sugarizer[583]: at Module._compile
(module.js:577:32)
May 30 15:20:23 box.lan sugarizer[583]: at Object.Module._extensions..js
(module.js:586:10)
May 30 15:20:23 box.lan sugarizer[583]: at Module.load (module.js:494:32)
May 30 15:20:23 box.lan sugarizer[583]: at tryModuleLoad (module.js:453:12)
May 30 15:20:23 box.lan sugarizer[583]: at Function.Module._load
(module.js:445:3) code: 'MODULE_NOT_FOUND' }
May 30 15:20:23 box.lan sugarizer[583]: js-bson: Failed to load c++ bson
extension, using pure JS version
May 30 15:20:26 box.lan sugarizer[583]: Sugarizer Server is listening on
port 8089...
May 30 15:20:26 box.lan sugarizer[583]: Presence Server is listening on
port 8039...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#814 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB04HO7olLoHl9hwG-HYPvVan305yhmSks5t3rpMgaJpZM4UJljI>
.
|
|
Post-merge conclusions/observations on Raspbian Lite on Rpi 3 B+:
PS http://box:8089 does not work at all on Ubuntu 18.04 for now, which is a Known Issue that would require further help from @llaske |
|
CLARIF that our re-introduction of MongoDB (as Sugarizer 1.0 truly requires, unlike Sugarizer 0.9) appears to be causing ~768MB (typically 3 prealloc files) to reappear on RPi microSD cards — while unfortunate, this is not a surprise — much as in 2017 with #254: |
|
@llaske & @georgejhunt: A fresh install of Sugarizer 1.0 and IIAB 6.6/master on a clean Ubuntu 18.04/Server fails at http://box:8089 with this error every time: (on Sugarizer's "Click to change color" screen, right after trying to set a password as a "New user") FYI this occurs regardless of which IP address (LAN or VPN) is used in placed of in the URL. Attempting George's earlier trick to run "iiab-gen-iptables", then "cd /opt/iiab/iiab; ./iiab-network" and rebooting did not help in this case. What else can be tried? If it helps, these are the version numbers installed by Ubuntu 18.04/Server: |
Is it possible to see what happens on the server console when this error is displayed on the browser ? |
I don't know what you mean by server console but FYI
|
The 10 lines after "TypeError" (excerpt below, from above) indicate sugarizer-server appears to be failing in places (like) https://github.com/llaske/sugarizer-server/blob/v1.0/api/controller/users.js#L237 |
|
I've just deployed an Ubuntu 18.04 VM on my laptop and tried to run inside Sugarizer Server with node.js v8.10 and mongod v3.6.3. |
|
Just done a fix to upgrade to MongoDB driver 2.x: llaske/sugarizer-server@b90104d |
Will ask @georgejhunt how I can test this on IIAB. Thx Much @llaske Can you confirm this should also work with Raspbian's brand new (as of 48-72h ago, mandatory when you "apt update" etc) Node.js 8.11 ? Against Raspbian's pre-existing MongoDB 2.4.14 — as earlier outlined by @georgejhunt at #798 (comment) and reconfirmed here: |
I did not touch the original Sugarizer 1.0 "client not server" directory /opt/iiab/sugarizer-1.0 (385MB). Aside: IIAB will add "waitdb = 1" to our sugarizer.ini template if that's wise, as @llaske added 2018-05-29 (llaske/sugarizer-server@0ec8bde).
|
|
I can confirm that this fix works too on Raspbian, I've updated my Sugarizer Schoolbox with this patch and it works. Just updated on try.sugarizer.org too. |
I just ran the above (this is Raspbian Lite on RPi 3 B+, fully updated with "apt update; apt -y dist-upgrade"). Unfortunately the result is the same: "systemctl restart sugarizer" consistently fails 2 seconds later, with both |
|
The above did not work...until I first upgraded npm 1.4.21 to npm 5.6.0 as follows:
This above is likely not the best way (this also upgraded Node.js 8.11.1 to 8.11.3; let's try to conform to the OS's recommended packages wherever possible!) but as a proof-of-concept the above Worked 100% (Sugarizer 1.0 logins work at http://box:8089). |
Description of changes proposed in this pull request.
This PR upgrades to the most recent sugarizer [implementing #798]
Smoke-tested in operating system.
2018-04-18 stretch lite.
Known issues: the proxy from apache /sugarizer to localhost:8089 does not work. But then the kiwix, and kalite proxies do not work either. I remember that I had them working once. But I've lost the magic sauce.
Tim's menu system goes directly to the desired port, so maybe it does not matter.