Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-14057

OpenNMS points to the wrong URL when trying to generate graphs

    XMLWordPrintable

Details

    • Horizon 22 - March 16 - 30
    • Backlog

    Description

      When starting the latest snapshot of Horizon 30 via Docker (i.e., opennms/horizon:bleeding, I get "null" on the graphs page.

      To reproduce the problem, start a simple lab via Docker, for instance:

      ---
      services: 
      
        database: 
          container_name: database
          hostname: database
          image: postgres:12
          environment: 
          - POSTGRES_HOST=database
          - POSTGRES_PORT=5432
          - POSTGRES_USER=postgres
          - POSTGRES_PASSWORD=postgres
          ports: 
          - 5432:5432
          healthcheck: 
            test: pg_isready -U postgres
            interval: 5s
            timeout: 1s
            retries: 10
      
        opennms: 
          container_name: opennms
          hostname: opennms
          image: opennms/horizon:bleeding
          depends_on: 
            database: 
              condition: service_healthy
          command: [ -s ]
          ports: 
          - 8980:8980
          - 8101:8101
          environment: 
          - POSTGRES_HOST=database
          - POSTGRES_PORT=5432
          - POSTGRES_USER=postgres
          - POSTGRES_PASSWORD=postgres
          - JAVA_OPTS=-Xms4096m -Xmx4096m -XX:+UseG1GC -XX:+UseStringDeduplication
          healthcheck: 
            test: curl -f -I http://localhost:8980/opennms/login.jsp
            interval: 30s
            timeout: 1s
            retries: 10
      

      As you can see, I'm using the defaults (no changes in OpenNMS configuration besides access to the database).

      By default, OpenNMS will add a node to monitor itself. You can add more nodes if you need them. From the node page, when you click on Resource Graphs, then either select a few and click Graph Selection or use Graph All, the URL you'll see on the Browser's navigation bar has "null" instead of "graph/results.htm" which is what OpenNMS must use.

      http://localhost:8980/opennms/null?generatedId=94118d42-d552-3a3e-b541-b2a006ae5826&reports=all
      

      If you manually update the URL, I can see the graphs appropriately rendered.

      http://localhost:8980/opennms/graph/results.htm?generatedId=94118d42-d552-3a3e-b541-b2a006ae5826&reports=all
      

      I'm having issues compiling OpenNMS from source, so I don't know if the problem is associated with the Docker deployment or not.

      I even tried using a Private Browser Tab to discard potential cache-related problems, and the problem persists.

      Attachments

        Issue Links

          Activity

            People

              aramos-vizcarra Alberto
              agalue Alejandro Galue
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.