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

Question. How to leave a process running on a remote server. #23

Closed
qSerkl opened this issue Mar 7, 2024 · 5 comments
Closed

Question. How to leave a process running on a remote server. #23

qSerkl opened this issue Mar 7, 2024 · 5 comments

Comments

@qSerkl
Copy link

qSerkl commented Mar 7, 2024

Hello. I have a problem, I want to leave running a process on a remote server with ubuntu, after some time after disconnecting the ssh connection xvfb dies and puppeteer-real-browser stops working. Is there any solution to this?

@zfcsoftware
Copy link
Owner

Hello, have you used pm2 and docker? When I test with pm2 it stays on all the time.

@qSerkl
Copy link
Author

qSerkl commented Mar 7, 2024

Hello, have you used pm2 and docker? When I test with pm2 it stays on all the time.

I keep it running using pm2, the nodejs script keeps running, but I get an error.

Error: connect ECONNREFUSED 127.0.0.1:43069
at puppeteer-real-browser/src/module/chromium.js:110:19

Is Docker going to be the solution? I've never used it

@zfcsoftware
Copy link
Owner

Hello, have you used pm2 and docker? When I test with pm2 it stays on all the time.

I keep it running using pm2, the nodejs script keeps running, but I get an error.

Error: connect ECONNREFUSED 127.0.0.1:43069 at puppeteer-real-browser/src/module/chromium.js:110:19

Is Docker going to be the solution? I've never used it

This error will happen on screenless servers due to Chromium issues. Docker gives you a solution. You can try using docker as described in the readme file.

@qSerkl
Copy link
Author

qSerkl commented Mar 7, 2024

Hello, have you used pm2 and docker? When I test with pm2 it stays on all the time.

I keep it running using pm2, the nodejs script keeps running, but I get an error.
Error: connect ECONNREFUSED 127.0.0.1:43069 at puppeteer-real-browser/src/module/chromium.js:110:19
Is Docker going to be the solution? I've never used it

This error will happen on screenless servers due to Chromium issues. Docker gives you a solution. You can try using docker as described in the readme file.

Thank you, that solved my problem. I don't know if it was necessary to install pm2 inside the docker and run the script through it, probably unnecessary, but I did that too...

@qSerkl qSerkl closed this as completed Mar 7, 2024
@iliyaZelenko
Copy link

Also you can get "Error: connect ECONNREFUSED" error if for some reason the browser failed to start. In my case, --load-extension= was specified incorrectly.

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

3 participants