Local OpenFlow accessing
-
Hi
I got my local instance of OpenFlow up on port 8080.
I can see my id in Robots section in localhost instance, but cannot see any workflows. The webportal https://app.openiap.io shows the workflows to and I can invoke/download too.I changed the settings.json line to "wsurl": "wss://localhost.openrpa.dk/"
Also changed openflow.env for wss urls.
But now I cannot open OpenRPA itself and it fails to connect to OpenFlow.
The logs says - "11:48:29 debug: Token for <token>/<myemail.com>/webapp expires in less than 1 minute, send new jwt to client"I tried putting :8080 in wss in multiple places but no use.
-
I'm not sure I understand the question. If you can invoke the workflows from https://app.openiap.io then your robot is still connect to that and not your local machine. You need to close the robot before updating the file, the robot will overwrite the file while closing, so anything you change will get lost if you edit the file while the robot is running.
You need to EXPORT the workflows from the robot to a different folder and then IMPORT them again, if you want to have the workflows in both places. (select the project, to export all workflows from the project at the same time. And when importing, select *.rpaproj as file type, to import all files at the same time ) -
@allan-zimmermann
Apologies for confusion. I have closed the OpenRPA app, signed out from OpenFlow https://app.openiap.io/.
Changed settings.json first line to -
"wsurl": "wss://localhost.openrpa.dk:8080"I have updated openflow.env to reflect localhost instead of app.openiap.io.
Now when i start OpenRPA, during the load window gets stuck as shown in attach image. I have End Task from task manager.
-
That makes no sense ... why would you update openflow.env to say app.openiap.io ?
also, please make sure openflow is running before trying with the robot, the error in the picture clearly states it cannot connect to openflow, so get that working first. -
@allan-zimmermann
Sorry for being a thick head but please see the attached screenshot of my local OpenFlow. Does it look correct? if yes, then could you please guide me on the steps for attaching my OpenRPA to local Flow.Thanks!
-
You are NOT think headed ! ... I completely understand this does not come natural for everyone.
That looks good, so in order to use a robot with that installation, you will need to close the robot, open settings.json and set wsurl to ws://localhost.openrpa.dk:8080
Notice I'm using ws:// and not wss:// (wss is the equivalent to using https in the browser and ws is for http ) -
@allan-zimmermann
Yay!! Got it up and running!
But now when I invoke the workflow and select my robot it says "No consumer listening at <some_id>"
I checked RabbitMQ, MongoDB services, they are running.
There is only one user and it is all admin. -
a LOCAL nodered i hope ? you cannot execute workflows from a nodered running in my cloud, if your robot is connect to a local openflow.
If you get this error on a local nodered it can mean one of two things.
- the robot some how lost connecting to openflow, but didn't detect it, and there for has not registered it self in the message queues after the reconnect
- most likely there is an error in the top of your openflow log, saying it cannot connect to rabbitmq, and there for all requests to the message queue fails
-
@allan-zimmermann Yes... noderedlocal installed and running in Services. But even via OpenRPA menu I try to open NodeRED it opens <userid>.localhost.openrpa.dk
Also localhost.openrpa.dk:1880 is saying page not found. Not sure what settings need to be done. -
That setting is only meant to be used when you are connected to openflow running on kubernetes. At somepoint, I will see if i can find a smart way of getting it removed when not using kubernetes
So did you install openflow/nodered ? If you did, is the service running ? what does the log file say ?
https://github.com/open-rpa/openflow#quick-start-running-openflow-nodered-using-npm -
@allan-zimmermann OpenFlow/NodeRED are installed, noderedlocal service is running. The NodeRED log says -
18:34:17 info: starting openflow nodered
18:34:17 info: connecting to ws://localhost.openrpa.dk:1880
18:34:17 info: VERSION: 1.1.95
18:34:17 debug: Create as universal-websocket-client, using options
18:34:18 debug: WebSocketclient::onerror
18:34:18 debug: WebSocketclient::oncloseI tried to change env by putting port no./without port but same result.
-
you cannot make nodered connect to it self, nodered is suppose to connect to your openflow, so update wsurl to point to your openflow ( ws://local.host.openrpa.dk:8080 )
-
@allan-zimmermann I have corrected as you mentioned. Below are few lines from my configs -
openflow.env :
mongodb_url=mongodb://localhost:27017
mongodb_db=openflow
namespace=openflow
nodered_domain_schema=$nodered_id$.localhost.openrpa.dk
port=8080
api_ws_url=ws://localhost.openrpa.dk:8080noreredlocal.env:
nodered_sa=noderedlocal
nodered_id=noderedlocal
noderedusers=users
noderedadmins=users
nodered_port=1880
saml_issuer=uri:localhost.openrpa.dk
api_ws_url=ws://localhost.openrpa.dk:8080
domain=localhost.openrpa.dkNow I am geting log as below:
18:38:43 info: starting openflow nodered
18:38:43 info: connecting to ws://localhost.openrpa.dk:8080
18:38:43 info: VERSION: 1.1.95
18:38:43 debug: Create as universal-websocket-client, using options
18:38:43 debug: WebSocketclient::onopen
18:38:44 info: signed in as nikhil.sathe@xyz.com with id 600eabcfe665396908334078
18:38:44 debug: WebServer.configure::beginAll services are running, but I still cannot access the Nodered.
I tried both options but they do not work - localhost.openrpa.dk:1880 nikhilsathexyzcom.localhost.openrpa.dk:1880 -
That is weird, is it listening on port 1880 ?
( open a dos prompt and typenetstat -an | find ":1880"
and look for something like
TCP 0.0.0.0:1880 0.0.0.0:0 LISTENING
if it is ( or not ) look in the log, you didnt send it all, but i see it is connected to openflow, so what comes after that ? here is an example of what it will look like if succesfull
17:46:52 [info] starting openflow nodered 17:46:52 [info] connecting to wss://pc.openiap.io 17:46:52 [info] VERSION: 1.1.170 17:46:52 [debug] Create as universal-websocket-client, using options 17:46:52 [debug] WebSocketclient::onopen 17:46:55 [info] signed in as allan9 with id 5ff9a9f74c059g606814e7b7 17:46:55 [debug] WebServer.configure::begin 17:46:55 [debug] WebServer.configure::configure register 17:46:55 [debug] WebServer.configure::registerMetrics 17:46:55 [debug] WebServer.configure::setup express middleware 17:46:55 [debug] WebServer.configure::configure ssl 17:46:55 [debug] WebServer.configure::create https server 17:46:55 [debug] WebServer.configure::configure nodered settings (node:30240) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification. 17:46:55 [debug] WebServer.configure::configure nodered storageModule 17:46:55 [debug] WebServer.configure::init nodered 17:46:55 [debug] WebServer.configure::server.listen on port 1880 17:46:55 [debug] WebServer.configure::restarting nodered ... 17:46:55 [info] listening on https://pc.openiap.io:1880/ 17:46:55 [debug] C:\temp\dist\.nodered-allan9\package.json exists. 17:46:55 [debug] creating new packageFile C:\temp\dist\.nodered-allan9\package.json 17:48:15 [info] _saveSettings - 17:48:15
-
@allan-zimmermann Hi.. It was not showing "listening" line ..I also tried few things and nothing worked.. I did netstat and could say that nodelocal was never up (the way it should be) .
I decided to re-install NodRED and while doing that it asked for username/passwrd. I earlier had provided something that worked which I dont remember (the same user id I used while login to OpenFlow). I also read somewhere that nodered does not accept special chars in username. My openflow id is corp email, so contains special chars.
In openflow.env there is a line -
nodered_domain_schema=$nodered_id$.localhost.openrpa.dk
It I think creates the URL for NodeRED.Now coming back to installation, I am at below step -
13:05:00 debug: WebSocketclient::onclose 13:05:10 debug: Create as universal-websocket-client, using options 13:05:10 debug: WebSocketclient::onopen username?
Please advise.
-
@nikhil-sath Create a user with a password for nodered to run as, if you cannot use your own.
So when nodered and the robot run as the same user, everything just "works" since both always have permissions to everything, if you now want to run nodered as a different user, be aware that you now constantly need to check permissions every time something doesn't work.
( or could also add the nodered user to admins, but I do NOT recommend that, it's never safe to run something as admin ) -
@allan-zimmermann I tried what you said, but I cant see anything listening at 1880.. in netstat command there is nothing. So when I try to Invoke from OpenFlow web interface it says no consumer listening.
All expected services like nodered, openflow, mondgodb, rabbitmq are running.
Somehow its not able to link those together -
Then look in the log for nodered, there should be some hints in that.
-