Page 1 of 1

Problems with bluemix config

Posted: Tue Aug 02, 2016 6:49 am
by julian
I have had bluemix working for months until I have to change organization and credentials.
I remember that the first time I configure it we spent hours in this forum doing some research to make it work and the workaround was to edit.
nano /mnt/lib/cfg/bluemix_mqtt/setup.ini

At first I though the problem was fixed in the new 3.2.6 so I made the changes in the webmanager and nothing happen.
Then I made changes on the setup.ini through ssh and still not working.

Finally, after hours and hours of pain I removed the Json files in /mnt/lib/cfg/bluemix_mqtt/ then I went to the webmanager to run it, and finally it works. Almost.

1. I have the following error code on the log. What it means? (go to the finish)
2. How can I make the bluemix daemon autostart / restart / stop
3. The webmanager is clearly buggy and I can understand it, but can you make good ssh guides?
4. There is a comment in the IBM recipe comments proposing some dangerous ideas, can you answer it with a better guide. https://developer.ibm.com/recipes/tutor ... -meshlium/

Code: Select all


[2016-08-01 23:46:38.848] [INFO] Device types loaded from file.
[2016-08-01 23:46:38.869] [INFO] Gateway loaded from file.
[2016-08-01 23:46:38.870] [INFO] Devices loaded from file.
[2016-08-01 23:46:41.464] [INFO] Connected to MQTT.
[2016-08-01 23:46:41.465] [INFO] Device: DEV_JC_Node_1 - Published topic: iot-2/evt/eid/fmt/json - Message: {"d":{"STR":"XBee "},"t":"2016-04-28 02:01:15"}

[2016-08-01 23:46:43.589] [INFO] Connected to MQTT.
[2016-08-01 23:46:43.590] [INFO] Device: DEV_JC_Node_1 - Published topic: iot-2/evt/eid/fmt/json - Message: {"d":{"BAT":"87"},"t":"2016-04-28 02:01:15"}

[2016-08-01 23:46:46.855] [INFO] Connected to MQTT.
[2016-08-01 23:46:46.870] [INFO] Device: DEV_node_default_id - Published topic: iot-2/evt/eid/fmt/json - Message: {"d":{"MAC":"40DD6AD8"},"t":"2016-05-04 20:06:32"}

[2016-08-01 23:46:48.620] [INFO] Connected to MQTT.
[2016-08-01 23:46:48.634] [INFO] Device: DEV_node_default_id - Published topic: iot-2/evt/eid/fmt/json - Message: {"d":{"ACC":"-6;-30;1015"},"t":"2016-05-04 20:06:32"}

[2016-08-01 23:46:51.142] [INFO] Connected to MQTT.
[2016-08-01 23:46:51.143] [INFO] Device: DEV_node_default_id - Published topic: iot-2/evt/eid/fmt/json - Message: {"d":{"IN_TEMP":"29.00"},"t":"2016-05-04 20:06:32"}

[2016-08-01 23:46:52.757] [INFO] Connected to MQTT.
[2016-08-01 23:46:52.758] [INFO] Device: DEV_node_default_id - Published topic: iot-2/evt/eid/fmt/json - Message: {"d":{"BAT":"29"},"t":"2016-05-04 20:06:32"}

[2016-08-01 23:46:54.377] [INFO] Connected to MQTT.
[2016-08-01 23:46:54.378] [INFO] Device: DEV_meshlium - Published topic: iot-2/evt/eid/fmt/json - Message: {"d":{"STR":"new_sensor_frame"},"t":"2016-05-11 16:03:17"}

[2016-08-01 23:46:56.042] [INFO] Connected to MQTT.
[2016-08-01 23:46:56.043] [INFO] Device: DEV_meshlium - Published topic: iot-2/evt/eid/fmt/json - Message: {"d":{"BAT":"72"},"t":"2016-08-02 04:46:28"}

[2016-08-01 23:46:57.657] [INFO] Connected to MQTT.
[2016-08-01 23:46:57.660] [INFO] Device: DEV_Meshlium - Published topic: iot-2/evt/eid/fmt/json - Message: {"d":{"TCB":"20.01"},"t":"2016-08-02 04:46:28"}

