Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECONNECTREFUSED ERROR #44

Closed
Zaka-Ullah opened this issue May 24, 2022 · 8 comments
Closed

ECONNECTREFUSED ERROR #44

Zaka-Ullah opened this issue May 24, 2022 · 8 comments

Comments

@Zaka-Ullah
Copy link

ECCENECT refused error ocurred on
const toPDF = pipe(gotenberg('http://localhost:3000/forms/chromium'),convert,html,please)
toPDF('...').catch(error=>{console.log(error)})

@yumauri
Copy link
Owner

yumauri commented May 25, 2022

Hello! Did you actually launch Gotenberg instance on localhost, port 3000?

@Zaka-Ullah
Copy link
Author

Zaka-Ullah commented May 25, 2022 via email

@yumauri
Copy link
Owner

yumauri commented May 25, 2022

This library is a client for Gotenberg, and cannot be used without it.
Gotenberg — is a completely separate software tool, and you need to run it as well.
Check its webpage — https://gotenberg.dev/

Although this library is not fully compatible with latest Gotenberg version, there are ways to use it anyway.
See #32 (comment)

@Zaka-Ullah
Copy link
Author

i have install it on my express server with npm install gotenberg-js-client and import modules according to your latest documentation and error arise of ecconecrefused on port localhost:3000

@yumauri
Copy link
Owner

yumauri commented May 25, 2022

And also you need to run Gotenberg itself, on localhost, port 3000.
Like this:

docker run --rm -p 3000:3000 thecodingmachine/gotenberg:6

@Zaka-Ullah
Copy link
Author

thanks

@Zaka-Ullah
Copy link
Author

Zaka-Ullah commented May 30, 2022 via email

@Zaka-Ullah Zaka-Ullah reopened this May 30, 2022
@yumauri
Copy link
Owner

yumauri commented May 30, 2022

This is up to you and your environment setup.

If you run Gotenberg on port 3000 — use 3000 in connection string.
If you run Gotenberg on other port — use this port in connection string accordingly.
If you run Gotenberg on different machine — use this machine's IP address and port instead of localhost:×××× (and setup routing).

Note, if you use docker image thecodingmachine/gotenberg:6 (as I wrote you), you can follow README, this is image with Gotenberg version 6, and library is compatible with it.

If you use docker image gotenberg/gotenberg:7 (as written in latest documentation) — only in this case you should use workarounds from issue #32, for this is Gotenberg version 7.

@yumauri yumauri closed this as completed Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants