Tento příspěvek je o tom, že se WebLogic nespouští. Takže to napravíme.
Nesnáším javu a její ekosystém. Před několika dny jednomu z našich WebLogic došel diskový prostor a proces selhal.
WebLogic se nespustí – problém
Poté, co jsme zvětšili náš disk, oddíl a souborový systém, WebLogic stále odmítá začít s nějakou podivnou zprávou:
Connecting to t3://localhost:7001 with userid weblogic ... This Exception occurred at some date and time. javax.naming.CommunicationException: Failed to initialize JNDI context, tried 1 time or times totally, the interval of each time is 0ms.. t3://localhost:7001: Destination 127.0.0.1, 7001 unreachable.; nested exception is:. <------>java.net.ConnectException: Connection refused (Connection refused); No available router to destination.; nested exception is:. <------>java.rmi.ConnectException: No available router to destination. [Root exception is java.net.ConnectException: t3://localhost:7001: Destination 127.0.0.1, 7001 unreachable.; nested exception is:. <------>java.net.ConnectException: Connection refused (Connection refused); No available router to destination.; nested exception is:. <------>java.rmi.ConnectException: No available router to destination.] --- Error al conectar al AdminServer, intentando iniciar... --- Already connected to a Node Manager Starting server AdminServer ... This Exception occurred at some date and time. weblogic.nodemanager.NMException: Received error message from Node Manager Server: [Server start command for WebLogic server 'AdminServer' failed due to: [Server failed to start up but Node Manager was not aware of the reason]. Please check Node Manager log and/or server
Z nějakého důvodu neexistovala trasa do místního stroj(!). Alespoň to tvrdil Weblogic a Weblogic se nespustil. Pro případ, že jsem dvakrát zkontroloval /etc/hosts soubor, abyste zjistili, zda existuje záznam pro localhost, a samozřejmě jeden existuje.
Ta chyba o tom, že žádný směrovač k cíli se neopakuje znovu a znovu. Podívejme se na protokol správce uzlů:
<INFO> <base_domain> <AdminServer> <Starting WebLogic server with command line: $DOMAIN/bin/startWebLogic.sh > <INFO> <base_domain> <AdminServer> <Working directory is '$DOMAIN'> <INFO> <base_domain> <AdminServer> <Server output log file is '$DOMAIN/servers/AdminServer/logs/AdminServer.out'> <INFO> <base_domain> <AdminServer> <The server 'AdminServer' with process id 5793 is no longer alive; waiting for the process to die.> <INFO> <base_domain> <AdminServer> <Server failed during startup. It may be retried according to the auto restart configuration.> <INFO> <base_domain> <AdminServer> <Server failed but will not be restarted because the maximum number of restart attempts has been exceeded> <WARNING> <Server start command for WebLogic server 'AdminServer' failed due to: [Server failed to start up but Node Manager was not aware of the reason]. Please check Node Manager log and/or server 'AdminServer' log for detailed information.
Jedinou užitečnou informací v protokolu správce uzlů, kterou jsem našel, je cesta k protokolu AdminServeru. Tento protokol administrátorského serveru je plný těch opravdu dlouhých zpráv o ladění Java, které téměř nic neříkaly. Ale v celém tom textu mě něco upoutalo:
(...) <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason: Error reading replicas property file, the file may be corrupted - original Exception: java.lang.NumberFormatException with message: null> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED.> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down.> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN.> (...)
Po několika minutách googlování jsem našel příčinu, název souboru a řešení této chyby:existuje tento soubor $DOMAIN/servers/AdminServer/data/ldap/conf/replicas.prop to bylo prázdné, v mém případě nepoškozené, ale prázdné, prázdné jako ve velikosti nula bajtů. A to je důvod, proč se WebLogic nespustil.
WebLogic se nespouští – řešení
Řešení? odstraňte nebo přejmenujte ten zatracený soubor a zkuste znovu restartovat WebLogic a tento soubor bude znovu vytvořen. Nebo možná nenávidím Javu (možná), ale nesnáším weblogiku.
Takže víte, jak opravit, že se WebLogic nespouští.