[2016-08-01 23:46:59.304] [INFO] Connected to MQTT.
[2016-08-01 23:46:59.305] [INFO] Device: DEV_Meshlium - Published topic: iot-2/evt/eid/fmt/json - Message: {"d":{"PH":"-1.48"},"t":"2016-08-02 04:46:28"}

[2016-08-01 23:47:00.947] [INFO] Connected to MQTT.
[2016-08-01 23:47:00.948] [INFO] Device: DEV_Meshlium - Published topic: iot-2/evt/eid/fmt/json - Message: {"d":{"TIME":"Thu, 00\/04\/05, 00"},"t":"2016-08-02 04:46:28"}

[2016-08-01 23:47:02.573] [INFO] Connected to MQTT.
[2016-08-01 23:47:02.575] [INFO] Device: DEV_Meshlium - Published topic: iot-2/evt/eid/fmt/json - Message: {"d":{"DO":"19.3"},"t":"2016-08-02 04:46:28"}

[2016-08-01 23:47:04.579] [ERROR] Failed to get info from https://w4gz43.internetofthings.ibmcloud.com/api/v0002/device/types/MESHLIUM_DEV/devices. [cURL] 400: HTTP/1.1 400 Bad Request CUDRS0007E: The request was not valid. Review the constraint violations provided.
[2016-08-01 23:47:05.172] [ERROR] Failed to connect to the MQTT host. Revise your credentials.
[2016-08-01 23:47:05.787] [ERROR] Failed to get info from https://w4gz43.internetofthings.ibmcloud.com/api/v0002/device/types/MESHLIUM_DEV/devices. [cURL] 400: HTTP/1.1 400 Bad Request CUDRS0007E: The request was not valid. Review the constraint violations provided.
[2016-08-01 23:47:06.422] [ERROR] Failed to connect to the MQTT host. Revise your credentials.


Re: Problems with bluemix config

Posted: Tue Aug 02, 2016 12:38 pm
by libelium-dev
Hi julian,

Please check your credentials in file:

Code: Select all

nano /mnt/lib/cfg/bluemix_mqtt/setup.ini
Also set your log_level varaiable to 4. Stop and start your Bluemix service and check if it works.

If you want to run your Bluemix MQTT plugin on start please refer this preview answer given:

viewtopic.php?p=63798#p63798

Regards

Re: Problems with bluemix config

Posted: Sun Aug 21, 2016 3:52 am
by julian
There is a bug with the Bluemix configurator:

If you change the credentials and organization in the meshlium configurator for bluemix, it will not work until you connect via SSH to the meshlium and remove device_types.json, devices.json and gateway.json

The workaround is this:
1. Connect by ssh
2. Check configuration file, and set log_level = 4

Code: Select all

nano /mnt/lib/cfg/bluemix_mqtt/setup.ini
3. Delete wrong files

Code: Select all

rm /mnt/lib/cfg/bluemix_mqtt/device_types.json
rm /mnt/lib/cfg/bluemix_mqtt/devices.json 
rm /mnt/lib/cfg/bluemix_mqtt/gateway.json
4. Check log_file must looks like: [INFO] Device: DEV_meshlium - Published topic: iot-2/evt/eid/fmt/json

Code: Select all

tail -f /mnt/user/logs/bluemix_mqtt.log
5. set log_level = 1
6. start and stop service from ManagerSystem

Re: Problems with bluemix config

Posted: Mon Aug 22, 2016 2:54 pm
by libelium-dev
Hi Julian,

Thank you for your comments, we will take note of your suggestions for next releases.

If you have more questions don't hesitate to contact us.

Regards

Re: Problems with bluemix config

Posted: Mon Sep 12, 2016 9:20 am
by scottline

Re: Problems with bluemix config

Posted: Mon Sep 12, 2016 12:56 pm
by libelium-dev
Hi scottline,

Thank you for your contribution.

Best regards,