Can't connect device to Fiware Sigfox IoTAgent - fiware

I am trying to send messages from a device that uses Sigfox to the Fiware system and I am having some troubles.
I see in the sigfox backend that the sigfox cloud receives the messages but when the callback is executed I get and error.
In the sigfox cloud it says:
Error 404 - Not found
And in the log of the server:
No context element found
The callback I use is this:
Get http://IP:17428/update?id=sigfoxtest&data={data}
I can see that the device exists on the system. Also I have tried creating different devices and sending the information with different urls but I always get the same error.
Thanks.

Related

Zabbix Mattermost notification integrations - Timeout exceeded while connecting to 'localhost' when testing Mattermost Media Type

I am trying to intergrate our mattermost with zabbix to receive notifications on alerts. I've followed up the instructions on this link. We are using Zabbix 4.4 with MM 5.19.
After enabling the integration, No alerts are being posted on Mattermost. I tried testing the Media type on Administration > Media Types > Mattermost > Test.
I've added the following as the parameters, but it throws the error : Connection timeout of 3 seconds exceeded when connecting to Zabbix server "localhost".
bot_token : {Token generated for the Bot in Mattemost}
mattermost_url : {https://mattermost.our-company.com}
send_mode : alarm
Tried changing {ZABBIX_URL} to both http://127.0.0.1 and http://zabbix.our-company.com (The DNS is resolved only internally, but our mattermost is available on public network) but none of them work.
I checked the logs inside /var/log/zabbix but no error or anything. I even tried putting the zabbix logs to Debug mode but no luck in any case, the only Debug log I've got is the following :
2063:20200216:090224.146 trapper got '{"request":"alert.send","sid":"74095b240dd6783618571516f029187a","data":{"parameters":{"zabbix_url":"{$ZABBIX.URL}","send_mode":"alarm","send_to":"{ALERT.SENDTO}","event_tags":"{EVENT.TAGS}","event_name":"{EVENT.NAME}","event_nseverity":"{EVENT.NSEVERITY}","event_ack_status":"{EVENT.ACK.STATUS}","event_value":"{EVENT.VALUE}","event_update_status":"{EVENT.UPDATE.STATUS}","event_date":"{EVENT.DATE}","event_time":"{EVENT.TIME}","event_severity":"{EVENT.SEVERITY}","event_opdata":"{EVENT.OPDATA}","event_id":"{EVENT.ID}","event_update_message":"{EVENT.UPDATE.MESSAGE}","trigger_id":"{TRIGGER.ID}","trigger_description":"{TRIGGER.DESCRIPTION}","host_name":"{HOST.NAME}","host_ip":"{HOST.IP}","event_update_date":"{EVENT.UPDATE.DATE}","event_update_time":"{EVENT.UPDATE.TIME}","event_recovery_date":"{EVENT.RECOVERY.DATE}","event_recovery_time":"{EVENT.RECOVERY.TIME}","bot_token":"qs3rkqdappy6i8gs3a8871phxc","mattermost_url":"https:\/\/mattermost.our-company.com"},"mediatypeid":"7"}}'
What can be the issue? Is there a way to "debug" and find the root cause of this error? Any help is appreciated! Note that right now we have integrated Slack with Zabbix and it's working fine, but we are moving to Mattermost and therefore, we need to migrate the integrations as well.
We found out the issue with our Network Admin. The problem was that our Zabbix server was trying to resolve Mattermost name from local network route (i.e. 192.168.x.x) and it kept failing, therefore, no SSL connection could be initiated.
It seems that Zabbix integration tests' error messages are quite generic and sometimes, misleading. Thorough investigation is needed for finding out the root cause.

Unable to connect to Orion Context Broker using Wirecloud

I am new to FIWARE. I managed to install Orion Context Broker on my local system following the steps mentioned in the FIWARE website. I am able to use CURL commands to create entities and also retrieve values.
I have also installed Wirecloud on my local system and able to access Wirecloud UI from my browser.
But I am unable to display the entities on the Wirecloud widgets. I have tried all widgets including "NGSI Type Browser", NGSI Browser and NGSI Source operator.
All returning the same error: "ConnectionError: Unexpected response from WireCloud's proxy"
Please help me on how to proceed. My NGSI-proxy is also running and listening on port 3000. Screenshots attached.
enter image description here
Can you try to replace localhost with IP address of your machine running Orion and Ngsiproxy?

IBM API Connect Test and Monitor giving Invalid Request error

I am trying to use API Connect Test and Monitor tool wherein when I gave a Get request and url and with and without authorization token, I am getting this error:
Error. Invalid Request
When I do it using Postman, I get a proper 200 OK response (with and without authorization token).
I have tried for POST request also. Same works in Postman but not in IBM API Test and Monitor.
The IBM API Test and Monitor tool is a cloud-based service. Hence, it can only be used to query endpoints that are publicly available on the internet.
localhost refers to the user's computer which does not normally expose any TCP ports to the wider internet.
You can, however, use the IBM API Test and Monitor desktop app to query localhost

Kubernetes pod exec API exception: Response must not include 'Sec-WebSocket-Protocol' header if not present in request

I am trying to setup a websocket connection to the Kubernetes Pod Exec API, based on the suggestions given in this SO post: How to execute command in a pod (kubernetes) using API?.
Here's what I have done so far -
Installed Simple Web Socket Client extension in Chrome.
Started kubectl proxy --disable-filter=true to run proxy with WS connections allowed. kubectl.exe version is 1.8.
Used address ws://localhost:8001/api/v1/namespaces/default/pods/nginx-3580832997-26zcn/exec?container=nginx&stdin=1&stdout=1&stderr=1&tty=1&command=%2Fbin%2Fsh in the Chrome extension to connect to the exec api.
When I click connect, Chrome reports back an error with the message -
Error during WebSocket handshake: Response must not include 'Sec-WebSocket-Protocol' header if not present in request
Apparently, kubectl is sending back empty Sec-WebSocket-Protocol header in the response and Chrome is taking offense to that.
I tried changing the code of Simple Web Socket Client open method to send empty protocols parameter to the Websocket client creation call, like - ws = new WebSocket(url, []); to coax Chrome in sending empty header in request, but Chrome doesn't send empty header.
So what can be done to directly connect to the exec in Chrome?
This is a known issue; kubectl proxy does not support websockets. (You can verify this easily by starting up kubectl proxy and then attempting kubectl --server=http://127.0.0.1:8001 exec ...; you will receive the message error: unable to upgrade connection: <h3>Unauthorized</h3> if the filter is enabled and Error from server (BadRequest): Upgrade request required if the filter is disabled).
The confusion might come from the fact that the kube-apiserver proxy does support websockets, but that proxy is different from the kubectl proxy.
As I see you have 3 options now (in order of difficulty):
Access kube-apiserver directly. You will likely need authentication that kubectl proxy is handling for you now
Use SockJS, this is what Kubernetes Dashboard does for the exec feature
Fix #25126
After reading the code in https://github.com/kubernetes-ui/container-terminal/blob/master/container-terminal.js, found that exec uses base64.channel.k8s.io protocol. The Simple Web Socket Client code wouldn't have worked because of this and also that the stream communication is in base64, not plain text.
Leaving this as an answer for other folks trying to implement a WS based terminal emulator... as #janos-lenart mentioned, the code is pretty new and there may be issues using it in different browsers, best bet at this point is to read example code and start from there.

fabric8 kubernetes client exception

I am using the fabric8 library to create replication controllers on the kubernetes cluster. When I create areplication controller with the name rc-UUID.toString();
It errors aout with the following message
ReplicationController is forbidden. What does this indicate?
I don't think that the problem is the name.
Names like: rc-fa75ddfd-bea7-45b5-8d2f-ed806652b461 are valid.
Usually the message forbidden appears in one of the following cases:
i) http status code 401
ii) https status code 404
Error (i) appears when you are connecting to a remote Kubernetes Environment and can be solved by login in. Try kubectl login or oc login.
Error (ii) appears when the client is instantiated from within Kubernetes and the service account hasn't been properly configured.
Either way, I'd strongly encourage you to upgrade to a more recent version of the cabernets client, which has more meaningful error messages.
If none of my suggestion solves your issue, please attach the full output.
Cheers