jsreport 2.7.2 web cannot be accessed.



  • jsreport 2.7.2. Configuration was all the defaults using http.

    1. Where can I look for issues?
    2. Is jsreport incorrectly configured?

    Using Windows 10 and Visual Studio Code, I followed the steps on https://jsreport.net/on-prem. When trying to access -http://localhost:5488/, I receive "Unable to connect".

    The logs do not show any failures/errors/etc. I tried to upload, I do not have the correct permissions.

    Here is the jsreport.config.json:

    {
      "store": {
        "provider": "fs"
      },
      "blobStorage": {
        "provider": "fs"
      },
      "logger": {
        "console": {
          "transport": "console",
          "level": "debug"
        },
        "file": {
          "transport": "file",
          "level": "info",
          "filename": "logs/reporter.log"
        },
        "error": {
          "transport": "file",
          "level": "error",
          "filename": "logs/error.log"
        }
      },
      "allowLocalFilesAccess": true,
      "reportTimeout": 60000,
      "templatingEngines": {
        "strategy": "http-server"
      },
      "extensions": {
        "express": {
          "enabled": false
        },
        "sample-template": {
          "createSamples": true
        },
        "scripts": {
          "strategy": "http-server"
        }
      }
    }
    


  • You seem to be missing the "httpPort" property.
    Can you try to add this and try to connect to http://localhost:5488 ?

    "httpPort": 5488
    


  • Still does not work.

    Latest configuration:

    {
      "store": {
        "provider": "fs"
      },
      "httpPort": 5488,
      "blobStorage": {
        "provider": "fs"
      },
      "logger": {
        "console": {
          "transport": "console",
          "level": "debug"
        },
        "file": {
          "transport": "file",
          "level": "info",
          "filename": "logs/reporter.log"
        },
        "error": {
          "transport": "file",
          "level": "error",
          "filename": "logs/error.log"
        }
      },
      "allowLocalFilesAccess": true,
      "reportTimeout": 60000,
      "templatingEngines": {
        "strategy": "http-server"
      },
      "extensions": {
        "express": {
          "enabled": false
        },
        "sample-template": {
          "createSamples": true
        },
        "scripts": {
          "strategy": "http-server"
        }
      }
    }
    

    Here is the logged file after attempting to access the URL in Firefox:

    2020-04-10T22:29:34.540Z - info: Initializing jsreport@2.7.2 in development mode using configuration file: jsreport.config.json
    2020-04-10T22:29:34.541Z - info: Searching for available extensions in C:\jsreport-testing\
    2020-04-10T22:29:34.550Z - info: Extensions location cache contains up to date information, skipping crawling in C:\Users\pdurbin.RCS\Documents\Projects\Investigation\jsreport-testing\
    2020-04-10T22:29:34.561Z - info: Found 35 extensions
    2020-04-10T22:29:34.861Z - info: Setting http-server strategy for rendering
    2020-04-10T22:29:35.062Z - info: Using extension authentication@2.4.2
    2020-04-10T22:29:35.112Z - info: Using extension cli@2.2.2
    2020-04-10T22:29:35.114Z - info: Using extension debug@2.1.3
    2020-04-10T22:29:35.117Z - info: Using extension freeze@2.0.0
    2020-04-10T22:29:35.120Z - info: Using extension handlebars@2.1.0
    2020-04-10T22:29:35.126Z - info: Using extension import-export@1.5.1
    2020-04-10T22:29:35.183Z - info: Using extension jsrender@2.1.1
    2020-04-10T22:29:35.184Z - info: Using extension tags@2.3.0
    2020-04-10T22:29:35.187Z - info: Using extension templates@2.3.2
    2020-04-10T22:29:35.191Z - info: Using extension authorization@2.2.6
    2020-04-10T22:29:35.196Z - info: Using extension base@2.0.2
    2020-04-10T22:29:35.198Z - info: Using extension browser-client@2.2.2
    2020-04-10T22:29:35.208Z - info: Using extension child-templates@1.3.1
    2020-04-10T22:29:35.214Z - info: Using extension chrome-pdf@1.7.1
    2020-04-10T22:29:35.299Z - info: Using extension data@2.2.0
    2020-04-10T22:29:35.302Z - info: Using extension docx@2.5.0
    2020-04-10T22:29:35.308Z - info: Using extension fs-store@2.7.2
    2020-04-10T22:29:35.458Z - info: Using extension licensing@2.2.1
    2020-04-10T22:29:35.466Z - info: Using extension pdf-utils@1.6.1
    2020-04-10T22:29:35.633Z - info: Using extension pptx@0.5.0
    2020-04-10T22:29:35.643Z - info: Using extension reports@2.2.1
    2020-04-10T22:29:35.648Z - info: Using extension static-pdf@0.3.1
    2020-04-10T22:29:35.652Z - info: Using extension studio@2.7.0
    2020-04-10T22:29:35.740Z - info: Using extension text@2.0.0
    2020-04-10T22:29:35.742Z - info: Using extension version-control@1.3.2
    2020-04-10T22:29:35.848Z - info: Using extension assets@1.5.2
    2020-04-10T22:29:35.868Z - info: Using extension html-to-xlsx@2.6.0
    2020-04-10T22:29:36.191Z - info: html-to-xlsx detected chrome as available html engine
    2020-04-10T22:29:36.191Z - info: Using extension scheduling@2.2.0
    2020-04-10T22:29:36.225Z - info: Using extension scripts@2.3.0
    2020-04-10T22:29:36.239Z - info: Using extension studio-theme-dark@0.3.0
    2020-04-10T22:29:36.241Z - info: Using extension xlsx@2.3.0
    2020-04-10T22:29:36.417Z - info: Using extension public-templates@2.1.0
    2020-04-10T22:29:36.427Z - info: Using extension resources@2.0.3
    2020-04-10T22:29:36.429Z - info: Using extension sample-template@2.5.1
    2020-04-10T22:29:36.433Z - info: Using general timeout for rendering (reportTimeout: 60000)
    2020-04-10T22:29:36.433Z - info: Using fs provider for template store.
    2020-04-10T22:29:36.437Z - info: fs store is persisting using fs
    2020-04-10T22:29:36.439Z - info: fs store is synchronizing using fs
    2020-04-10T22:29:36.447Z - info: fs store is loading data
    2020-04-10T22:29:36.527Z - info: fs store is initialized successfully
    2020-04-10T22:29:36.541Z - info: Verifying license key free
    2020-04-10T22:29:36.542Z - info: Using free license
    2020-04-10T22:29:36.553Z - info: reporter initialized
    2020-04-14T06:09:30.989Z - info: Initializing jsreport@2.7.2 in development mode using configuration file: jsreport.config.json
    2020-04-14T06:09:30.990Z - info: Searching for available extensions in C:\jsreport-testing\
    2020-04-14T06:09:30.996Z - info: Extensions location cache not found, crawling directories
    2020-04-14T06:09:33.190Z - info: Found 35 extensions
    2020-04-14T06:09:33.565Z - info: Setting http-server strategy for rendering
    2020-04-14T06:09:33.821Z - info: Using extension authentication@2.4.2
    2020-04-14T06:09:33.889Z - info: Using extension cli@2.2.2
    2020-04-14T06:09:33.891Z - info: Using extension debug@2.1.3
    2020-04-14T06:09:33.894Z - info: Using extension freeze@2.0.0
    2020-04-14T06:09:33.896Z - info: Using extension handlebars@2.1.0
    2020-04-14T06:09:33.900Z - info: Using extension import-export@1.5.1
    2020-04-14T06:09:33.968Z - info: Using extension jsrender@2.1.1
    2020-04-14T06:09:33.969Z - info: Using extension tags@2.3.0
    2020-04-14T06:09:33.972Z - info: Using extension templates@2.3.2
    2020-04-14T06:09:33.975Z - info: Using extension authorization@2.2.6
    2020-04-14T06:09:33.981Z - info: Using extension base@2.0.2
    2020-04-14T06:09:33.984Z - info: Using extension browser-client@2.2.2
    2020-04-14T06:09:33.988Z - info: Using extension child-templates@1.3.1
    2020-04-14T06:09:33.996Z - info: Using extension chrome-pdf@1.7.1
    2020-04-14T06:09:34.111Z - info: Using extension data@2.2.0
    2020-04-14T06:09:34.114Z - info: Using extension docx@2.5.0
    2020-04-14T06:09:34.120Z - info: Using extension fs-store@2.7.2
    2020-04-14T06:09:34.309Z - info: Using extension licensing@2.2.1
    2020-04-14T06:09:34.317Z - info: Using extension pdf-utils@1.6.1
    2020-04-14T06:09:34.519Z - info: Using extension pptx@0.5.0
    2020-04-14T06:09:34.524Z - info: Using extension reports@2.2.1
    2020-04-14T06:09:34.530Z - info: Using extension static-pdf@0.3.1
    2020-04-14T06:09:34.536Z - info: Using extension studio@2.7.0
    2020-04-14T06:09:34.631Z - info: Using extension text@2.0.0
    2020-04-14T06:09:34.633Z - info: Using extension version-control@1.3.2
    2020-04-14T06:09:34.755Z - info: Using extension assets@1.5.2
    2020-04-14T06:09:34.778Z - info: Using extension html-to-xlsx@2.6.0
    2020-04-14T06:09:35.217Z - info: html-to-xlsx detected chrome as available html engine
    2020-04-14T06:09:35.218Z - info: Using extension scheduling@2.2.0
    2020-04-14T06:09:35.259Z - info: Using extension scripts@2.3.0
    2020-04-14T06:09:35.267Z - info: Using extension studio-theme-dark@0.3.0
    2020-04-14T06:09:35.270Z - info: Using extension xlsx@2.3.0
    2020-04-14T06:09:35.494Z - info: Using extension public-templates@2.1.0
    2020-04-14T06:09:35.497Z - info: Using extension resources@2.0.3
    2020-04-14T06:09:35.499Z - info: Using extension sample-template@2.5.1
    2020-04-14T06:09:35.503Z - info: Using general timeout for rendering (reportTimeout: 60000)
    2020-04-14T06:09:35.504Z - info: Using fs provider for template store.
    2020-04-14T06:09:35.508Z - info: fs store is persisting using fs
    2020-04-14T06:09:35.510Z - info: fs store is synchronizing using fs
    2020-04-14T06:09:35.517Z - info: fs store is loading data
    2020-04-14T06:09:35.594Z - info: fs store is initialized successfully
    2020-04-14T06:09:35.609Z - info: Verifying license key free
    2020-04-14T06:09:35.611Z - info: Using free license
    2020-04-14T06:09:35.615Z - info: reporter initialized
    


  • I reran jsreport configure specifying a different port. Here are my answers for the configuration which is working:

    $ jsreport configure
    ? Do you want to enable web server? Yes
    ? Which protocol should web server use? http
    ? Specify the http port for web server: 54321
    ? Do you want to enable authentication in web server? No
    ? Do you want to persist jsreport objects and logs on disk? Yes everything saved on disk
    ? Can jsreport trust the rendering requests and allow access to local files and modules? Yes
    ? Should jsreport reuse processes to speed up the rendering? Yes
    ? Specify the general timeout for rendering: 60000
    ? Would you like that we create some default examples for you? Yes
    

    Comparing the failing configuration to the current, the failing configuration had web server authentication section. How I do not know? Here is the original jsreport configure:

    $ jsreport configure
    ? Do you want to enable web server? Yes
    ? Which protocol should web server use? http
    ? Specify the http port for web server: 5488
    ? Do you want to enable authentication in web server? No
    ? Do you want to persist jsreport objects and logs on disk? Yes everything saved on disk
    ? Can jsreport trust the rendering requests and allow access to local files and modules? Yes
    ? Should jsreport reuse processes to speed up the rendering? Yes
    ? Specify the general timeout for rendering: 60000
    ? Would you like that we create some default examples for you? Yes
    config saved in: C:\jsreport-testing\jsreport.config.json
    

    DIfference between the working configuration and the original configuration:

    $ diff jsreport.config.json original-jsreport.config.json 
    2d1
    <   "httpPort": 54321,
    5a5
    >   "httpPort": 5488,
    31,36c31
    <     "authentication": {
    <       "cookieSession": {},
    <       "admin": {
    <         "username": "admin",
    <         "password": "password"
    <       },
    ---
    >     "express": {
    

    The original/failing configuration does not have the authentication properties.

    This can be considered resolved.



  • Why do you have the express extension disabled? This isn't something we would generate from jsreport configure.
    Try to enable it.

    "extensions": {
      "express": {
            "enabled": true
      }
    }
    

Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.