<%@ page contentType="text/html; charset=UTF-8" %> <%-- - - Copyright (C) 2004-2008 Jive Software, 2016-2025 Ignite Realtime Foundation. All rights reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --%> <%@ page import="org.jivesoftware.admin.AdminConsole"%> <%@ page import="org.jivesoftware.openfire.Connection"%> <%@ page import="org.jivesoftware.openfire.JMXManager" %> <%@ page import="org.jivesoftware.openfire.XMPPServer" %> <%@ page import="org.jivesoftware.openfire.filetransfer.proxy.FileTransferProxy" %> <%@ page import="org.jivesoftware.openfire.keystore.IdentityStore" %> <%@ page import="org.jivesoftware.openfire.mediaproxy.MediaProxyService" %> <%@ page import="org.jivesoftware.openfire.spi.ConnectionListener" %> <%@ page import="org.jivesoftware.openfire.spi.ConnectionType" %> <%@ page import="org.jivesoftware.openfire.update.Update" %> <%@ page import="org.jivesoftware.openfire.update.UpdateManager" %> <%@ page import="java.util.List" %> <%@ page import="org.jivesoftware.openfire.net.DNSUtil" %> <%@ page import="org.xmpp.packet.JID" %> <%@ page import="org.jivesoftware.openfire.ConnectionManager" %> <%@ page import="org.jivesoftware.openfire.spi.ConnectionManagerImpl" %> <%@ page import="org.jivesoftware.admin.servlet.BlogPostServlet" %> <%@ page import="org.jivesoftware.openfire.net.SrvRecord" %> <%@ page import="java.net.InetAddress" %> <%@ page import="java.net.UnknownHostException" %> <%@ page import="org.jivesoftware.util.*" %> <%@ page import="java.util.concurrent.Future" %> <%@ page import="java.util.concurrent.TimeUnit" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <%@ taglib uri="admin" prefix="admin" %> <%-- Define page bean for header and sidebar --%> <% // Simple logout code if (ParamUtils.getBooleanParameter(request, "logout")) { session.removeAttribute("jive.admin.authToken"); response.sendRedirect("index.jsp"); return; } %> <%-- Define Administration Bean --%> <% webManager.init(request, response, session, application, out); %> <% // Get parameters // boolean serverOn = (webManager.getXMPPServer() != null); ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager(); FileTransferProxy fileTransferProxy = XMPPServer.getInstance().getFileTransferProxy(); MediaProxyService mediaProxyService = XMPPServer.getInstance().getMediaProxyService(); boolean rssEnabled = BlogPostServlet.ENABLED.getValue();; pageContext.setAttribute("memoryUsageAfterLastGC", MemoryUsageMonitor.getInstance().getMemoryUsageAfterLastGC()); %> <fmt:message key="index.title"/> <% if (rssEnabled) { %> <% } %> <% UpdateManager updateManager = XMPPServer.getInstance().getUpdateManager(); Update serverUpdate = updateManager.getServerUpdate(); pageContext.setAttribute( "serverUpdate", serverUpdate ); pageContext.setAttribute( "hasPluginWarnings", XMPPServer.getInstance().getPluginManager().hasLoadWarnings()); // Check if Blowfish migration is needed pageContext.setAttribute( "needsBlowfishMigration", JiveGlobals.isBlowfishMigrationNeeded() ); %>


" /> "/>

" /> " />

