Exec.whitelist (Moving from Openhabian to Docker)

Hi,
I have just migrated and copied 1:1 that file from SD-Card and “uploaded” it via Portainer-Agent into the volume.
But still get (already restarted containers)

Tried to execute ‘curl -s https://checkip.amazonaws.com’, but it is not contained in whitelist.

root@8e2ca9a3b237:/openhab/conf/misc# ls -l
total 4
-rw-r--r-- 1 openhab openhab 219 Mar 01 00:37 exec.whitelist

Are there wrong rights?
Do I have to add openhab to another group?

Thanks for your help!

The permissions look fine. All I can think of is to verify that user openhab from that ls command is the same uid as openHAB is running as inside the container (that looks like an ls from inside the container but you don’t say).

All I can recommend is to verify that the line exactly matches that command and to verify that some hidden character didn’t get added during the copy or something like that.

Since it’s a simple curl, is there a reason for not using the HTTP binding in the first place?

UID: http:url:awsiop
label: Amazon AWS IP
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: false
  baseURL: https://checkip.amazonaws.com
  delay: 0
  stateMethod: GET
  refresh: 30
  commandMethod: GET
  timeout: 3000
  bufferSize: 2048
channels:
  - id: last-failure
    channelTypeUID: http:request-date-time
    label: Last Failure
    configuration: {}
  - id: last-success
    channelTypeUID: http:request-date-time
    label: Last Success
    configuration: {}
  - id: IP
    channelTypeUID: http:string
    label: IP Address
    description: ""
    configuration: {}

You don’t even need to transform the result.

Btw. didn know that equality. Thanks!

But now I have a crazy sideeffekt during editing “Code” of Thing:

UID: http:url:checkip_amazonaws_com
label: WAN IP
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: false
  baseURL: https://checkip.amazonaws.com
  delay: 0
  stateMethod: GET
  refresh: 30
  commandMethod: GET
  timeout: 3000
  bufferSize: 2048
location: Bremen
channels:
  - id: IP
    channelTypeUID: null
    label: null
    description: null
    configuration: {}
  - id: checkip_amazonaws_com_ip
    channelTypeUID: http:string
    label: IP
    description: ""
    configuration:
      mode: READONLY
  - id: checkip_amazonaws_com_last-success
    channelTypeUID: http:datetime
    label: Letzter Erfolg
    description: ""
    configuration: {}

Do you see the Block with “null”? That was created (and will not leave :expressionless:) since I pasted your block (starting with “channels”)

Direkly after pressing save (with no channels at all) this with “IP” appeared and the other two dissappeared :thinking:

Finally I added two (s.o.) within the GUI. (Never had such Problems with that Code-Tab; Migrated at least 15 Thinks like this from one OpenHab to another)

I dont know why and I don’t know how to remove (workarround might be removing whole Thing)
Any Idea (before I remove this broken stuff)?

CU

I can’t think of a reason why it would fail like this. Did you see anything in the logs when you saved it the first time?

When you edit it in the code tab does it revert to null visably or does it revert upon leaving and returning to the code tab?

I’ve never seen anything like this in the code tab and like you, I routinely use the code tab for stuff like this. Very weird.

If you can reproduce it this might be worth an issue.