Can't find Raspberry_pi section (rpi gpio ) in node-red after an update - raspberry-pi

i used node red to control a led from a local server I had a section in nodes called "Raspberry_Pi" where i could add rpi gpio output/input and other interesting stuff
Howerver after upadating node red => "update-nodejs-and-nodered" I couldnt find this section.
Rpi gpio is correctly installed in my machine but the problem is i cant access it from node red The question is How to access Rpi gpio/mouse/keyboard/..... from node red ?
Start Up log
Start Node-RED
Once Node-RED has started, point a browser at http://192.168.1.5:1880
On Pi Node-RED works better with the Firefox or Chrome browser
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot
To find more nodes and example flows - go to http://flows.nodered.org
3 May 19:29:02 - [info]
Welcome to Node-RED
===================
3 May 19:29:02 - [info] Node-RED version: v0.16.2
3 May 19:29:02 - [info] Node.js version: v6.10.3
3 May 19:29:02 - [info] Linux 4.9.24-v7+ arm LE
3 May 19:29:03 - [info] Loading palette nodes
3 May 19:29:07 - [info] Settings file : /root/.node-red/settings.js
3 May 19:29:07 - [info] User directory : /root/.node-red
3 May 19:29:07 - [info] Flows file : /root/.node-red/flows_ziedpi.json
3 May 19:29:08 - [info] Server now running at http://127.0.0.1:1880/
3 May 19:29:08 - [info] Starting flows
3 May 19:29:08 - [info] Started flows

Related

ejabberd clustering problems and solutions

