cancel
Showing results for 
Search instead for 
Did you mean: 
mzarate
Sisense Team Member
Sisense Team Member

Jasper Report when adding a template when installing on multi-node

Introduction

When using Reports Manager you have the option to configure and use Report Manager to use Jasper Reports. For that, you need to configure a dashboard with Jasper Template and then you can download Jasper Report as a PDF file.

Symptoms

When installing Jasper Reports on Sisense multi-node env, sometimes you may see the following error because Jasper Report can't generate a PDF template:

The error will show up in the external-plugins log:

[external-plugins-service] [45]:[SocketService][sisense-mongo] [/usr/src/app/node_modules/@sisense/sisense-mongo/mongo.util.js:382]

[] [mongoDB query stats: collection=jasperReports, command=insertOne, responseSize=1, took=3 ms] uncaughtException Error: connect ECONNREFUSED ::1:55111 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16)

Caught exception: Error: connect ECONNREFUSED ::1:55111 at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) { errno: -111, code: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 55111 }

Diagnosis

Based on the configuration file (/jasper-reports/v1/config.js), it tries to connect to "localhost" domain name.
If the "localhost" resolves to "::1" rather than "127.0.0.1" IP address.

In other words, if it uses IPv6 instead of IPv4, then you will see the error in the log.

The respective Jasper socket is listening to the IPv4 "127.0.0.1" address and refusing connections for IPv6 one.

Solution

Update the config.js to use instead of "localhost" for a host of export/status servers, to explicit "127.0.0.1" IP address, the file can be located under:

Admin Tab > Server & Hardware > File Management > external-plugins > apiPlugins > plugins > jasper-reports > v1 > config.js


module.exports = {
tempFilesPath: '/opt/sisense/storage/external-plugins/tmp',
exportServerConf: {
host: '127.0.0.1',
port: 55111,
threadsNumber: 1,
javaRuntime: {
xms: '1024m',
xmx: '4096m',
},
},
statusServerConf: {
host: '127.0.0.1',
port: 55110,
},
};

Conclusion

By making this change you ensure that the server will try to use IPv4 instead IPv6.

Version history
Last update:
‎09-06-2023 11:28 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: