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

[Solved] Chromium required on headless server #81

Closed
tblancher opened this issue Mar 4, 2023 · 1 comment
Closed

[Solved] Chromium required on headless server #81

tblancher opened this issue Mar 4, 2023 · 1 comment

Comments

@tblancher
Copy link

tblancher commented Mar 4, 2023

I understand by default puppeteer requires chromium. After installing the dependencies according to the puppeteer troubleshooting guide, fast would work, but it would merely time out. After running it in debug mode, i.e.

DEBUG=* fast --upload --single-line

I ran into an Inspector.targetCrashed error. After doing some googling, I determined I needed to install the chromium package, in order to pull in ALL of its dependencies (not just the direct ones seen with ldd). Once I did that, fast worked as expected.

It's sad to have to install a GUI program on a headless server. I saw where @sindresorhus had previously based fast-cli on PhantomJS, but it must have had some deficiencies I'm unaware of. A lot of the puppeteer troubleshooting suggests turning off headless mode, but that won't work for a headless server (locally, or in the cloud). I couldn't reproduce this initially on my laptop, but that's because it had chromium installed already.

I was able to fix this on two headless servers. My experience was on Arch Linux, but it should be the same for any other distribution. I wanted fast-cli to work since my ISP's technicians use fast.com for their speed testing (they openly told me not to use my ISP's speedtest server). I've tried speedtest-cli and iperf3 (against a public server) with unsatisfactory results. Once I got fast working on my first try my speed was quite good (870 Mbps ↓ / 390 Mbps ↑)! I intend to run periodic fast speedtests, and log it so I can see my average/maximum/minumum over time.

I post this for anyone else trying to use fast-cli on a headless server, and can't figure out why it doesn't work. I spent a good three hours trying to figure this out, by disabling the timeout, setting the user agent, and trying some other chromium flags.

EDIT: Make sure you run fast on a system with plenty of memory! I was running it on my router (only has 4GiB RAM) and that was limiting how fast fast could be. Running it on a server on my network (with 16GiB RAM) fares MUCH better.

@tblancher
Copy link
Author

Closing this issue after nearly five months.

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

1 participant