librespeed / speedtest

Self-hosted Speed Test for HTML5 and more. Easy setup, examples, configurable, mobile friendly. Supports PHP, Node, Multiple servers, and more
https://librespeed.org
GNU Lesser General Public License v3.0
11.91k stars 2.16k forks source link

The new troubleshooting general #218

Open adolfintel opened 5 years ago

adolfintel commented 5 years ago

If you need troubleshooting, send me an email at info@fdossena.com, or use this thread. Please don't make new issues if you just need help.

majerus1223 commented 5 years ago

Why is it required to run a docker-compose build instead of just pulling the image from docker hub? Thanks!

adolfintel commented 5 years ago

@majerus1223 you can just pull the image, I should update the readme.

majerus1223 commented 5 years ago

One other thing to mention if you do not have a volume setup and use the docker-compose file you have listed you receive a 404. Not really sure what I should be passing to the volume. If you comment out the volumes the container will run fine from docker hub

` volumes:

adolfintel commented 5 years ago

I must have messed it up when I did the last update. Do you want to send a PR to fix it?

ryanbohn commented 5 years ago

Im not sure if this is just me, but I've tried this speed test tool on a few websites, including my own web server, and each time the upload speed appears to be half of what is anticipated, or what is measured in other speed test tools. Am I missing something?

adolfintel commented 5 years ago

@ryanbohn that's a new one for sure. Does this happen on my demo? What's the expected upload? What can you tell me about your setup? (OS, internet connection, browser, ...)

ryanbohn commented 5 years ago

@adolfintel it happens with Microsoft edge and internet explorer. Google chrome appears to be fine. Im running windows 10.

My internet connection is a enterprise grade 300d/300u and I see 300 on the download test, and about 150-170 on the upload to my providers speedtest site which is using your code: http://babylon.bb.telus.com/speedtest/

I also have your code running on my local web server, same issue. I have a 1gb link to it, and I get 1gb down and 380 up: https://rdcohelp.com/speedtest/

Your test server gives me 62 down and 22 up.

And as I mentioned, Chrome seems to work perfectly with all those sites, upload speed shows as it should.

adolfintel commented 5 years ago

@ryanbohn I checked both your links and they seem to work fine on Firefox and IE11. I'm really not sure why you're having this problem, is hardware acceleration enabled?

barto95100 commented 5 years ago

Hi,

I install but theTelemetry don't work.

I start a test and in Webpage don't have the result telemetry

do you have an idea of the problem ?

thank's

adolfintel commented 5 years ago

@barto95100 I need some information to help you:

barto95100 commented 5 years ago

Hi,

What database are you using? Mysql-server (MariaDB)

Did you configure telemetry_settings.php? YEs Telemetry is configured with login/password Root Account

Did you import the database file (if necessary)? Yes I import the telemetry_.......sql with this command -> mysql -uroot -p speedtest < telemetry_mysql.xxxxxx.sql

Is the PHP module for your database installed and enabled in php.ini?

the module is PHP7-mysql ?

adolfintel commented 5 years ago

@barto95100 run sudo phpenmod mysqli just to be sure that the module is enabled. Other than that it seems to be configured properly.

If that still doesn't work, look at the server logs to see what's happening.

Oh, and another thing, you are using one of the examples with telemetry enabled, right?

barto95100 commented 5 years ago

I run the command :

root@speedtest:/home/barto# phpenmod mysqli root@speedtest:/home/barto#

I use the template example-singleServer-full.html -> var/www/html/index.html

I view the log access apache and I have a error of Mysqli "Access Deniad to Mysql"

The problem is resolve (password don't match to pasword mysql loooool

thank's :)

Si-Richards commented 5 years ago

Hi Frederico,

Great project, thank you for sharing. Please, can you say if there is an easy way to limit access to your backends from only your frontend? Basically, so that only you can call your test servers and not someone else's front end.

Thanks so much

Simon

adolfintel commented 5 years ago

@Si-Richards Hi, In all php files in the backend folder, you'll find

Access-Control-Allow-Origin: *

Replace the asterisk with a list of allowed domains in all files.

Keep in mind that this will break compatibility with older browsers.

gerroon commented 5 years ago

Is it possible to reverse proxy the docker install via Apache?

adolfintel commented 5 years ago

@gerroon It should work, I haven't tried it myself though. You may have to edit getIP.php to get the original IP address from the header of the forwarded HTTP request.

gerroon commented 5 years ago

@adolfintel

Thanks I will try it.

ZeroCrash0 commented 5 years ago

@adolfintel First off, thanks very much for the speed test. Very handy!

In the Share Results area I get a link, like the following, and a broken image icon on the web page. The link is non-functional. Is this an appropriate link or have I just misconfigured something? http:///results/?id=1b8yxxx

Lastly, I've like to leverage the log column in the speedtest table inside of MySQL. Is it feasible to add a single form field on the speedtest page that a user inputs their name into before starting the test so that the name is logged with the speedtest results in the DB? Thanks again for the help and the product!

adolfintel commented 5 years ago

@Malthesis

In the Share Results area I get a link, like the following, and a broken image icon on the web page. The link is non-functional. Is this an appropriate link or have I just misconfigured something? http:///results/?id=1b8yxxx

That's not normal. The image not appearing indicates a server error (you're probably missing FreeType2) and the link is supposed to say http://yourwebsite/results/?id=whatever. It's the first time someone reports a problem with the generation of the link, exactly how are you running the test? (server, browser, etc.)

Is it feasible to add a single form field on the speedtest page that a user inputs their name into before starting the test so that the name is logged with the speedtest results in the DB?

Yes you can, you just have to modify the frontend to make use of the extra field in the telemetry. See test parameters, specifically telemetry_extra.

ZeroCrash0 commented 5 years ago

Thank you for the response. Sorry, for some reason, the paste didn't come through and that link you quoted is not the actual one. I'll try to past again. I think it is correct though given what you've said. http://speedtest.mydomain.com/results/?id=1b8y6cl That is actually what the link looks like and it gives me a 500 error when I try to use it.

adolfintel commented 5 years ago

@Malthesis Ok so the link generation is fine, you have a problem with the image generation itself. As I said, this is usually because you're missing FreeType2 in your PHP install. Check phpinfo to see if you have it.

ZeroCrash0 commented 5 years ago

Ok, thank you @adolfintel

yylzcom commented 5 years ago

How should I change the timezone? I tried:

  1. Change the timezone in php.ini
  2. Change the timezone of my VPS

None of these worked.

Any help would be high appreciate!

Best regards!

adolfintel commented 5 years ago

@yylzcom Timestamps are generated by the database. Specifically, since the timestamp field is of type timestamp, they are UTC timestamps. If you want to change that to your local timezone, simply change the type of that field to datetime.

yylzcom commented 5 years ago

@adolfintel Thank you for your reply.

I will modify my code to display in my timezone. It is like stored unix timestamp and is OK for me.

Thank you for your amazing code!

Little tip for those who face same timezone problem: The timstamp stored in MySQL is utc time, it is stored without timezone. However, when fetch from the data base, it will adjust to the timezone according to mysql setting(Unix timestamp is still without timezone).

MySQL timestamp fetched: 2019-08-21 2:16pm (convert to timezone of MySql) Unix timestamp fetched: 1566397006 (without time zone)

mysql> SELECT @@global.time_zone, @@session.time_zone;
mysql> SELECT @@system_time_zone;

Above command help me understand better. After changing system timezone, try reboot machine and/or restart MySQL.

I made a page for my readers to have a overview of speedtest result. Date and time dispaly in GMT+8(Asia/Hongkong).

https://speedtest.gubo.org

russmalloypers commented 5 years ago

@adolfintel Thanks for the tool! Hi my deployment was very straight forward: 1- Clone repo 2- Switch to docker branch 3- docker-compose up

Couple of questions: 1- Is there documentation on basic configuration changes? I'm running it on a server on my network and connect to the server IP on port 8888 and launch the test and I get 1000 mb up/down and 1 ms ping. I assume there is somewhere I can update config to give it a speed test location? something like speedtest.net 2- Is it possible to automate the test to run at a scheduled interval? 3- Is there any support for graphing or plotting the data?

adolfintel commented 5 years ago

@russmalloypers

1- Is there documentation on basic configuration changes?

Yes, all the documentation is in doc.md and on the wiki. What you're looking for is Multiple test points. The docker version is incomplete at the moment so you'll have to do a regular installation if you want to use it.

2- Is it possible to automate the test to run at a scheduled interval?

No, that is outside the scope of this test, this is meant for the end user who wants to test the speed of their internet connection. I recommend iperf if you want to do this.

3- Is there any support for graphing or plotting the data?

Yes, see example-singleServer-chart.html

robbychucky commented 5 years ago

@adolfintel I've just installed the speedtest on CentOS 7 and is working very good, thanks for this great tool! The only issue I am facing is that whenever I press the start button it takes around 1 minute to actually start performing the test, do you know if there is any related configuration which I'm missing in order for it to start the test immediatly after you press the button?

adolfintel commented 5 years ago

@robbychucky I think your problem is that getIP.php takes a long time to execute because it can't connect to ipInfo.io. Make sure your web server is allowed to connect.

robbychucky commented 5 years ago

@adolfintel thank you very much for your reply, Effectively the problem was that, now it is working perfectly!

StuartJeffery commented 4 years ago

Great tool THANK YOU. Is there a way of adjust the number of parallel connections used for the test? Not sure how many connections it uses per test??

adolfintel commented 4 years ago

@StuartJeffery Yes, you can set the xhr_dlMultistream and the xhr_ulMultistream parameters. See here for details: https://github.com/adolfintel/speedtest/wiki/Making-a-custom-front-end#test-parameters

StuartJeffery commented 4 years ago

Thank you for the fast reply..

Magroll commented 4 years ago

Hi, we are currently testing around with your Tool. And we have the same issue as ryanbohn mentioned in Juli. Testing with Chrome is fine, but testing with IE and Edge Upload, Ping and Jitter shows distingly worse data. Using an actual Win10 with a enterprise configured IE and Edge (client) on a Windows 2012 Server with IIS.

adolfintel commented 4 years ago

@Magroll Chromium-based browsers have a much better implementation of the Performance API so they're going to be more accurate in the ping and jitter test. That being said, how much different are they? And also, do you have hardware acceleration on the client?

stevehillin commented 4 years ago

Hi, Very cool tool, looking to replace a proprietary product with this. Is there a way to pass a URL that would end up in the postMessage to telemetry.php, something like: http://<speedtesturl>?item=12345 ? From there it would be easy to add a field to the db, the mysqli $stmt and the display. I don't know JS well enough but if you can point me in the right direction I'd really appreciate it!

adolfintel commented 4 years ago

@stevehillin Well there's the telemetry_extra field that lets you add any string you want to the telemetry. What are you trying to do exactly?

stevehillin commented 4 years ago

I want to send a person a link like this: http://myspeedtestserver.com?id=12345 ...where id is a unique identifier in my CMS. The idea is to send out a unique link as part of a pre-qualification process for hosted services. The user runs the speedtest and the results will reference my internal id, that way I don't have to get a report from the end user, a screenshot, etc.

adolfintel commented 4 years ago

@stevehillin I see. We don't support that at the moment, sorry.

stevehillin commented 4 years ago

OK, thanks for the info and fast response.

stevehillin commented 4 years ago

@adolfintel I did get it worked out. I used URLSearchParams to get the id param then added it to _settings in speedtest.js, then defined it in speedtest_worker.js as a setting and appeded the new field to the formdata. I then just needed to update results/telemetry.php and results/stats.php to write and query the new field.

Halfeez92 commented 4 years ago

Hi, I am not so well-versed in web programming, but if I want to host this on my server just for LAN speed test how can I edit the file? I just want the IP to show their LAN ip instead of WAN ip. Thanks

adolfintel commented 4 years ago

@Halfeez92 If you're accessing through LAN, it will show the local address, not the external one.

Halfeez92 commented 4 years ago

@Halfeez92 If you're accessing through LAN, it will show the local address, not the external one.

Okay I got it. But the speed I achieve only half of my bandwidth. My b/w is 50Mbps but I got only 25Mbps. is there any setting i have to change?

adolfintel commented 4 years ago

@Halfeez92 Make sure that garbage.php is working. If you go to https://yourServer/garbage.php?ckSize=100 it should download a 100MB file. If it doesn't, you're probably missing OpenSSL or you have a problem with PHP.

Halfeez92 commented 4 years ago

@Halfeez92 Make sure that garbage.php is working. If you go to https://yourServer/garbage.php?ckSize=100 it should download a 100MB file. If it doesn't, you're probably missing OpenSSL or you have a problem with PHP.

I host this speedtest on xampp. Btw i see the link you gave me is an https protocol. Can I just use the plain http protocol?

adolfintel commented 4 years ago

@Halfeez92 XAMPP should already have everything you need. You can use HTTP, of course

Halfeez92 commented 4 years ago

@adolfintel is there any chance I can remove this whitespace? i tried to change the margin in the css but it is still there.

image

adolfintel commented 4 years ago

@Halfeez92 Yes, in the CSS, find #test, you'll see margin-bottom:12em, replace it with what you prefer.

What is microsoft doing with my speedtest anyway? 😂