Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-39275

LicenseUtil.getHostName() is executing the "hostname" command which is not available in some Win environments

    Details

      Description

      In some windows environments ths getHostName() method returns null. There are other ways to figure out the hostname (e.g. InetAddress.getLocalHost().getHostName()) and we should fall back to that method.

      Steps to reproduce:

      1-Disable permissions for "hostname" command (In Linux: chmod -r -x /bin/hostname).
      2-Enter "Control Panel" -> Apps -> License Manager.
      3-Check for an exception in logs. You'll see there is no "Hostname" value in shown page.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 11 weeks, 5 days ago

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.0 CE B3