Getting error while building Openflow from source

I am getting error while running the openflow form source :
2
MongoServerError: The $changeStream stage is only supported on replica sets
at Connection.onMessage (D:\One Drive\OneDrive - Aamby Technologies\Work Data\OpenRPA\AllanOpenRPA\openflow-master\node_modules\mongodb\lib\cmap\connection.js:231:30)
at MessageStream. (D:\One Drive\OneDrive - Aamby Technologies\Work Data\OpenRPA\AllanOpenRPA\openflow-master\node_modules\mongodb\lib\cmap\connection.js:61:60)
at MessageStream.emit (node:events:514:28)
at processIncomingData (D:\One Drive\OneDrive - Aamby Technologies\Work Data\OpenRPA\AllanOpenRPA\openflow-master\node_modules\mongodb\lib\cmap\message_stream.js:125:16)
at MessageStream._write (D:\One Drive\OneDrive - Aamby Technologies\Work Data\OpenRPA\AllanOpenRPA\openflow-master\node_modules\mongodb\lib\cmap\message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:556:12)
at _write (node:internal/streams/writable:490:10)
at Writable.write (node:internal/streams/writable:494:10)
at Socket.ondata (node:internal/streams/readable:985:22)
at Socket.emit (node:events:514:28) {
ok: 0,
code: 40573,
codeName: ‘Location40573’,
[Symbol(errorLabels)]: Set(0) {}
}

you must run mongodb in a replicateset

You can run a replica set with only one node ( that is what i do in docker )

1 Like

Thank you @Allan_Zimmermann it fixed the error now I am getting error below

Seem to work despite the errors?

no its not working @Allan_Zimmermann
Here are the steps I performed

  1. download github repo:GitHub - open-rpa/openflow: Scalable, secure workflow solution
  2. openup folder in VS code and started new terminal
  3. In project open file docker-compose.yml and uncomment all commented lines to access registry and port.
  4. ran the command npm run build in terminal of Visual Studio Code which will compose the registry of docker.
  5. execute command :npm i gulp typescript browserify tsify -g
  6. go to the folder with openflow cd openflow
  7. execute command :npm i
  8. at the top level create a folder called config and added the contents
  9. run project in debug mode
  10. execute commands :gulp sass
  11. execute commands :gulp
  12. execute commands :gulp watch
    Here are the debugging logs

add

port=80

to the .env file

1 Like

Thank you @Allan_Zimmermann its seems like working now however I am facing an issue while starting nodered agent . when I create noderedagent it gets created but when I tried to open the nodered agent it just redirect to openflow login page . after that I check logs of nodered agent created in docker . it is showing error below

2023-12-29 20:32:31 [client][INF] grpc: client 14 Name resolution failed for target dns:api:50051
2023-12-29 20:32:34 [client][INF] Connected to server api:50051
2023-12-29 20:32:39 [client][ERR] Disconnected from server 14 UNAVAILABLE: Name resolution failed for target dns:api:50051
ezgif-2-30e3cd4af6

That is not possible.

you mean we cant use nodered agent if we are building openflow from the source?

No, but openflow is designed to run in docker or kubernetes with traefik as an ingress controller.
so you need to setup traefik to access it.
Second, if you api is running on your local machine and agent inside docker, then the agent cannot connect to the api …
so again, this is designed to run in docker, not on your local machine.

So that mean I have to build the docker images using “npm run build”? and run the docker images is that correct?

@Allan_Zimmermann Can you please help me over here?

What do you mean ?
I told you, it’s not possible … you cannot have something in docker talk to something on the host machine

I got the point that I cant use nodered agent If I am running openflow using code on host machine. But I can create docker image of the code using npm run build and run that docker image.Please correct me let me know if I am wrong

Yashshah, I am facing the attached issue. Could you please help me on this it will be great.

@Allan_Zimmermann Please correct me if I am wrong

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.