Our blazing fast Grid component built with pure JavaScript


Post by Webethics »

Hello

The export pdf feature is working fine with our local machine as we are following this link to implement the export pdf functionality.

https://www.bryntum.com/docs/grid/#Grid/feature/export/PdfExport

we are using the below command to load the resources

node ./src/server.js -h 8080 -r web/application/styles

Everything is working fine on our local machine but when we using the same commands on the server getting some error.

Please help us to solve the issue on the server machine.

Thanks

Attachments
Screenshot for starting the node server.
Screenshot for starting the node server.
http-server.png (184.84 KiB) Viewed 1069 times
Screenshot for error.
Screenshot for error.
connection_refushed.png (77.25 KiB) Viewed 1069 times

Post by saki »

It is still trying to access https://localhost:8080 but if you are running the pdf server elsewhere, you need to reconfigure pdfExportFeature to access the url/port where the server is running.

As to npm errors, try to remove node_modules, package-lock.json, run npm cache clean --force and then install and runt it again.


Post by Webethics »

Hello

Our PDF server is running on the same port 'https://localhost:8080'.


Post by saki »

It looks that something is wrong while npm tries to install hummus which is required for the export server. We would recommend to fix the npm error first and then to check the complete log.

Did you try the npm-related commands from the previous post? Regarding npm, can also refer to this guide: https://bryntum.com/docs/grid/#Grid/guides/npm-repository.md


Post by Webethics »

I have run the following commands.

  1. rm -rf node_modules/
  2. rm -rf package-lock.json
  3. npm install
  4. cd resources/js/custom-packages/bryntum-grid
  5. cd examples/_shared/server
  6. Run below commands in directory resources/js/custom-packages/bryntum-grid/examples/_shared/server
    npm install node-pre-gyp -g
    sudo npm i hummus
    rm -rf node_modules/
    rm -rf package-lock.json
    npm cache clean --force
    npm install forever -g
    sudo npm install --unsafe --perm && forever start ./src/server.js -h 8080 -r /var/www/html/root/resources

Post by Maxim Gorkovsky »

Hello.
It appears that export server doesn't work for you due to npm failing to install packages. I'd recommend to do a regular npm i and then check complete log to find the cause. If server is up and running, you should verify URL. Your JS application should point to the correct export server address. If address is ok, I'd recommend to run server in verbose mode and check log inside the server directory:

node ./src/server.js --level=verbose

Post by Webethics »

Hello

I have run the "node ./src/server.js --level=verbose" command and it gives the error
that the port is already used. Please see the below screenshot. I have killed the port with the command 'sudo kill -9 $(sudo lsof -t -i:8080)', but still get the same error.

So can you please let me know how we can remove this exception?

Query: If on the server the same port is already used by other applications, then how can we manage the pdf export server on the new port.

Thanks

Attachments
address alreay in use.png
address alreay in use.png (19.7 KiB) Viewed 1000 times

Post by saki »

There is currently no automatic handling of this situation on the part of server; it just attempts to bind port as set on the command line.


Post by Webethics »

Now, I have got the following error

https://suprapharm.webethics.online:8080/ net::ERR_SSL_PROTOCOL_ERROR

Please check and let me know. Thank you!


Post by Maxim Gorkovsky »

Hello.

Query: If on the server the same port is already used by other applications, then how can we manage the pdf export server on the new port.

Please see examples/_shared/server/README.md, it has a section documenting options accepted by the server.

https://suprapharm.webethics.online:8080/ net::ERR_SSL_PROTOCOL_ERROR

Please check and let me know. Thank you!

Have you checked SSL certificate expiration date? You might want to generate a new one.


Post Reply