Lock files?

I’m running the latest version (can’t get into HA right now to get the specific number) and went to upgrade HACS today. It wanted me to restart HA which I did but the UI never came back up. Since I was pressed for time I reverted to an automotive VM snapshot taken last night. It’s bombing out as well and it occurred to me that since the VM snaps are taken live that there are probably lock files and such that I need to manually clean up before HA will start again.

Does anyone have or know of a list of such files or activities that I’d need to complete to get a snapshot of a running HA instance to startup? I can get into the OS so I can browse around in the home assistant directories.

Thanks,

-Joni-

I don’t know of any lock files.

I had the same problem from updating my HACS earlier.

Looked into the log file and found the name of the locked file, (forgot the file name now), went into /config/custom_components/hacs folder and chmod a+r the locked file.
Restart HA, the error’s gone and HA/HACS working again.
If you can’t track down the locked file name, try chmod a+r all files in the hacs folder.
Hope that helps.

Ah…HACS has a lock file…interesting

Thanks for the suggestion but that didn’t seem to help - I ended up running it recursively on that whole directory and sub dirs. The log file is filed with errors loading components, sensors, lights, etc. which is really odd given that I even flipped back to a VM snapshot from last night and get the same errors!

Time to hang it up for the night and try again tomorrow. I will say though that a simple HACS update shouldn’t do this. I’ve lost some serious WAF points today. :frowning:

-Joni-

I’ve seen HACS do some crazy stuff on updates before. I removed it from my system simply because I don’t have time to track it down all the time.

You guys know file permissions are there for a reason. Don’t change unless you know what you are doing.

How about posting an issue on the HACS repository instead of bandying around this sort of advice!

2 Likes

I’m not as convinced this is a HACS issue. Like I said originally, even reverting to an automatically taken VM snapshot from BEFORE I did the HACS upgrade yields a non-working system. Something got screwed up somewhere (though I hadn’t made any changes for a while) and the reactor core finally snapped when I rebooted due to the HACS upgrade.

As far as the permissions go, I agree with you however in this case all of the files/folders in question were already owner/group/other readable so the net effect of the command was nothing changed.

Thanks,

-joni-

Here is what I’m getting in home_assistant.log - just the last parts of it as this pattern repeats A LOT and then finally ends with the event loop close statement. The funny thing is is that I can get to the configurator UI if I type in that URL but the actual HA UI and and obviously any HA actions/functions do not work.

Anyone else have any ideas?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 425, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2019-10-23 13:13:30 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform mjpeg
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
    return future.result()
  File "/usr/src/homeassistant/homeassistant/setup.py", line 52, in async_setup_component
    return await task  # type: ignore
  File "/usr/src/homeassistant/homeassistant/setup.py", line 131, in _async_setup_component
    await async_process_deps_reqs(hass, config, integration)
  File "/usr/src/homeassistant/homeassistant/setup.py", line 282, in async_process_deps_reqs
    hass, config, integration.domain, integration.dependencies
  File "/usr/src/homeassistant/homeassistant/setup.py", line 75, in _async_process_dependencies
    results = await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 304, in setup_and_run_hass
    log_no_color=args.log_no_color,
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 150, in async_from_config_file
    config_dict, hass, enable_log=False, skip_pip=skip_pip
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 95, in async_from_config_dict
    await _async_set_up_integrations(hass, config)
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 376, in _async_set_up_integrations
    *(async_setup_component(hass, domain, config) for domain in domains_to_load)
  File "/usr/src/homeassistant/homeassistant/setup.py", line 46, in async_setup_component
    return await setup_tasks[domain]  # type: ignore
  File "/usr/src/homeassistant/homeassistant/setup.py", line 52, in async_setup_component
    return await task  # type: ignore
  File "/usr/src/homeassistant/homeassistant/setup.py", line 137, in _async_setup_component
    hass, config, integration
  File "/usr/src/homeassistant/homeassistant/config.py", line 738, in async_process_component_config
    p_validated = component_platform_schema(p_config)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 386, in validate_mapping
    cval = cvalue(key_path, value)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 205, in _run
    return self._exec(self._compiled, value, path)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 285, in _exec
    v = func(path, v)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 635, in validate_sequence
    cval = validate(index_path, value)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 205, in _run
    return self._exec(self._compiled, value, path)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 250, in _exec
    return func(path, v)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 205, in _run
    return self._exec(self._compiled, value, path)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 285, in _exec
    v = func(path, v)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
    return schema(data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 386, in validate_mapping
    cval = cvalue(key_path, value)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
    return schema(data)
  File "/usr/src/homeassistant/homeassistant/helpers/config_validation.py", line 385, in service
    if valid_entity_id(value):
  File "/usr/src/homeassistant/homeassistant/core.py", line 120, in valid_entity_id
    return "." in entity_id and slugify(entity_id) == entity_id.replace(".", "_", 1)
TypeError: argument of type 'NoneType' is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 435, in wait_for
    await waiter
concurrent.futures._base.CancelledError
2019-10-23 13:13:39 ERROR (SyncWorker_6) [concurrent.futures] exception calling callback for <Future at 0x7fda8d7d4950 state=finished raised APIConnectionError>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/aioesphomeapi/host_resolver.py", line 72, in resolve_host
    raise APIConnectionError("Error resolving address with mDNS: Did not respond. "
aioesphomeapi.core.APIConnectionError: Error resolving address with mDNS: Did not respond. Maybe the device is offline.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/usr/local/lib/python3.7/asyncio/futures.py", line 362, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 728, in call_soon_threadsafe
    self._check_closed()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 475, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed