Issues with lists and service restart

So I was using opehab 2.2 for a long time successfuly.

Recently I made a fresh install of openhabian with openhab 2.4 on my pi3.

The issue I face is as follows.
Normally, for bindings 2.x, I use paperui to setup things.
Then I use item lists to set up items.

On OH2.2, I could edit an item list, and when I save the file, OH rebuilds all items.
Now I get a warning that I cannot create the new item because of a same UUID.
If I restart the raspberry, then the correct new item list is active and the old items are ignored (as expected).

Is this known? Or is there another underlying reason?

Also, to avoid restarting the pi, I tried using sudo service openahb2 restart
But, OH2 never starts.
When I check the service status, I get:

openhab2.service - openHAB 2 - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enable Active: active (running) since Wed 2019-02-06 23:38:46 CET; 5s a Docs:
Process: 1122 ExecStop=/usr/share/openhab2/runtime/bin/karaf stop Main PID: 1263 (java)
CGroup: /system.slice/openhab2.service
└─1263 /usr/bin/java -Dopenhab.home=/usr/share/openhab2
Feb 06 23:38:46 hostname systemd[1]: Started openHAB 2 - empowering lines 1-11/11 (END)

What do you mean by this statement. You cannot have two Items of the same name. You can’t just redefine an Item in a .items file without first deleting it from PaperUI. You must also remove the Links to that Item as well. before you recreate the Item in a .items file.

So do you mean that you have these Items already defined in PaperUI and you are trying to redefine them in .items files?

Let’s say in paperui I only have a thermostat thing. No items.

Then something.items has:

Number Cool_Item “Temperature” (theaters) {channel=max:thermostat:something:something:actual_temp }

I save the file, and great, item exists.
I then open up paperui and Cool_item exists even though I did not create it in paperui.
Then when I edit the item file, exmaple:

Number Cool_Item “funky” (theaters) {channel=max:thermostat:something:something:actual_temp }

Oh2 doesn’t recreate the item with label funky. It complains instead.
Restarting the pi works.
I guess restarting oh2 should be enought but that is another issue.

And how does it complain?
Can you post the log, please?

Please use the code fences

I’ll paste it when back home.

  1. I created “example.items”

2019-02-07 20:19:45.496 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘example.items’
2019-02-07 20:19:46.550 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘example.items’

  1. I edit example.items & saved the following change:
    2019-02-07 20:23:39.996 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'example.items'

==> /var/log/openhab2/events.log <==

2019-02-07 20:23:40.020 [.ItemChannelLinkAddedEvent] - Link ‘DummyItem1-max:thermostat:KEQ0817097:NEQ0996880:actual_temp’ has been added.’`

  1. Opened paperui & checked things:

  2. Then I edited the items again to:
    Number DummyItem1 "Temperature sss" <temperature> (gUnknown) {channel="max:thermostat:KEQ0817097:NEQ0996880:actual_temp"}

  3. No problem.
    2019-02-07 20:25:39.361 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'example.items'

    ==> /var/log/openhab2/events.log <==

    2019-02-07 20:25:39.404 [ome.event.ItemUpdatedEvent] - Item ‘DummyItem1’ has been updated.

Conclusion, I couldn’t recreate the problem… :frowning:

now I try to restart OH2:

sudo service openhab2 restart
sudo service openahb2 status

 openhab2.service - openHAB 2 - empowering the smart home
   Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled; vendor pre
   Active: active (running) since Thu 2019-02-07 20:29:48 CET; 12s ago
  Process: 4869 ExecStop=/usr/share/openhab2/runtime/bin/karaf stop (code=exited
 Main PID: 5030 (java)
   CGroup: /system.slice/openhab2.service
           └─5030 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.con

Mystery, everything works this time… yesterday I was using SSH over VPN from my tablet… I wonder if that could have caused any issue.

On the other hand, in paperui, I have several items that I NEVER created in paperui, they were only created via an .items file - why would they show up?

Where in the paperUI ?

Under items.