<% if (rssEnabled) { %> <% } %>
<% if (serverOn) { %> <% } %>
<% long now = System.currentTimeMillis(); long lastStarted = webManager.getXMPPServer().getServerInfo().getLastStarted().getTime(); long uptime = now - lastStarted; String uptimeDisplay = StringUtils.getElapsedTime(uptime); %> <% if (uptimeDisplay != null) { %> <%= uptimeDisplay %> -- started <% } %> <%= JiveGlobals.formatDateTime(webManager.getXMPPServer().getServerInfo().getLastStarted()) %>
<%= AdminConsole.getAppName() %> <%= AdminConsole.getVersionString() %>
<%= JiveGlobals.getHomePath() %>
<% final IdentityStore identityStore = XMPPServer.getInstance().getCertificateStoreManager().getIdentityStore( ConnectionType.SOCKET_C2S ); %> <% try { %> <% if (!identityStore.containsDomainCertificate()) {%> <fmt:message key=" title="">  <% } %> <% } catch (Exception e) { %> <fmt:message key=" title="">  <% } %> <% try { String whatevs = JID.domainprep(webManager.getXMPPServer().getServerInfo().getXMPPDomain()); } catch (Exception e) { %> <fmt:message key=" title="">  <% } %>
 
<% String vmName = System.getProperty("java.vm.name"); if (vmName == null) { vmName = ""; } else { vmName = " -- " + vmName; } %> <%= System.getProperty("java.version") %> <%= System.getProperty("java.vendor") %><%= vmName %>
<%= application.getServerInfo() %>
<% try { String whatevs = JID.domainprep(webManager.getXMPPServer().getServerInfo().getHostname()); } catch (Exception e) { %> <fmt:message key=" title="">  <% } %> <% final Future dnsIssueFuture = TaskEngine.getInstance().submit(() -> { // Determine if the DNS configuration for this XMPP domain needs to be evaluated. final String xmppDomain = XMPPServer.getInstance().getServerInfo().getXMPPDomain(); final String hostname = XMPPServer.getInstance().getServerInfo().getHostname(); boolean dnsIssue = false; if (!xmppDomain.equalsIgnoreCase(hostname)) { final List dnsSrvRecords = DNSUtil.srvLookup("xmpp-client", "tcp", xmppDomain); dnsIssue = dnsSrvRecords.stream().anyMatch(r -> hostname.equalsIgnoreCase(r.getHostname())); if (!dnsIssue) { for (final SrvRecord dnsSrvRecord : dnsSrvRecords) { try { InetAddress.getAllByName(dnsSrvRecord.getHostname()); } catch (UnknownHostException e) { dnsIssue = true; break; } } } else { dnsIssue = false; } } return dnsIssue; }); // Only attempt to detect DNS issues for a short time, to not delay rending this primary landing page for long. boolean showDnsWarning; try { showDnsWarning = dnsIssueFuture.get(1, TimeUnit.SECONDS); } catch (Throwable e) { showDnsWarning = false; } if ( showDnsWarning ) { %> DNS configuration appears to be missing or incorrect. <% } %>
<%= System.getProperty("os.name") %> / <%= System.getProperty("os.arch") %>
<%= JiveGlobals.getLocale() %> / <%= JiveGlobals.getTimeZone().getDisplayName(JiveGlobals.getLocale()) %> (<%= (JiveGlobals.getTimeZone().getRawOffset()/1000/60/60) %> GMT)
<%= System.getProperty("user.name") %>


<% for ( ConnectionListener connectionListener : connectionManager.getListeners() ) { if ( !connectionListener.isEnabled() ) { continue; } pageContext.setAttribute( "connectionListener", connectionListener ); final String interfaceName; if (connectionListener.getBindAddress() == null || connectionListener.getBindAddress().isAnyLocalAddress() ) { interfaceName = LocaleUtils.getLocalizedString("ports.all_ports"); } else { interfaceName = connectionListener.getBindAddress().getHostName(); } %> <% } final String interfaceName; if (((ConnectionManagerImpl)connectionManager).getListenAddress() == null || ((ConnectionManagerImpl)connectionManager).getListenAddress().isAnyLocalAddress() ) { interfaceName = LocaleUtils.getLocalizedString("ports.all_ports"); } else { interfaceName = ((ConnectionManagerImpl)connectionManager).getListenAddress().getHostName(); } %> <% if (fileTransferProxy.isProxyEnabled()) { %> <% } %> <% if (mediaProxyService.isEnabled()) { %> <% } %> <% if (JMXManager.isEnabled()) { %> <% } %>
 
<%= interfaceName %> <%= connectionListener.getPort() %> <% if ( connectionListener.getTLSPolicy().equals( Connection.TLSPolicy.disabled ) ) { %> <% } else { %> <fmt:message key=" title=""/> <% } %> <% final String typeName = switch (connectionListener.getType()) { case SOCKET_C2S -> LocaleUtils.getLocalizedString("ports.client_to_server"); case SOCKET_S2S -> LocaleUtils.getLocalizedString("ports.server_to_server"); case COMPONENT -> LocaleUtils.getLocalizedString("ports.external_components"); case WEBADMIN -> LocaleUtils.getLocalizedString("ports.admin_console"); case BOSH_C2S -> LocaleUtils.getLocalizedString("ports.http_bind"); case CONNECTION_MANAGER -> LocaleUtils.getLocalizedString("ports.connection_manager"); default -> "(unspecified)"; }; %> <%=typeName%>
<%= interfaceName %> <%= fileTransferProxy.getProxyPort() %>
<%= interfaceName %> <%= mediaProxyService.getMinPort() %> - <%= mediaProxyService.getMaxPort() %>
<%= interfaceName %> <%= JMXManager.getPort() %> <% if (JMXManager.isSecure()) { %><fmt:message key=" title=""/><% } else { %><% } %>

">