Issue when creating groups

I have created some groups but when I look in database.db some are emty and other don´t even show up.
What could be the problem?

Groups

'6':
  friendly_name: lights_inside
  retain: false
  transition: 1
  # Optional: Change group state when one of the devices in it changes state, see 'State changes' below (default: true)
  optimistic: true
  # Note: this has to be the ieeeAddr of the device, not the friendly_name! (default: empty)
  devices:
    - '0x7cb03eaa0a0155d8'
    - '0x7cb03eaa00b20ede'
    - '0xd85def11a1000439'
    - '0x7cb03eaa0a0159e8'
'7':
  friendly_name: lights outside
  retain: false
  transition: 1
  # Optional: Change group state when one of the devices in it changes state, see 'State changes' below (default: true)
  optimistic: true
  # Note: this has to be the ieeeAddr of the device, not the friendly_name! (default: empty)
  devices:
    - '0x7cb03eaa00b07878'
    - '0x84182600000a959b'
    - '0x84182600000ab791'

database.db

{"id":82,"type":"Group","groupID":6,"members":[],"meta":{}}

Group 7 does not even show.

I got this from the log today but don´t know what it indicates.

error 2021-01-22 20:25:33: Failed to call 'Groups' 'onZigbeeStarted' (Error: Command 0x7cb03eaa0a0155d8/3 genGroups.add({"groupid":6,"groupname":""}, {"timeout":6000,"manufacturerCode":null,"disableDefaultResponse":true}) failed (Error: Data request failed with error: 'No network route' (205))
    at Endpoint.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:349:23)
    at Generator.throw (<anonymous>)
    at rejected (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/controller/model/endpoint.js:6:65))

Your last post suggests one of it’s members isn’t in network. I know it is not answering your question. Do you use HA? Grouping of there is more convenient. To HA the entity Z2M-group is a single light not a group. You can check state of group in HA as well. I used Z2M-groups for lights but dropped them. When it doesn’t suit your needs okay.

Could it be a problem, that some of the devices in the groups are not currently on the network? They are plugs for some christmas lights and not connected all the time.
The whole installation also became very unstable while I had these issues with the groups.
After deleting the groups and devices with the not connected plus the problems are gone.
I also guess having one device in several groups shouldn´t be a problem.

I used to use the groups in HA but these groups are not “real” zigbee groups and only for organizing. The groups in z2m cause less traffic on the zigbee network when sending to lots of devices at the same time. It gives less delay when turning many bulbs on at the same time.