Closed sOblivionsCall closed 4 years ago
this snippet from logs may be the issue:
Ookla GDPR and EULA accepted. Downloading Speedtest CLI. wget: bad address 'bintray.com' tar: can't open 'speedtest.tgz': No such file or directory cp: cannot stat 'speedtest': No such file or directory s6-applyuidgid: fatal: unable to exec /site/app/Bin/speedtest: No such file or directory
301 may be breaking wget?
curl bintray.com
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
can manually wget so not i'm starting to think it's DNS
wget https://bintray.com/ookla/download/download_file?file_path=ookla-speedtest-1.0.0-x86_64-linux.tgz -O speedtest.tgz
--2020-07-17 15:12:17-- https://bintray.com/ookla/download/download_file?file_path=ookla-speedtest-1.0.0-x86_64-linux.tgz
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving bintray.com (bintray.com)... 75.126.208.206
Connecting to bintray.com (bintray.com)|75.126.208.206|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://dl.bintray.com/ookla/download/ookla-speedtest-1.0.0-x86_64-linux.tgz?expiry=1595016768008&signature=arLNIc0goid19%2F9oWDdRdqcwaLgx4sN8BCXLG%2Fvh5F%2FUCjvP7pw3ORDmt3L7Lv%2BKH7pXFG9y8qoiQFPWtmOVYA%3D%3D [following]
--2020-07-17 15:12:18-- https://dl.bintray.com/ookla/download/ookla-speedtest-1.0.0-x86_64-linux.tgz?expiry=1595016768008&signature=arLNIc0goid19%2F9oWDdRdqcwaLgx4sN8BCXLG%2Fvh5F%2FUCjvP7pw3ORDmt3L7Lv%2BKH7pXFG9y8qoiQFPWtmOVYA%3D%3D
Resolving dl.bintray.com (dl.bintray.com)... 52.41.115.189, 52.88.32.158, 54.148.239.199, ...
Connecting to dl.bintray.com (dl.bintray.com)|52.41.115.189|:443... connected.
HTTP request sent, awaiting response... 302
Location: https://akamai.bintray.com/5f/5fe2028f0d4427e4f4231d9f9cf70e6691bb890a70636d75232fe4d970633168?__gda__=exp=1595017458~hmac=b057f05d0d221e37f46c1e0fad95c79f9e9f80d3460be94c6d9f7c6201f4f712&response-content-disposition=attachment%3Bfilename%3D%22ookla-speedtest-1.0.0-x86_64-linux.tgz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX19zEpjO73VsVxAM8EMTMaVxEYioTUWCZCVywVBHGT5q-hCn_z1Yzs_fjO8Q388eLUlJXaZDBKZIaFR-Kt2UiqslPB1ibOOqME5_0LOrg6nLoCkxnSZsNIRdDhribtKsFYBfgXSpvWJDEA&response-X-Checksum-Sha1=41ca19b8bea7614c27370453be3c6ef7ea7fa76a&response-X-Checksum-Sha2=5fe2028f0d4427e4f4231d9f9cf70e6691bb890a70636d75232fe4d970633168 [following]
--2020-07-17 15:12:18-- https://akamai.bintray.com/5f/5fe2028f0d4427e4f4231d9f9cf70e6691bb890a70636d75232fe4d970633168?__gda__=exp=1595017458~hmac=b057f05d0d221e37f46c1e0fad95c79f9e9f80d3460be94c6d9f7c6201f4f712&response-content-disposition=attachment%3Bfilename%3D%22ookla-speedtest-1.0.0-x86_64-linux.tgz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX19zEpjO73VsVxAM8EMTMaVxEYioTUWCZCVywVBHGT5q-hCn_z1Yzs_fjO8Q388eLUlJXaZDBKZIaFR-Kt2UiqslPB1ibOOqME5_0LOrg6nLoCkxnSZsNIRdDhribtKsFYBfgXSpvWJDEA&response-X-Checksum-Sha1=41ca19b8bea7614c27370453be3c6ef7ea7fa76a&response-X-Checksum-Sha2=5fe2028f0d4427e4f4231d9f9cf70e6691bb890a70636d75232fe4d970633168
Resolving akamai.bintray.com (akamai.bintray.com)... 23.50.129.116
Connecting to akamai.bintray.com (akamai.bintray.com)|23.50.129.116|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 930614 (909K) [application/gzip]
Saving to: ‘speedtest.tgz’
speedtest.tgz 100%[=======================================================================================================================>] 908.80K --.-KB/s in 0.09s
2020-07-17 15:12:18 (10.4 MB/s) - ‘speedtest.tgz’ saved [930614/930614]
I won't be able to help until tomorrow evening, maybe the day after. Do you get the same 301 when curling https://bintray.com
. Can you try running wget https://bintray.com/ookla/download/download_file?file_path=ookla-speedtest-1.0.0-x86_64-linux.tgz
and see if you get the same error?
I have 0 experience with k8 so not sure how much I can help there, but if you can maybe try running it as a standalone container and see if that works, then we can see if it's an issue with k8 or your system in general.
Edit: ignore the part about running the wget command then, just seen your latest comment
Is there a way to set a Dns resolver in k8? Might solve the issue
working through it still, starting to think it's an ndots issue with K8's i've seen this same behavior with Organizr
edit: confirmed ndots issue
Ookla GDPR and EULA accepted. Downloading Speedtest CLI.
Connecting to bintray.com (75.126.118.184:443)
Connecting to dl.bintray.com (54.148.239.199:443)
Connecting to akamai.bintray.com (23.50.129.116:443)
saving to 'speedtest.tgz'
speedtest.tgz 100% |********************************| 908k 0:00:00 ETA
'speedtest.tgz' saved
==============================================================================
You may only use this Speedtest software and information generated
from it for personal, non-commercial use, through a command line
interface on a personal computer. Your use of this software is subject
to the End User License Agreement, Terms of Use and Privacy Policy at
these URLs:
https://www.speedtest.net/about/eula
https://www.speedtest.net/about/terms
https://www.speedtest.net/about/privacy
==============================================================================
interesting, still getting a 502 even when the speedtest downloads. I can manually go and exec the speedtest and it appears as if it isn't accepting the eula:
kubectl exec -it speedtest-deployment-59b5c84ddf-chhlj /bin/bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl kubectl exec [POD] -- [COMMAND] instead.
root@speedtest-deployment-59b5c84ddf-chhlj:/# cd /site/app/Bin/
root@speedtest-deployment-59b5c84ddf-chhlj:/site/app/Bin# ./speedtest
==============================================================================
You may only use this Speedtest software and information generated
from it for personal, non-commercial use, through a command line
interface on a personal computer. Your use of this software is subject
to the End User License Agreement, Terms of Use and Privacy Policy at
these URLs:
https://www.speedtest.net/about/eula
https://www.speedtest.net/about/terms
https://www.speedtest.net/about/privacy
==============================================================================
Do you accept the license? [type YES to accept]: YES
License acceptance recorded. Continuing.
Speedtest by Ookla
Edit: redacted personal info
Yeah you have to run HOME=/config && ./speedtest
as the files marking your EULA agreement is stored there.
Seems weird your 502 error, is there anything in the nginx logs? You shouldn't get a 503 even if the speedtest binary is missing.
went ahead and did a sanity check, using pure docker everything does work. We can confirm it's something with K8's
docker run -it -p 8765:80 -e OOKLA_EULA_GDPR=true henrywhitaker3/speedtest-tracker /bin/bash
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...
usermod: no changes
-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/
Brought to you by linuxserver.io
-------------------------------------
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid: 911
User gid: 911
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing...
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing...
generating self-signed keys in /config/keys, you can replace these with your own keys if required
Generating a RSA private key
..............................+++++
......................+++++
writing new private key to '/config/keys/cert.key'
-----
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 40-config: executing...
Starting 2019/12/30, GeoIP2 databases require personal license key to download. Please manually download/update the GeoIP2 db and save as /config/geoip2db/GeoLite2-City.mmdb
[cont-init.d] 40-config: exited 0.
[cont-init.d] 50-speedtest: executing...
Ookla GDPR and EULA accepted. Downloading Speedtest CLI.
Connecting to bintray.com (75.126.208.206:443)
Connecting to dl.bintray.com (52.41.115.189:443)
Connecting to akamai.bintray.com (23.50.129.116:443)
saving to 'speedtest.tgz'
speedtest.tgz 100% |**********************************************************************************************************************************************************************| 908k 0:00:00 ETA
'speedtest.tgz' saved
==============================================================================
You may only use this Speedtest software and information generated
from it for personal, non-commercial use, through a command line
interface on a personal computer. Your use of this software is subject
to the End User License Agreement, Terms of Use and Privacy Policy at
these URLs:
https://www.speedtest.net/about/eula
https://www.speedtest.net/about/terms
https://www.speedtest.net/about/privacy
==============================================================================
License acceptance recorded. Continuing.
Copying latest site files to config
Database file not found! Creating empty database
Env file not found! Creating .env file
Running database migrations
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table (0.14 seconds)
Migrating: 2019_08_19_000000_create_failed_jobs_table
Migrated: 2019_08_19_000000_create_failed_jobs_table (0.01 seconds)
Migrating: 2020_04_03_104234_create_email_verifications_table
Migrated: 2020_04_03_104234_create_email_verifications_table (0.01 seconds)
Migrating: 2020_04_03_105113_create_active_sessions_table
Migrated: 2020_04_03_105113_create_active_sessions_table (0.01 seconds)
Migrating: 2020_04_08_120837_create_speedtests_table
Migrated: 2020_04_08_120837_create_speedtests_table (0.01 seconds)
Migrating: 2020_04_08_125647_create_jobs_table
Migrated: 2020_04_08_125647_create_jobs_table (0.03 seconds)
Migrating: 2020_05_18_211812_create_settings_table
Migrated: 2020_05_18_211812_create_settings_table (0.06 seconds)
Migrating: 2020_06_20_164502_update_speedtests_table
Migrated: 2020_06_20_164502_update_speedtests_table (0.05 seconds)
Migrating: 2020_06_21_171849_add_notifications_settings
Migrated: 2020_06_21_171849_add_notifications_settings (0.04 seconds)
Generating app key
Application key set successfully.
Generating JWT secret
jwt-auth secret [cYnXpTg6vaXS4vY9W4jUqMMI7tf2Omj7mMCqxUQbAsaS390ewKWKy4SUfmRyooP9] set successfully.
Slack webhook is unset
Telegram chat id and bot token unset
Base path is unset
[cont-init.d] 50-speedtest: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
crond[410]: crond (busybox 1.31.1) started, log level 5
[services.d] done.
root@f8dce0c2ba7d:/# [17-Jul-2020 20:55:20] NOTICE: fpm is running, pid 408
[17-Jul-2020 20:55:20] NOTICE: ready to handle connections
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
crond[410]: USER root pid 451 cmd php /config/www/artisan schedule:run >> /config/log/speedtest/cron.log
crond[410]: USER root pid 458 cmd php /config/www/artisan schedule:run >> /config/log/speedtest/cron.log
I have to be missing something we need in my deployment spec file
nothing to be found in the nginx logs, i don't think the app is starting even thought stdout says it is
root@speedtest-deployment-59b5c84ddf-chhlj:/var/log/nginx# cat error.log
2020/07/17 20:26:11 [alert] 387#387: detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
i have found the difference in logs but am not sure what is causing it:
Docker:
[services.d] starting services
crond[410]: crond (busybox 1.31.1) started, log level 5
[services.d] done.
root@f8dce0c2ba7d:/# [17-Jul-2020 20:55:20] NOTICE: fpm is running, pid 408
[17-Jul-2020 20:55:20] NOTICE: ready to handle connections
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
K8's
[cont-init.d] 50-speedtest: exited 0.
[cont-init.d] 99-custom-files: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-files: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
the docker implementation says that app is ready to serve traffic but the K8's implementation doesn't
going further down the rabbit hole, it looks like there is no laravel.log so i'm 99% sure fpm isn't starting at all
ok so have done all the troubleshooting i can think of at this point.
root@speedtest-deployment-646d7bf48-hb6gj:/config/log/nginx# ls
access.log error.log
root@speedtest-deployment-646d7bf48-hb6gj:/config/log/nginx# cat access.log error.log
root@speedtest-deployment-646d7bf48-hb6gj:/config/log# cd php/
root@speedtest-deployment-646d7bf48-hb6gj:/config/log/php# ls
root@speedtest-deployment-646d7bf48-hb6gj:/config/log# cd speedtest/
root@speedtest-deployment-646d7bf48-hb6gj:/config/log/speedtest# ls
cron.log queue.log
root@speedtest-deployment-646d7bf48-hb6gj:/config/log/speedtest# cat cron.log queue.log
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
Running scheduled command: App\Jobs\SpeedtestJob
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
Running scheduled command: App\Jobs\SpeedtestJob
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
Running scheduled command: App\Jobs\SpeedtestJob
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
No scheduled commands are ready to run.
[2020-07-18 01:00:07][1] Processing: App\Jobs\SpeedtestJob
[2020-07-18 01:00:36][1] Processed: App\Jobs\SpeedtestJob
[2020-07-18 02:00:04][2] Processing: App\Jobs\SpeedtestJob
[2020-07-18 02:00:30][2] Processed: App\Jobs\SpeedtestJob
[2020-07-18 03:00:02][3] Processing: App\Jobs\SpeedtestJob
[2020-07-18 03:00:34][3] Processed: App\Jobs\SpeedtestJob
root@speedtest-deployment-646d7bf48-hb6gj:/config/log/speedtest# ps -ef | grep fpm
root 405 1 0 00:38 ? 00:00:14 s6-supervise php-fpm
root 32066 31317 0 03:26 pts/1 00:00:00 grep fpm
My only assumption at this point is FPM is either hung or crashing but i have no idea how to find out how/why. Any ideas on next steps?
So will be a day or so until I have a computer in front of my to try figure it out, but this sounds like an issue with the base image for the container rather than anything I have changed about it. It might be worth creating an issue here or asking a question in their discord server.
Issue has been resolved, it wasn't an issue with your code or the base container. FPM was throwing a core dump error on startup it just wasn't showing up in any logs. Specifically the container needs huge pages to be enabled:
https://github.com/kubernetes/kubernetes/issues/71233
resources:
limits:
hugepages-2Mi: 100Mi
memory: 100Mi
I can make a PR with my K8's spec files and implementation documentation if you are interested in having that as a deployment option for your users.
Good to hear it's fixed.
Yeah that would be great, I haven't been asked by anyone else about k8, but it can't hurt to have some documentation for it.
not sure how you have your access setup, also i'm not very familiar with collaboration on public git repos, but it looks like i can't push due to an access issue:
git push --set-upstream origin feature/k8s_support
ERROR: Permission to henrywhitaker3/Speedtest-Tracker.git denied to sOblivionsCall.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Ah you need to fork the repo, make changes to it then PR from your repo to mine
will do , thanks
Describe the bug Nginx is giving a 502 when running on my K8's deployment.
To Reproduce Steps to reproduce the behavior: Create a K8's Deployment with the following:
Pod Logs:
Expected behavior Hit load balancer ip address and have the react front end presented
Screenshots If applicable, add screenshots to help explain your problem.
Context
Additional context Rancher K8's
Am happy to supply spec files and documentation to implement this on K8's via PR if you can help figured out the 502