I'm trying to restart my mysql/mysqld service on my ubuntu server but I keep getting the same errors.
I'm using mysql version: 8.0.23
Ubuntu version: Ubuntu 20.04.2 LTS
systemctl status mysql.service output:
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-03-27 17:15:22 UTC; 10s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 125121 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 125175 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 125175 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Mar 27 17:13:41 server systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 17:13:41 server systemd[1]: mysql.service: Failed with result 'exit-code'.
Mar 27 17:13:41 server systemd[1]: Stopped MySQL Community Server.
Mar 27 17:13:41 server systemd[1]: Starting MySQL Community Server...
Mar 27 17:15:22 server systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 17:15:22 server systemd[1]: mysql.service: Failed with result 'exit-code'.
Mar 27 17:15:22 server systemd[1]: Failed to start MySQL Community Server.
journalctl -xe output:
--
-- A start job for unit mysql.service has finished with a failure.
--
-- The job identifier is 26786 and the job result is failed.
Mar 27 17:15:39 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=MACADDRESS SRC=SRCADDRESS DST=SERVER_IP LEN=52 TOS>
Mar 27 17:15:57 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=MACADDRESS SRC=SRCADDRESS DST=SERVER_IP LEN=52 TOS>
Mar 27 17:16:19 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=MACADDRESS SRC=SRCADDRESS DST=SERVER_IP LEN=48 TOS>
Mar 27 17:16:38 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=MACADDRESS SRC=SRCADDRESS DST=SERVER_IP LEN=52 TOS>
Mar 27 17:16:57 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=MACADDRESS SRC=SRCADDRESS DST=SERVER_IP LEN=52 TOS>
Mar 27 17:17:01 server CRON[125231]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 27 17:17:01 server CRON[125232]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Mar 27 17:17:01 server CRON[125231]: pam_unix(cron:session): session closed for user root
Mar 27 17:17:16 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=MACADDRESS SRC=SRCADDRESS DST=SERVER_IP LEN=48 TOS>
Mar 27 17:17:24 server sshd[125236]: error: kex_exchange_identification: Connection closed by remote host
Mar 27 17:17:37 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=MACADDRESS SRC=SRCADDRESS DST=SERVER_IP LEN=48 TOS>
Mar 27 17:17:56 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=MACADDRESS SRC=SRCADDRESS DST=SERVER_IP LEN=52 TOS>
Mar 27 17:18:03 server sshd[125237]: Unable to negotiate with 68.183.4.74 port 49612: no matching key exchange method found. Their offer: diffie-hellm>
Mar 27 17:18:17 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=MACADDRESS SRC=SRCADDRESS DST=SERVER_IP LEN=40 TOS=>
Mar 27 17:18:30 server systemd[1]: fwupd.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit fwupd.service has successfully entered the 'dead' state.
Mar 27 17:18:35 server hv_kvp_daemon[125265]: sh: 1: /usr/libexec/hypervkvpd/hv_get_dns_info: not found
Mar 27 17:18:35 server hv_kvp_daemon[125267]: sh: 1: /usr/libexec/hypervkvpd/hv_get_dhcp_info: not found
Mar 27 17:18:35 server hv_kvp_daemon[125275]: sh: 1: /usr/libexec/hypervkvpd/hv_get_dns_info: not found
Mar 27 17:18:35 server hv_kvp_daemon[125277]: sh: 1: /usr/libexec/hypervkvpd/hv_get_dhcp_info: not found
Mar 27 17:18:39 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=MACADDRESS SRC=SRCADDRESS DST=SERVER_IP LEN=48 TOS>
Mar 27 17:18:59 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=MACADDRESS SRC=SRCADDRESS DST=SERVER_IP LEN=52 TOS>
Mar 27 17:19:17 server kernel: [UFW BLOCK] IN=eth0 OUT= MAC=MACADDRESS SRC=SRCADDRESS DST=SERVER_IP LEN=52 TOS>
Edit 1: new systemctl status mysql.service output
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-03-27 18:20:26 UTC; 28s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 135987 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 136026 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 136026 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Error: 17 (File exists)
Mar 27 18:20:24 emkes-vps systemd[1]: Starting MySQL Community Server...
Mar 27 18:20:26 emkes-vps systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 18:20:26 emkes-vps systemd[1]: mysql.service: Failed with result 'exit-code'.
Mar 27 18:20:26 emkes-vps systemd[1]: Failed to start MySQL Community Server.
journalctl -xe output:
Mar 27 18:22:21 emkes-vps hv_kvp_daemon[136366]: sh: 1: /usr/libexec/hypervkvpd/hv_get_dns_info: not found
Mar 27 18:22:21 emkes-vps hv_kvp_daemon[136368]: sh: 1: /usr/libexec/hypervkvpd/hv_get_dhcp_info: not found
Mar 27 18:22:21 emkes-vps hv_kvp_daemon[136376]: sh: 1: /usr/libexec/hypervkvpd/hv_get_dns_info: not found
Mar 27 18:22:21 emkes-vps hv_kvp_daemon[136378]: sh: 1: /usr/libexec/hypervkvpd/hv_get_dhcp_info: not found
I've made some FOCAL MECHANISMS (FM) for the north part of Southamerica on GMT, and I need to put them on a map.
For the FM I have a document with 85 earthquakes and this is the code:
psmeca eventos2.dat -R-80/-66/-5/14 -JM6i -Sm0.4/0/0.05u -P -V > coltopomap.ps
GMT psconvert coltopomap.ps -Tf
And this is the map
GMT grdcut topo15.grd -R-80/-66/-5/14 -Gtopo15_cut_col.grd
GMT grdgradient topo15_cut_col.grd -Gtopo15_cut_shaded.grd -A310 -Ne0.6
GMT grdimage topo15_cut_col.grd -JM6i -R-80/-66/-5/14 -Cglobe -P -Ba --MAP_FRAME_TYPE=plain --MAP_GRID_CROSS_SIZE_PRIMARY=0p -Itopo15_cut_shaded.grd -K > coltopomap.ps
GMT pscoast -R-80/-66/-5/14 -J -Df -N1/1,black -W1/0.5,black -Lf-68/-4/-68/-4/200k+l -Tdg-78/12+w0.3i+f3+lW,E,S,N --FONT_ANNOT=10p --FONT_LABEL=10p --FONT_TITLE=10p -O >> coltopomap.ps
To join them I've tried with
GMT grdcut topo15.grd -R-80/-66/-5/14 -Gtopo15_cut_col.grd
GMT grdgradient topo15_cut_col.grd -Gtopo15_cut_shaded.grd -A310 -Ne0.6
GMT grdimage topo15_cut_col.grd -JM6i -R-80/-66/-5/14 -Cglobe -P -Ba --MAP_FRAME_TYPE=plain --MAP_GRID_CROSS_SIZE_PRIMARY=0p -Itopo15_cut_shaded.grd -K > coltopomap.ps
GMT pscoast -R-80/-66/-5/14 -J -Df -N1/1,black -W1/0.5,black -Lf-68/-4/-68/-4/200k+l -Tdg-78/12+w0.3i+f3+lW,E,S,N --FONT_ANNOT=10p --FONT_LABEL=10p --FONT_TITLE=10p -O >> coltopomap.ps
GMT psmeca eventos2.dat -R-80/-66/-5/14 -JM6i -Sm0.4/0/0.05u -P -V >> coltopomap.ps
GMT psconvert coltopomap.ps -Tf
But the only thing I get is the map in one page and the FM in another as you can see in the next image:
https://i.stack.imgur.com/bAvx7.png
It seems you are missing the -K flag from your GMT pscoast ... command.
From GMT documentation:
Required for all but the last plot command when building multi-layer
plots
I'm trying to post a new record to my MongoDB (actual CouchDB), but it seems that I'm having problems with the format of my request.
I'm using the following code:
(not showing debug and validations)
WiFiClient client;
client.connect("172.16.1.4", 5984)
String connStr = "POST /iot/ HTTP/1.1\r\n"
"Host: user:password#172.16.1.4:5984/ \r\n"
"Content-Type: application/json\r\n"
"\r\n"
"'{\"a\":1}'\r\n\r\n";
client.print(connStr);
I get this response back:
HTTP/1.1 400 Bad Request
Server: CouchDB/1.6.1 (Erlang OTP/18)
Date: Sat, 07 Oct 2017 11:57:50 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 48 Cache-Control: must-revalidate
{"error":"bad_request","reason":"invalid_json"}
HTTP/1.1 400 Bad
Request Server: MochiWeb/1.0 (Any of you quaids got a smint?)
Date: Sat, 07 Oct 2017 11:57:50 GMT
Content-Length: 0
I have tried with differet json/data...
Using Linux - I have no problems:
curl -X POST user:password#172.16.1.4:5984/iot/ -H "Content-Type: application/json" -d '{"a":3}'
The issue might be with the single quotes(') before { and at the end of }
instead of
"'{\"a\":1}'\r\n\r\n"
it should be
"{\"a\":1}\r\n\r\n"
I was missing the line:
"Content-Length: " + String(json.length()) + "\r\n"
in the header.
I am testing a script for logout and access a URL not accessible when you are not logged in, but in my URL LOGOUT, i get the response code 405 and this is problematic.
Code:
$I = new AcceptanceTester($scenario);
$I->amOnPage('/financeiro_legado/finlegado-titulo/index');
$I->wantTo('Logout');
$I->amOnPage('/');
$I->fillField('LoginForm[username]', 'marcelo');
$I->fillField('LoginForm[password]', 'marceloid5123');
$I->click('#login-form .btn');
$I->see('Olá, marcelo');
$I->seeInCurrentUrl('/');
$I->click('Logout', '.nav');
$I->amOnPage('/financeiro_legado/finlegado-titulo/index');
Returns:
Logout (LogoutCept)
Scenario:
* I am on page "/financeiro_legado/finlegado-titulo/index"
[Response] 200
[Page] http://10.0.0.10/CliPainel/backend/web/index.php/user-management/auth/login
[Cookies] {"PHPSESSID":"puu268lb5rjl00ml0hk27rm9b0"}
[Headers] {"Date":["Fri, 11 Dec 2015 17:34:13 GMT"],"Server":["Apache/2.4.17 (Ubuntu)"],"Expires":["Thu, 19 Nov 1981 08:52:00 GMT"],"Cache-Control":["no-store, no-cache, must-revalidate, post-check=0, pre-check=0"],"Pragma":["no-cache"],"Set-Cookie":["_csrf=07c2d101d6c9e8530f7da67a78d451400eea99b70dc8a722a512661501bc4619a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%2248-nrt97Wc-EEUA0jUh6-USBTS-44ccy%22%3B%7D; path=/; httponly"],"Vary":["Accept-Encoding"],"Content-Length":["3918"],"Content-Type":["text/html; charset=UTF-8"]}
* I am on page "/"
[Response] 200
[Page] http://10.0.0.10/CliPainel/backend/web/index.php/user-management/auth/login
[Cookies] {"PHPSESSID":"puu268lb5rjl00ml0hk27rm9b0","_csrf":"07c2d101d6c9e8530f7da67a78d451400eea99b70dc8a722a512661501bc4619a:2:{i:0;s:5:"_csrf";i:1;s:32:"48-nrt97Wc-EEUA0jUh6-USBTS-44ccy";}"}
[Headers] {"Date":["Fri, 11 Dec 2015 17:34:14 GMT"],"Server":["Apache/2.4.17 (Ubuntu)"],"Expires":["Thu, 19 Nov 1981 08:52:00 GMT"],"Cache-Control":["no-store, no-cache, must-revalidate, post-check=0, pre-check=0"],"Pragma":["no-cache"],"Vary":["Accept-Encoding"],"Content-Length":["3918"],"Content-Type":["text/html; charset=UTF-8"]}
* I fill field "LoginForm[username]","marcelo"
* I fill field "LoginForm[password]","marceloid5123"
* I click "#login-form .btn"
[Uri] http://10.0.0.10/CliPainel/backend/web/index.php/user-management/auth/login
[Method] POST
[Parameters] {"_csrf":"bWN1ZS1zWTBZW1gLXwdgBzoAWCBoJhgABzYdUwAmCnI5MFhRGRA6SQ==","LoginForm":{"username":"marcelo","password":"marceloid5123"}}
[Response] 200
[Page] http://10.0.0.10/CliPainel/backend/web/
[Cookies] {"PHPSESSID":"6hehrk4ddoroplv5so3l6klkb1","_csrf":"07c2d101d6c9e8530f7da67a78d451400eea99b70dc8a722a512661501bc4619a:2:{i:0;s:5:"_csrf";i:1;s:32:"48-nrt97Wc-EEUA0jUh6-USBTS-44ccy";}"}
[Headers] {"Date":["Fri, 11 Dec 2015 17:34:16 GMT"],"Server":["Apache/2.4.17 (Ubuntu)"],"Expires":["Thu, 19 Nov 1981 08:52:00 GMT"],"Cache-Control":["no-store, no-cache, must-revalidate, post-check=0, pre-check=0"],"Pragma":["no-cache"],"Vary":["Accept-Encoding"],"Transfer-Encoding":["chunked"],"Content-Type":["text/html; charset=UTF-8"]}
* I see "Olá, marcelo"
* I see in current url "/"
* I click "Logout",".nav"
[Response] 405
[Page] http://10.0.0.10/CliPainel/backend/web/index.php/site/logout
[Cookies] {"PHPSESSID":"6hehrk4ddoroplv5so3l6klkb1","_csrf":"07c2d101d6c9e8530f7da67a78d451400eea99b70dc8a722a512661501bc4619a:2:{i:0;s:5:"_csrf";i:1;s:32:"48-nrt97Wc-EEUA0jUh6-USBTS-44ccy";}"}
[Headers] {"Date":["Fri, 11 Dec 2015 17:34:18 GMT"],"Server":["Apache/2.4.17 (Ubuntu)"],"Expires":["Thu, 19 Nov 1981 08:52:00 GMT"],"Cache-Control":["no-store, no-cache, must-revalidate, post-check=0, pre-check=0"],"Pragma":["no-cache"],"Allow":["POST"],"Transfer-Encoding":["chunked"],"Content-Type":["text/html; charset=UTF-8"]}
* I am on page "/financeiro_legado/finlegado-titulo/index"
[Response] 200
[Page] http://10.0.0.10/CliPainel/backend/web/financeiro_legado/finlegado-titulo/index
[Cookies] {"PHPSESSID":"6hehrk4ddoroplv5so3l6klkb1","_csrf":"07c2d101d6c9e8530f7da67a78d451400eea99b70dc8a722a512661501bc4619a:2:{i:0;s:5:"_csrf";i:1;s:32:"48-nrt97Wc-EEUA0jUh6-USBTS-44ccy";}"}
[Headers] {"Date":["Fri, 11 Dec 2015 17:34:19 GMT"],"Server":["Apache/2.4.17 (Ubuntu)"],"Expires":["Thu, 19 Nov 1981 08:52:00 GMT"],"Cache-Control":["no-store, no-cache, must-revalidate, post-check=0, pre-check=0"],"Pragma":["no-cache"],"Vary":["Accept-Encoding"],"Transfer-Encoding":["chunked"],"Content-Type":["text/html; charset=UTF-8"]}
PASSED
Probably you handle that click with Javascript in the web browser.
Yii2 module of Codeception does not execute Javascript.
Your options are:
a) make your site work with Javascript disabled.
You could achieve that by changing
Logout
To
<form method="POST" action="site/logout">
<input type="submit" value="Logout" />
</form>
b) Use sendAjaxPostRequest method to make POST request
$I->sendAjaxPostRequest('site/logout', []);
The last few hours, I have tried to figure out, why the following image is not cached in the browser, after it is requested the first time:
http://runrpg.net/assets/images/screenshots/placeit_outdoor_wide.jpg
I understand that the correct headers have to be set, and currently the response header looks like this:
HTTP/1.1 200 OK
Date: Sat, 04 Jan 2014 16:35:53 GMT
Server: Apache/2.4.4 (Unix) OpenSSL/1.0.1e PHP/5.5.3 mod_perl/2.0.8-dev
Perl/v5.16.3
Last-Modified: Sat, 30 Nov 2013 01:37:52 GMT
ETag: "1dac5-4ec5afebf3c00-gzip"
Accept-Ranges: bytes
Cache-Control: max-age=2592000
Expires: Mon, 03 Feb 2014 16:35:53 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: image/jpeg
As you can see, the "Expires" header is set to "Mon, 03 Feb 2014 16:35:53 GMT" and I also included a "Cache-Control: max-age=2592000".
Can you help me and tell me what I am missing?
Your help would be very much appreciated.
Thanks!
This is most likely due to your server not validating ETags correctly. While cache validation through the Last-Modified header works perfectly:
$ HEAD -H "If-Modified-Since: Sat, 30 Nov 2013 01:37:52 GMT" http://runrpg.net/assets/images/screenshots/placeit_outdoor_wide.jpg
304 Not Modified
Cache-Control: max-age=290304000, public
Connection: close
Date: Sat, 04 Jan 2014 19:01:30 GMT
ETag: "1dac5-4ec5afebf3c00"
Server: Apache/2.4.4 (Unix) OpenSSL/1.0.1e PHP/5.5.3 mod_perl/2.0.8-dev Perl/v5.16.3
Expires: Thu, 09 Jan 2014 19:01:30 GMT
Client-Date: Sat, 04 Jan 2014 19:01:30 GMT
Client-Peer: 80.70.3.110:80
Client-Response-Num: 1
The same cannot be said with ETags:
$ HEAD -H 'If-None-Match: "1dac5-4ec5afebf3c00-gzip"' http://runrpg.net/assets/images/screenshots/placeit_outdoor_wide.jpg
200 OK
Cache-Control: max-age=290304000, public
Connection: close
Date: Sat, 04 Jan 2014 19:02:24 GMT
Accept-Ranges: bytes
ETag: "1dac5-4ec5afebf3c00"
Server: Apache/2.4.4 (Unix) OpenSSL/1.0.1e PHP/5.5.3 mod_perl/2.0.8-dev Perl/v5.16.3
Vary: Accept-Encoding
Content-Length: 121541
Content-Type: image/jpeg
Expires: Thu, 09 Jan 2014 19:02:24 GMT
Last-Modified: Sat, 30 Nov 2013 01:37:52 GMT
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: origin, x-requested-with, content-type, X-Titanium-Id
Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS
Access-Control-Allow-Origin: http://127.0.0.1:8020
Client-Date: Sat, 04 Jan 2014 19:02:24 GMT
Client-Peer: 80.70.3.110:80
Client-Response-Num: 1
Bottom line: The problem is your server, not any clients. This seems to be a known issue with Apache 2.4.x. A quick solution to this is by switching ETags off:
FileETag None