We have deployed mindLAMP and I found there is nothing under SensorSpec,
it is similar to your previous answer. I think the SensorSpec didn’t completely initialize. Could you please advise a sensorspec json to fix it?
We are in the same situation. Can anyone advise on whether this is typical, or advise (as @chunleichang has requested) as to the best way to have sensor_spec populated? For instance, is there perhaps a script we can run from within the container? Thanks!
Hi @lido and @spatel - tagging you in this thread I found to see if the recent issue I’m encountering with the sensor spec field being blank needs to be resolved on our (Temple IT’s) backend, or if this is something that should have been resolved with the latest version that we just deployed?
Hi @khackett, can you let me know if the solution linked earlier in this thread on Github did not help? If so, I’ll check in on this with another member of the team!
@spatel and @khackett I’ve dug through the above github issue but haven’t been successful in importing the sensor_spec table data json in the couchdb database. Can you share the steps necessary to import the sensor_spec json mentioned by @jeydude via curl on the command line?
I believe this error may be due to a slightly out-of-date version of LAMP-server - it looks like this may have been an issue that has been fixed in a recent release.
Can you try pulling the latest LAMP-server image (still using ghcr.io/bidmcdigitalpsychiatry/lamp-server:2021) and updating your container/service? Then try the command again and let me know if the issue persists.
The 2021 tag should work - but you will have to pull the latest image. When we release new versions of LAMP, we typically keep the 2021 tag - but you will still have to update your service (for example with docker service update, or through Portainer, for example) to get the latest version from our github repo.
If you began your project before August (when I believe this update was rolled out) and haven’t updated LAMP-server since then, that would explain the missing functionality.
We have specific tags for each version as well but I think we should try this first as it will create less hassle for you down the line. Of course, if we aren’t able to proceed this way, we can always try that.
Updated the docker service for lamp_server with docker service update and even re-deployed the service.
$ docker service ps --no-trunc lamp_server_server
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
ldnli0p8tq1yxjk8q7q77n75m lamp_server.1 bidmcdigitalpsychiatry/lamp-server:2021@sha256:d29f8a21b4ce8579b5d1538e5010755b7fb671f4e7f674de0e1c78d2ef56e334 cla-mindlamp Running Running 36 seconds ago
agp6soxebye3orm2a9hxm2c2s \_ lamp_server.1 bidmcdigitalpsychiatry/lamp-server:2021@sha256:d29f8a21b4ce8579b5d1538e5010755b7fb671f4e7f674de0e1c78d2ef56e334 cla-mindlamp Shutdown Failed about a minute ago "task: non-zero exit (137): dockerexec: unhealthy container"
Notice the failed container with id ‘agp6soxebye3orm2a9hxm2c2s’. Is that normal behavior?
Unfortunately, still getting the same error when running the python script to import the sensors:
Creating SensorSpec 'lamp.wifi'...
Could not create SensorSpeclamp.wifi. Error: (503)
Reason: Service Unavailable
HTTP response headers: HTTPHeaderDict({'Access-Control-Allow-Origin': '*', 'Content-Length': '34', 'Content-Type': 'application/json; charset=utf-8', 'Date': 'Fri, 12 Nov 2021 20:57:28 GMT', 'Etag': 'W/"22-vgcjE1Tva33+gOjXwDyr3SS4AM0"', 'X-Powered-By': 'Express'})
HTTP response body: {
"error": "503.unimplemented"
}
I can successfully curl the api endpoint with basic auth as the admin account to query the researchers.
can you share the specific cli I should use to update the service image? just want to confirm I’m performing the correct steps.
If you are using portainer, you can select the service from the service page and update it with pull the latest image option.
if you are using command line I suppose you can do it by using " docker service update SERVICENAME"
$ docker service update lamp_server --force
lamp_server
overall progress: 1 out of 1 tasks
1/1: running [==================================================>]
verify: Service converged
Unfortunately loading the sensors with the python code above provided by @LukeS still fails with the same error.