Setup Details
2 ejabberd nodes with postgresql as database (OS : Ubuntu 16.04)
Trying to do clustering of two ejabberd as mentioned in
https://docs.ejabberd.im/admin/guide/clustering/
After starting the master node the following steps have been performed on the slave node
copy .erlang.cookie to the slave node
copy ejabbed.yml from master to slave.
slave started successfully but shows the below error.
=====Error=========
Eshell V9.2 (abort with ^G)
(ejabberd#gim-Veriton-M6650G)1> 18:29:41.856 [notice] Changed loghwm of /usr/local/var/log/ejabberd/error.log to 100
18:29:41.856 [notice] Changed loghwm of /usr/local/var/log/ejabberd/ejabberd.log to 100
18:29:41.857 [info] Application lager started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.860 [info] Application crypto started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.865 [info] Application sasl started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.871 [info] Application asn1 started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.871 [info] Application public_key started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.880 [info] Application ssl started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.881 [info] Application p1_utils started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.883 [info] Application fast_yaml started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.888 [info] Application fast_tls started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.892 [info] Application fast_xml started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.895 [info] Application stringprep started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.899 [info] Application xmpp started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.903 [info] Application cache_tab started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.910 [info] Application eimp started on node 'ejabberd#gim-Veriton-M6650G'
18:29:41.910 [info] Loading configuration from /usr/local/etc/ejabberd/ejabberd.yml
18:29:41.913 [error] CRASH REPORT Process <0.67.0> with 0 neighbours exited with reason: no case clause matching <<>> in ejabberd_config:get_config_option_key/2 line 473 in application_master:init/4 line 134
18:29:41.913 [info] Application ejabberd exited with reason: no case clause matching <<>> in ejabberd_config:get_config_option_key/2 line 473
(ejabberd#gim-Veriton-M6650G)1>
I've tried re creating mnesia DB also but didn't help.
ejabberdctl status shows ejabberd is not running in that node
Can some oe please look into the issue and help.
Finally I found the solution to the problem
The issue is with the node name as the node name of the master ia FQ name
but the slave node's name is without a domain.
Also added both the node names in the /etc/hosts file
For ejabberd clustering ,Please refer the below steps.
Before starting , configure proper entries in the /etc/hosts files of both nodes.
ie the nodes should resolve each other using their host names.
set ejaberd node name in ejabberd.cfg file , both the nodes should have different node names.
1.cofigure ejabberd in one master node with a proper node name (either a FQDN or just a name of your convenience)
2.Configure slave node with the same config as that of master ie. bot the nodes should have the same configuration in ejabberd.yml file)
3.copy erlang.cookie from master node to slave and the ejabberd user should be ale to read the cookie file.
4.Start the master node in live mode (ejabberdctl live )
5.Start slave node in live mode
6.Check the cookie value in erlang console of both the nodes using the command 'erlang:get_cookie().' , both the nodes should have the same value.
7.If bot the nodes have same value then execute "ejabberdctl --not-timeout join_cluser ejabberd#nodename" in the slave.
change ejabberd#nodename according to your environment.
In my case I ran ejabberd with 'ejabberd' user with node name as ejabberd#cluster-node1 (If you want you can use a FQDN also like ejabberd#example.com)
8.If the abode command executed without any error then the nodes are in cluster
9.Confirm the cluster in any of the erlang console using the command mnesia:info(). here you will get the node details in "running_db_nodes"
10.Hurrayyyy you are done...
For load balancing the cluster you can use HAProxy
Please refer https://blog.onefellow.com/post/76702632637/haproxy-and-ejabberd for details
I've not done load balancing using any hardware load balancer , need to check on that
If anyone have done that please do post here ..

OSRM Extract Silently Fails

I'm trying to setup a OSRM backend server using Docker. The host machine is a MacBook Pro with 32GB RAM running OS 10.14 (Mojave).
Having downloaded the england-latest.osm.pbf file I've tried to start the process with the following command.
docker run -t -v $(pwd):/data osrm/osrm-backend osrm-extract -p /opt/car.lua /data/england-latest.osm.pbf
The output is as follows:
[info] Parsed 0 location-dependent features with 0 GeoJSON polygons
[info] Using script /opt/car.lua
[info] Input file: england-latest.osm.pbf
[info] Profile: car.lua
[info] Threads: 6
[info] Parsing in progress..
[info] input file generated by osmium/1.8.0
[info] timestamp: 2018-11-02T21:15:02Z
[info] Using profile api version 4
[info] Found 3 turn restriction tags:
[info] motorcar
[info] motor_vehicle
[info] vehicle
[info] Parse relations ...
[info] Parse ways and nodes ...
[info] Using profile api version 4
[info] Using profile api version 4
[info] Using profile api version 4
[info] Using profile api version 4
[info] Using profile api version 4
At this point the process silently fails and doesn't write any of the files you'd expect. If I use the greater-london-latest.osm.pbf file then everything works fine so I'm guessing it's some sort of memory constraint. How do I go about identifying the problem and fixing it?
After running into the same issue on my Mac, I solved it by increasing the memory available to Docker. Look for the whale icon on the menubar, click then select Preferences > Advanced. Change the slider to a higher amount, press Apply & Restart, then try running again.
https://docs.docker.com/docker-for-mac/#memory
I could run within the 2GB default limit with a 415MB file (Canada > British Columbia) but nothing larger. Given the England file is 422MB, you can probably increase to 4GB and have it work. (Trying to run for all of Canada, a 2.4GB file, needed >8GB of RAM.)

Changing the Default Play Framework HTTP Port (without Using System Property)

There's an oft-asked question about changing the HTTP port to which a Play application will bind. James Ward's answer is generally accepted as the most complete, but it involves overriding the default by setting a http.port system property. However, is it possible to change this default without having to manually add it to the run command at development time, tweak the environment, or package an override in a runtime configuration?
This can be accomplished by setting the playDefaultPort key, as follows:
import PlayKeys._
playDefaultPort := 9123
Afterwards, you'll be able to run and testProd without needing to remember the desired port.
This works in both development:
$ sbt run
[info] Loading project definition from /Users/michaelahlers/Projects/MyApp/project
[info] Set current project to MyApp (in build file:/Users/michaelahlers/Projects/MyApp/)
--- (Running the application, auto-reloading is enabled) ---
[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9123
(Server started, use Ctrl+D to stop and go back to the console...)
And production modes:
$ sbt testProd
[info] Loading project definition from /Users/michaelahlers/Projects/MyApp/project
[info] Set current project to MyApp (in build file:/Users/michaelahlers/Projects/MyApp/)
[info] Packaging /Users/michaelahlers/Projects/MyApp/target/scala-2.11/MyApp_2.11-1.0.0-SNAPSHOT-web-assets.jar ...
[info] Done packaging.
(Starting server. Type Ctrl+D to exit logs, the server will remain in background)
2016-04-08 13:09:45,594 [info] a.e.s.Slf4jLogger - Slf4jLogger started
2016-04-08 13:09:45,655 [info] play.api.Play - Application started (Prod)
2016-04-08 13:09:45,767 [info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9123

why does server with play framework shutdown abnormally

Our server backend is with play framework. During developing it seems everything is OK until we deploy it to production environment.
In production environment, the server just shutdown without any errors/warnings in logs. The last logs is like below:
2016-03-16 10:15:44,866 - [INFO] - from application in
ForkJoinPool-2-worker-1 ReactiveMongoApi stopping... 2016-03-16
10:15:44,903 - [INFO] - from application in ForkJoinPool-2-worker-3
ReactiveMongoApi connections stopped. [Success(Closed)] 2016-03-16
10:15:44,958 - [INFO] - from
play.api.libs.concurrent.ActorSystemProvider in
ForkJoinPool-2-worker-1 Shutdown application default Akka system:
application
My question is: in which case would play shutdown itself? Why there is no error messages? Where should I check into first?
Thanks in advance.

Playframework running but not able to be accessed on 127.0.0.1

I have downloaded playframework from its official website https://playframework.com/ and tried following:
activator new [appname](It has downloaded all the jar files and went through well)
on activator ui it says
Play server process ID is 4419
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /127.0.0.1:8888
[info] a.e.s.Slf4jLogger - Slf4jLogger started
but however I am not access it on 127.0.0.1:8888. please help.
Thank in adv.
Play defaults to port 9000 - what you're seeing on port 8888 is activator.
Go to http://127.0.0.1:9000 - if it doesn't work, it's because you're not running your Play app.
Either...
Go the the Run view the activator app in your browser (http://127.0.0.1:8888) and cilck the Run button. If you do this, you will see the following (or similar) in the browser:
Setting up Play fork run ... (use Ctrl+D to cancel)
--- (Running the application, auto-reloading is enabled) ---
p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
Or, run activator in console mode (on the command line, go to your Play app directory and type activator without ui). When it starts up, type run. You will see the following (or similar):
--- (Running the application, auto-reloading is enabled) ---
[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
You can now go to http://127.0.0.1:9000 to see your app.