hassio-addons / addon-unifi

UniFi Network Application - Home Assistant Community Add-ons
https://addons.community
MIT License
276 stars 137 forks source link

WARNING: An illegal reflective access operation has occurred #446

Closed Zoriontsu closed 10 months ago

Zoriontsu commented 1 year ago

For a week now, the UniFi Network Application fails to start upon reboot. I have to manually retry starting the Add-On multiple times until it works.

As of August 8th, 2023 I am running the latest versions:

Home Assistant 2023.8.3 Supervisor 2023.08.1 Operating System 10.5 Frontend 20230802.1 - latest

The following message appears on the log:

[09:18:08] INFO: Now starting the UniFi Network Application... [09:18:08] INFO: Note: No add-on specific logs beyond this point. WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/usr/lib/unifi/lib/tomcat-embed-core-9.0.65.jar) to field java.io.ObjectStreamClass$Caches.localDescs WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

toddstar commented 1 year ago

Same error logged here. Even after multiple reboots and it finally loading, it then crashes nearly instantly after i log in (to try generate a backup to port my config over to a different machine).

Edit: The same error message appears on my lxc version and doesn't affect it from running, so that doesn't seem to be the cause of the addon crashing

patrickdk77 commented 1 year ago

Same problem here

crxtasy12 commented 1 year ago

Same problem here too.

EggEek-net commented 1 year ago

I have the same issue since the 2023.8.0 update.

jay9883bea commented 1 year ago

I was experiencing this issue, but on my laptop and not on the PC that I usually use to access my HA instance. Both are using Firefox (I tried with Edge on my laptop with the same result). I still get the error message in the log, but this seems to be a browser issue rather than an application issue, which appears to be running fine.

Could this be a HTTPS issue?

Geo011 commented 1 year ago

Also having this issue

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/usr/lib/unifi/lib/tomcat-embed-core-9.0.65.jar) to field java.io.ObjectStreamClass$Caches.localDescs WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

rmeekers commented 1 year ago

Same here. Sometimes it is able to start, sometimes I see that error in the logs and it won't start.

adekloet commented 1 year ago

@frenck (Excuse the direct tag)

about the warning: WARNING: All illegal access operations will be denied in a future release I have been searching but have not been able to locate a date for the "Future" Release nor work on a patch. Do you have any idea?

The maintainers of org.apache.catalina.loader.WebappClassLoaderBase how do we go about informing them or can we "Asume" (Mother of all F*&^kups) that they already know.

Thanks a lot for pitching in if you can,

Alex HASS OS (2023-10) - Addon - Unifi Controller Current version: 2.7.0 on Pi4

// WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/usr/lib/unifi/lib/tomcat-embed-core-9.0.65.jar) to field java.io.ObjectStreamClass$Caches.localDescs WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase //

s6-rc: info: service legacy-services successfully started WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/usr/lib/unifi/lib/tomcat-embed-core-9.0.65.jar) to field java.io.ObjectStreamClass$Caches.localDescs WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: destroy called Exception in thread "Thread-9" java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:168) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1172) at com.ubnt.service.D.return(Unknown Source) at com.ubnt.ace.Launcher.Ò00000(Unknown Source) at java.base/java.lang.Thread.run(Thread.java:829) [11:51:00] INFO: Service UniFi Network Application exited with code 0 (by signal 0) [11:51:00] INFO: Now starting the UniFi Network Application... [11:51:00] INFO: Note: No add-on specific logs beyond this point. WARNING: An illegal reflective access operation has occurred **WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/usr/lib/unifi/lib/tomcat-embed-core-9.0.65.jar) to field java.io.ObjectStreamClass$Caches.localDescs** WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations **WARNING: All illegal access operations will be denied in a future release**

UPDATE: found it to be related to a 32 bit or 64bit OS. for reference for now if it works UI-Glenn of Ubiqity says it should not influence the current operations, but for some it apparently does matter:

https://community.ui.com/questions/Network-App-Wont-Start-Purge-And-Reinstall-Aborts-With-Same-Issue/a5f1d7f7-ee47-41fb-ba4b-65d57f07e2e9

and

https://community.ui.com/questions/java896-WARNING-An-illegal-reflective-access-operation-has-occurred/0d934c25-fbc9-409c-a830-5e3514fce1c6

adekloet commented 1 year ago

Updated to 2.8.0 add-on which Frenck (Thx!) just released. 1st boot Log seems that it has fixed java related warnings.

current 1st boot log: [11:48:14] INFO: Note: No add-on specific logs beyond this point. 11:48:24,013 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Could NOT configuration file [/usr/lib/unifi/logback-access.xml] using property "catalina.base" 11:48:24,013 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Could NOT configuration file [/usr/lib/unifi/logback-access.xml] using property "catalina.home" 11:48:24,014 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Found [logback-access.xml] as a resource. 11:48:24,020 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@4417af13 - URL [jar:file:/usr/lib/unifi/lib/ace.jar!/logback-access.xml] is not of type file 11:48:24,057 |-INFO in ch.qos.logback.access.joran.action.ConfigurationAction - debug attribute not set 11:48:24,058 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 11:48:24,059 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [access_log] 11:48:24,066 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@d48673 - No compression will be used 11:48:24,071 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.access.PatternLayoutEncoder] for [encoder] property 11:48:24,118 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[access_log] - Active log file name: logs/access.log 11:48:24,118 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[access_log] - File property is set to [logs/access.log] 11:48:24,120 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [access_log] to ch.qos.logback.access.tomcat.LogbackValve[null] 11:48:24,120 |-INFO in ch.qos.logback.access.joran.action.ConfigurationAction - End of configuration. 11:48:24,121 |-INFO in ch.qos.logback.access.joran.JoranConfigurator@548d5ed3 - Registering current configuration as safe fallback point 11:48:24,121 |-INFO in ch.qos.logback.access.tomcat.LogbackValve[null] - Done configuring

The controller seems to working as expected.

frenck commented 1 year ago

These are INFO messages, I'm not sure if those need to be addressed though.

github-actions[bot] commented 11 months ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!