If possible, can you send me the HAR for that requ...
# umh-support
f
If possible, can you send me the HAR for that request ?
d
f
Ill check this on my instance later today. Hopefully i can fix it without a new release 🙂
d
i was reading somewhere that this is a problem with how grafana sends queries. this is why i wanted to enable the grafana proxy to test..
f
For me there is no
/nodered/api/v1/mqtt
endpoint in nodered.
Do you have other plugin installed ?
d
you need to create an endpoint in node-red first. i can post mine, w8 a s.
[{"id":"a90dbcc2bc131f94","type":"http in","z":"152befab56ef6760","name":"","url":"/api/v1/mqtt/","method":"post","upload":false,"swaggerDoc":"","x":230,"y":660,"wires":[["9d4248b87fd367b1","db3155e8889d0c15","3540895d3f934d94"]]},{"id":"3540895d3f934d94","type":"http response","z":"152befab56ef6760","name":"","statusCode":"","headers":{},"x":610,"y":640,"wires":[]},{"id":"9d4248b87fd367b1","type":"debug","z":"152befab56ef6760","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":540,"y":720,"wires":[]}]
running from insomnia the api works, and running GET from grafana works, but not POST from grafana.
f
yes, and there CORS implementation doesn't seem to care about the config. Even:
Copy code
httpNodeCors: {
        origin: "true",
        methods: "GET,PUT,POST,DELETE"
    },
doesn't change anything
let me check if i can patch grafana-proxy to bypass that issue
ok, if you use the
latest-f
tag in grafana proxy, then you can use the new node-red endpoint:
http://localhost:64108/api/v1/nodered/nodered/api/v1/mqtt
The double nodered is needed (the first is for grafanaproxy to select the correct handler, and after that everything is just passed to the nodered service)
works in grafana and insomnia
d
ok. i guess i need to update the chart first so my proxy will start.. problem is however still with the factoryinsight which changes to 0.1.14 that chrashes for me so i need to manually change that back to 0.1.13, so i will loose data for a short while when i update. i will test this on friday afternoon hopefully, when factory is closed.
enabled the datainput today.. get error in the grafanaproxy: {"log.level":"info","@timestamp":"2023-08-23T07:53:30.772Z","log.origin":{"file.name":"internal/fgtrace.go","file.line":32},"message":"DEBUG_ENABLE_FGTRACE not set. Not enabling debug tracing","ecs.version":"1.6.0"} {"log.level":"fatal","@timestamp":"2023-08-23T07:53:30.772Z","log.origin":{"file.name":"grafana-proxy/http.go","file.line":76},"message":"Failed to start rest api: listen tcp :80: bind: permission denied","ecs.version":"1.6.0"}
and errors for factoryinput:
{"log.level":"warn","@timestamp":"2023-08-23T07:54:27.747Z","log.origin":{"file.name":"factoryinput/main.go","file.line":87},"message":"No customer accounts set up","ecs.version":"1.6.0"} {"log.level":"info","@timestamp":"2023-08-23T07:54:27.747Z","log.origin":{"file.name":"internal/fgtrace.go","file.line":32},"message":"DEBUG_ENABLE_FGTRACE not set. Not enabling debug tracing","ecs.version":"1.6.0"} {"log.level":"info","@timestamp":"2023-08-23T07:54:27.753Z","log.origin":{"file.name":"factoryinput/mqtt.go","file.line":124},"message":"Running in normal mode%!(EXTRA string=USE_TLS)","ecs.version":"1.6.0"} {"log.level":"info","@timestamp":"2023-08-23T07:54:27.802Z","log.origin":{"file.name":"factoryinput/mqtt.go","file.line":91},"message":"Connected to MQTT broker%!(EXTRA string=united-manufacturing-hub-factoryinput-0)","ecs.version":"1.6.0"} {"log.level":"error","@timestamp":"2023-08-23T07:54:27.803Z","log.origin":{"file.name":"factoryinput/http.go","file.line":67},"message":"Failed to bind to port 80%!(EXTRA *net.OpError=listen tcp :80: bind: permission denied)","ecs.version":"1.6.0"} {"log.level":"info","@timestamp":"2023-08-23T07:54:27.803Z","log.origin":{"file.name":"factoryinput/main.go","file.line":209},"message":"Shutting down application","ecs.version":"1.6.0"}
I don't know why it fails to bind 80 on some devices, but this fix will be in the next umh release
d
ok. so i have to wait for the next release then until the grafanaproxy will work?
f
Or manually apply that fix
d
Ok, so how do i apply it manually ?
f
Edit the deployment and set the securityContext as shown in the images
d
and i won't change back to the old securityContext
ah. now i could revert back. i had the delete the entire security contect section.
f
That's a lot of dead replicas. What error have they thrown ?
d
don't know. i can not read the logs since the container lives to short..
2 Views