Bumbershoot Posted October 29, 2019 Posted October 29, 2019 2 hours ago, bpwwer said: db.nodeservers.remove({'name': 'SolarEdge'}) The full syntax at the command line might be this: mongo polyglot --eval "db.nodeservers.remove({'name': 'DarkSky'})" and: mongo polyglot --eval "db.nodeservers.remove({'name': 'SolarEdge'})" Worked for me... Additionally, the update/upgrade process worked just fine here. I'm up on the latest and greatest Polyglot, among other things: [admin@polisy ~]$ sudo pkg update && sudo pkg upgrade We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. Password: Updating udi repository catalogue... pkg: Repository udi has a wrong packagesite, need to re-create database Fetching meta.txz: 100% 820 B 0.8kB/s 00:01 Fetching packagesite.txz: 100% 45 KiB 45.9kB/s 00:01 Processing entries: 100% udi repository update completed. 156 packages processed. All repositories are up to date. Updating udi repository catalogue... udi repository is up to date. All repositories are up to date. Checking for upgrades (9 candidates): 100% Processing candidates (9 candidates): 100% The following 9 package(s) will be affected (of 0 checked): Installed packages to be UPGRADED: sudo: 1.8.27_1 -> 1.8.28p1 python37: 3.7.4 -> 3.7.5 python27: 2.7.16_1 -> 2.7.17 py37-setuptools: 41.2.0 -> 41.4.0 polyglot: 2.2.1_2 -> 2.2.4_2 pciids: 20190725 -> 20191012 isc-dhcp44-client: 4.4.1 -> 4.4.1_1 ca_root_nss: 3.46.1 -> 3.47 boost-libs: 1.71.0_1 -> 1.71.0_2 Number of packages to be upgraded: 9 The process will require 16 MiB more space. 59 MiB to be downloaded. Proceed with this action? [y/N]: y [1/9] Fetching sudo-1.8.28p1.txz: 100% 675 KiB 690.9kB/s 00:01 [2/9] Fetching python37-3.7.5.txz: 100% 16 MiB 16.6MB/s 00:01 [3/9] Fetching python27-2.7.17.txz: 100% 11 MiB 11.3MB/s 00:01 [4/9] Fetching py37-setuptools-41.4.0.txz: 100% 504 KiB 516.0kB/s 00:01 [5/9] Fetching polyglot-2.2.4_2.txz: 100% 17 MiB 9.1MB/s 00:02 [6/9] Fetching pciids-20191012.txz: 100% 206 KiB 211.1kB/s 00:01 [7/9] Fetching isc-dhcp44-client-4.4.1_1.txz: 100% 948 KiB 971.1kB/s 00:01 [8/9] Fetching ca_root_nss-3.47.txz: 100% 287 KiB 293.6kB/s 00:01 [9/9] Fetching boost-libs-1.71.0_2.txz: 100% 12 MiB 13.0MB/s 00:01 Checking integrity... done (0 conflicting) [1/9] Upgrading boost-libs from 1.71.0_1 to 1.71.0_2... [1/9] Extracting boost-libs-1.71.0_2: 100% [2/9] Upgrading python37 from 3.7.4 to 3.7.5... [2/9] Extracting python37-3.7.5: 100% [3/9] Upgrading sudo from 1.8.27_1 to 1.8.28p1... [3/9] Extracting sudo-1.8.28p1: 100% [4/9] Upgrading python27 from 2.7.16_1 to 2.7.17... [4/9] Extracting python27-2.7.17: 100% [5/9] Upgrading py37-setuptools from 41.2.0 to 41.4.0... [5/9] Extracting py37-setuptools-41.4.0: 100% [6/9] Upgrading polyglot from 2.2.1_2 to 2.2.4_2... ===> Creating groups. Using existing group 'polyglot'. ===> Creating users Using existing user 'polyglot'. [6/9] Extracting polyglot-2.2.4_2: 100% [7/9] Upgrading pciids from 20190725 to 20191012... [7/9] Extracting pciids-20191012: 100% [8/9] Upgrading isc-dhcp44-client from 4.4.1 to 4.4.1_1... [8/9] Extracting isc-dhcp44-client-4.4.1_1: 100% [9/9] Upgrading ca_root_nss from 3.46.1 to 3.47... [9/9] Extracting ca_root_nss-3.47: 100%
garybixler Posted October 29, 2019 Posted October 29, 2019 Bumbershoot Thanks that worked for me. Gary
Jimbo.Automates Posted October 29, 2019 Posted October 29, 2019 24 minutes ago, Bumbershoot said: The full syntax at the command line might be this: mongo polyglot --eval "db.nodeservers.remove({'name': 'DarkSky'})" and: mongo polyglot --eval "db.nodeservers.remove({'name': 'SolarEdge'})" What about "ISY Portal" in slot 1? Sorry if it was mentioned before, I just got back from traveling today and trying to catch up...
Bumbershoot Posted October 29, 2019 Posted October 29, 2019 7 minutes ago, Jimbo said: What about "ISY Portal" in slot 1? Sorry if it was mentioned before, I just got back from traveling today and trying to catch up... Sorry: mongo polyglot --eval "db.nodeservers.remove({'name': 'ISY Portal'})" 1
MWareman Posted October 29, 2019 Posted October 29, 2019 2 hours ago, Michel Kohanim said: Hi @Michael, I cannot reproduce. I even downloaded meta.txz using Windows after it succeeded on Polisy. Is it possible that you are using a proxy? With kind regards, Michel Bingo... My outbound proxy was being a bit overzealous - the SSL cert is using a wildcard SAN name. My proxy was blocking that.. [admin@polisy ~]$ true | openssl s_client -connect pkg.isy.io:443 | openssl x509 -noout -text | grep DNS: depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3 verify return:1 depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3 verify return:1 depth=0 CN = *.isy.io verify return:1 DONE DNS:*.isy.io I've bypassed the proxy for the PolISY for the time being (until I can figure out a better option). The update then worked just fine. Thank you! Michael.
MWareman Posted October 29, 2019 Posted October 29, 2019 Well - installing Polys is working now that Polyglot 2.2.4 is installed. Weatherflow and the WirelessTag polys. Weatherflow appears to be working - but WirelessTag is reporting the following: 2019-10-28 19:52:47,967 [MainThread] [INFO ] UDI Polyglot v2 Interface 2.0.31 Starting... 2019-10-28 19:52:48,830 [MainThread] [ERROR] Traceback (most recent call last): 2019-10-28 19:52:48,831 [MainThread] [ERROR] File "./wirelesstags-poly.py", line 8, in <module> 2019-10-28 19:52:48,832 [MainThread] [ERROR] from wt_nodes import wtController 2019-10-28 19:52:48,832 [MainThread] [ERROR] File "/var/polyglot/nodeservers/WirelessTag/wt_nodes/__init__.py", line 7, in <module> 2019-10-28 19:52:48,833 [MainThread] [ERROR] from .wTagManager import wTagManager 2019-10-28 19:52:48,834 [MainThread] [ERROR] File "/var/polyglot/nodeservers/WirelessTag/wt_nodes/wTagManager.py", line 10, in <module> 2019-10-28 19:52:48,834 [MainThread] [ERROR] from wtServer import wtSession 2019-10-28 19:52:48,835 [MainThread] [ERROR] File "/var/polyglot/nodeservers/WirelessTag/wtServer.py", line 11, in <module> 2019-10-28 19:52:48,836 [MainThread] [ERROR] import netifaces as ni 2019-10-28 19:52:48,836 [MainThread] [ERROR] ModuleNotFoundError 2019-10-28 19:52:48,837 [MainThread] [ERROR] : 2019-10-28 19:52:48,837 [MainThread] [ERROR] No module named 'netifaces' So - the Python module 'netifaces' is not present... Figured I' give pip3 a go: [admin@polisy ~]$ sudo pip3 install netifaces Password: Collecting netifaces Downloading https://files.pythonhosted.org/packages/0d/18/fd6e9c71a35b67a73160ec80a49da63d1eed2d2055054cc2995714949132/netifaces-0.10.9.tar.gz Installing collected packages: netifaces Running setup.py install for netifaces ... error ERROR: Complete output from command /usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-z68xnvz6/netifaces/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-l5ncxh2k/install-record.txt --single-version-externally-managed --compile: ERROR: running install running build running build_ext checking for getifaddrs...not found. checking for getnameinfo...not found. checking for socket IOCTLs...not found. checking for optional header files...none found. checking whether struct sockaddr has a length field...no. checking which sockaddr_xxx structs are defined...none! checking for routing socket support...no. checking for sysctl(CTL_NET...) support...no. checking for netlink support...no. building 'netifaces' extension cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -DNETIFACES_VERSION=0.10.9 -I/usr/local/include/python3.7m -c netifaces.c -o build/temp.freebsd-12.0-RELEASE-p10-amd64-3.7/netifaces.o unable to execute 'cc': No such file or directory error: command 'cc' failed with exit status 1 ---------------------------------------- ERROR: Command "/usr/local/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-z68xnvz6/netifaces/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-l5ncxh2k/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-z68xnvz6/netifaces/ Seems cc is not present... I guess I'd need to setup a cross-compilation environment. What should the process be to request dependent Python libraries?
MWareman Posted October 29, 2019 Posted October 29, 2019 Answered my own question: [admin@polisy ~]$ sudo pkg install py37-netifaces-0.10.9 Updating udi repository catalogue... udi repository is up to date. All repositories are up to date. The following 1 package(s) will be affected (of 0 checked): New packages to be INSTALLED: py37-netifaces: 0.10.9 Number of packages to be installed: 1 10 KiB to be downloaded. Proceed with this action? [y/N]: y [1/1] Fetching py37-netifaces-0.10.9.txz: 100% 10 KiB 10.4kB/s 00:01 Checking integrity... done (0 conflicting) [1/1] Installing py37-netifaces-0.10.9... [1/1] Extracting py37-netifaces-0.10.9: 100% Then the WirelessTag poly started just fine... You may need to have a method that dependencies can be resolved and installed automatically. Or - Poly authors should include dependency information in the Poly metadata and Polisy should install the dependencies when Poly's are installed from the store. 1
garybixler Posted October 29, 2019 Posted October 29, 2019 Thanks MWareman That got my tags working also. Gary 1
Jimbo.Automates Posted October 29, 2019 Posted October 29, 2019 2019-10-28 20:10:17 [polyglot] info: NSChild cloneRepo: Successfully cloned WirelessTag into NodeServer directory. 2019-10-28 20:10:55 [polyglot] error: NSChild: WirelessTag cloneRepo: Non-zero exit code: 128 2019-10-28 20:10:55 [polyglot] error: NSResponse: Success: false - cloneRepo: Non-zero exit code: 128 2019-10-28 20:11:25 [polyglot] error: NSChild: Install failed - Non-zero exit code: 1 2019-10-28 20:11:25 [polyglot] error: NSChild: WirelessTag cloneRepo: Error: runInstallProcess: undefined 2019-10-28 20:11:25 [polyglot] error: Error: runInstallProcess: undefined at runInstallProcess (/snapshot/polyglot-v2/lib/modules/children.js:45:11) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) 2019-10-28 20:11:25 [polyglot] error: NSResponse: Success: false - cloneRepo: Error: runInstallProcess: undefined Poly authors do include dependancies in the requirements.txt, which is used when install.sh is run, but my cloneRepo and runInstallProcess are failing.
MWareman Posted October 29, 2019 Posted October 29, 2019 Just now, Jimbo said: 2019-10-28 20:10:17 [polyglot] info: NSChild cloneRepo: Successfully cloned WirelessTag into NodeServer directory. 2019-10-28 20:10:55 [polyglot] error: NSChild: WirelessTag cloneRepo: Non-zero exit code: 128 2019-10-28 20:10:55 [polyglot] error: NSResponse: Success: false - cloneRepo: Non-zero exit code: 128 2019-10-28 20:11:25 [polyglot] error: NSChild: Install failed - Non-zero exit code: 1 2019-10-28 20:11:25 [polyglot] error: NSChild: WirelessTag cloneRepo: Error: runInstallProcess: undefined 2019-10-28 20:11:25 [polyglot] error: Error: runInstallProcess: undefined at runInstallProcess (/snapshot/polyglot-v2/lib/modules/children.js:45:11) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) 2019-10-28 20:11:25 [polyglot] error: NSResponse: Success: false - cloneRepo: Error: runInstallProcess: undefined Poly authors do include dependancies in the requirements.txt, which is used when install.sh is run, but my cloneRepo and runInstallProcess are failing. Good to know. I wonder if the current process is relying on a local compiler (not present on PolISY for obvious reasons!) - and the installation process needs instead to call the native package manager to install a binary version.
garybixler Posted October 29, 2019 Posted October 29, 2019 I just have one more issue with the Tesla Node. I get this while installing. 2019-10-28 20:17:02 [polyglot] info: NSChild cloneRepo: Successfully cloned Tesla into NodeServer directory. 2019-10-28 20:17:03 [polyglot] error: NSChild: Install failed - Non-zero exit code: 127 2019-10-28 20:17:03 [polyglot] error: NSChild: Tesla cloneRepo: Error: runInstallProcess: undefined 2019-10-28 20:17:03 [polyglot] error: Error: runInstallProcess: undefined at runInstallProcess (/snapshot/polyglot-v2/lib/modules/children.js:45:11) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) 2019-10-28 20:17:03 [polyglot] error: NSResponse: Success: false - cloneRepo: Error: runInstallProcess: undefine Thanks for any thoughts Gary
Jimbo.Automates Posted October 29, 2019 Posted October 29, 2019 1 minute ago, MWareman said: Good to know. I wonder if the current process is relying on a local compiler (not present on PolISY for obvious reasons!) - and the installation process needs instead to call the native package manager to install a binary version. Yes, that's the exact problem, I just manually ran it and get the compiler issue. So our installation processes needs a way to call the native package manager, but for now we can just call it in the install.sh when necessary. 1
Jimbo.Automates Posted October 29, 2019 Posted October 29, 2019 6 minutes ago, garybixler said: I just have one more issue with the Tesla Node. I get this while installing. 2019-10-28 20:17:02 [polyglot] info: NSChild cloneRepo: Successfully cloned Tesla into NodeServer directory. 2019-10-28 20:17:03 [polyglot] error: NSChild: Install failed - Non-zero exit code: 127 2019-10-28 20:17:03 [polyglot] error: NSChild: Tesla cloneRepo: Error: runInstallProcess: undefined 2019-10-28 20:17:03 [polyglot] error: Error: runInstallProcess: undefined at runInstallProcess (/snapshot/polyglot-v2/lib/modules/children.js:45:11) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) 2019-10-28 20:17:03 [polyglot] error: NSResponse: Success: false - cloneRepo: Error: runInstallProcess: undefine Thanks for any thoughts Gary Run the install.sh manually and see what it says.
MWareman Posted October 29, 2019 Posted October 29, 2019 Yes, that's the exact problem, I just manually ran it and get the compiler issue. So our installation processes needs a way to call the native package manager, but for now we can just call it in the install.sh when necessary. It’s why it’s called a geek batch!
garybixler Posted October 29, 2019 Posted October 29, 2019 Sounds like a terminal command. I have that up but don't know how to run install.sh Gary
MWareman Posted October 29, 2019 Posted October 29, 2019 (edited) Looking in /var/polyglot/nodeservers/Tesla/package.json, I see the following dependencies needed: "async-lock": "^1.1.4", "markdown": "^0.5.0", "polyinterface": "^1.2.3", "pgc_interface": "^1.0.3", "request": "^2.88.0", "request-promise-native": "^1.0.7" I'm not as familiar with node services - or their dependencies. However - the npm binary is nowhere to be found. So - this likely needs installing first: [admin@polisy /]# sudo pkg install npm-6.11.3 Updating udi repository catalogue... udi repository is up to date. All repositories are up to date. The following 4 package(s) will be affected (of 0 checked): New packages to be INSTALLED: npm: 6.11.3 node: 12.13.0 libuv: 1.33.1 gmake: 4.2.1_3 Number of packages to be installed: 4 Uninstall and re-install the Tesla poly then appeared to work... Now - if only someone would provide me a Tesla to test with... Edit: In all likelihood - this is going to be needed for most (all?) node based polys.... Edited October 29, 2019 by MWareman
Jimbo.Automates Posted October 29, 2019 Posted October 29, 2019 20 minutes ago, garybixler said: Sounds like a terminal command. I have that up but don't know how to run install.sh Gary cd ~polyglot/nodeservers/Tesla ./install.sh
garybixler Posted October 29, 2019 Posted October 29, 2019 Ok it appears after I reinstall it from the store
Jimbo.Automates Posted October 29, 2019 Posted October 29, 2019 Oh ya, Tesla is not python, so I've no idea, sorry.
garybixler Posted October 29, 2019 Posted October 29, 2019 (edited) I am at the Tesla file in the nodserver directory but the command ./install.sh doesn't seem to be valid. Just get command not found. Thanks Gary Edited October 29, 2019 by garybixler
MWareman Posted October 29, 2019 Posted October 29, 2019 I am at the Tesla file in the nodserver directory but the command ./install.sh doesn't seem to be valid. Just get command not found. Thanks Gary Try installing npm (I posted the command above)
Jimbo.Automates Posted October 29, 2019 Posted October 29, 2019 1 minute ago, garybixler said: I am at the Tesla file in the nodserver directory but the command ./install.sh doesn't seem to valid. Just get command not found. Thanks Gary Did you try the fix from @MWareman above? sudo pkg install npm-6.11.3
garybixler Posted October 29, 2019 Posted October 29, 2019 I ran the fix again just to be sure but still won't install without errors or allow the command ./install.sh However I do have my other nodes running now so I can do without the Tesla node until it can be loaded successfully from the store. Thanks so much for all the assistance with the other nodes. Thanks so much. Gary
MWareman Posted October 29, 2019 Posted October 29, 2019 After installing npm, I had to fully remove the Tesla node (from the UI) and then delete it from the filesystem.On reinstalling it - it worked. No manually running install.sh needed.
Recommended Posts