Advertisement
Guest User

Untitled

a guest
Aug 24th, 2017
431
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.25 KB | None | 0 0
  1. ‎[19:48] ‎<‎gryffus‎>‎ Anyone have idea why i cannot start mysql with same configuration that is working on other servers? I even get no output from mysql: https://pastebin.com/raw/dqQbdkwz . What is errno= 32 ?
  2. ‎[19:49] <-- jdavila (~Davila@200.125.188.214) opustil server (Quit: Leaving).
  3. ‎[19:49] --> jdavila (~Davila@200.125.188.214) se připojil ke kanálu.
  4. ‎[19:50] ‎<‎litheum‎>‎ !perror 32
  5. ‎[19:50] ‎<‎ubiquity_bot‎>‎ OS error code 32: Broken pipe
  6. ‎[19:50] ‎<‎gryffus‎>‎ hmm, so it just dies without any message? How can i debug this?
  7. ‎[19:50] ‎<‎litheum‎>‎ check your syslog or journal or whatnot to see if there's anything else in there, that there must be some more info someplace
  8. ‎[19:50] <-- gugah (~gugah@181.169.151.140) opustil server (Quit: Leaving).
  9. ‎[19:52] ‎<‎gryffus‎>‎ litheum: there really is not... dmesg, journalctl, /var/log/mysqld.log, nothing, nowhere, only what i have posted
  10. ‎[19:53] ‎<‎litheum‎>‎ what OS are you using? and what package did you download and install?
  11. ‎[19:53] ‎<‎gryffus‎>‎ litheum: RHEL 7.3
  12. ‎[19:53] ‎<‎litheum‎>‎ i wonder if by default mysqld --initialize will try to use /var/lib/mysql, did you look there? have you tried mysqld --initialize --datadir=/opt/data/ ?
  13. ‎[19:54] ‎<‎gryffus‎>‎ and mysql-community-server-5.7.19-1.el7.x86_64
  14. ‎[19:54] ‎<‎salle‎>‎ gryffus: Check Selinux config
  15. ‎[19:54] <-- evilman_work (~evilman@87.244.6.228) opustil server (Read error: No route to host).
  16. ‎[19:54] ‎<‎litheum‎>‎ right, selinux could be a thing, i was hoping the message about that would show up in the journalctl output, but maybe it still goes to some separate audit log?
  17. ‎[19:55] ‎<‎gryffus‎>‎ salle: i had some errors with selinux even with permissive mode, so i disabled it completely...
  18. ‎[19:56] ‎<‎salle‎>‎ gryffus: Does mysqld --initalize work with the default datadir? litheum already asked that
  19. ‎[19:58] --> vcolombo (~vcolombo@208.184.112.78) se připojil ke kanálu.
  20. ‎[20:00] --> mmazing (~mmazing@unaffiliated/mmazing) se připojil ke kanálu.
  21. ‎[20:00] ‎<‎gryffus‎>‎ salle: no
  22. ‎[20:01] <-- jsmyth (~jsmyth@unaffiliated/jsmyth) opustil server (Quit: Leaving.).
  23. ‎[20:02] ‎<‎salle‎>‎ gryffus: No in what way? Any errors?
  24. ‎[20:02] <-- dbclk (~dbclk@27.34.21.132) opustil server (Ping timeout: 240 seconds).
  25. ‎[20:02] --> dbclk_ (~dbclk@27.34.21.132) se připojil ke kanálu.
  26. ‎[20:02] ‎<‎litheum‎>‎ heh
  27. ‎[20:02] ‎<‎gryffus‎>‎ salle: it behaves just the same, just exits silently
  28. ‎[20:04] <-- jdavila (~Davila@200.125.188.214) opustil server (Quit: Leaving).
  29. ‎[20:04] --> ToreadorVampire (~ToreadorV@cpc107563-bsfd9-2-0-cust806.5-3.cable.virginm.net) se připojil ke kanálu.
  30. ‎[20:04] <-- ToreadorVampire (~ToreadorV@cpc107563-bsfd9-2-0-cust806.5-3.cable.virginm.net) opustil server (Changing host).
  31. ‎[20:04] --> ToreadorVampire (~ToreadorV@unaffiliated/toreadorvampire) se připojil ke kanálu.
  32. ‎[20:05] ‎<‎litheum‎>‎ try it with --console and with --log-error pointing to some specific file and then try it as the mysql user instead of root and then i guess it's off to strace
  33. ‎[20:08] --> meandrain (~meandrain@89.39.123.241) se připojil ke kanálu.
  34. ‎[20:08] --> cidic (~cidic@96-88-240-57-static.hfc.comcastbusiness.net) se připojil ke kanálu.
  35. ‎[20:08] <-- denimsoft (~denimsoft@188.172.147.58) opustil server (Quit: Textual IRC Client: www.textualapp.com).
  36. ‎[20:09] <-- treegor (~gary@bzq-82-81-213-77.cablep.bezeqint.net) opustil server (Ping timeout: 248 seconds).
  37. ‎[20:09] ‎<‎gryffus‎>‎ litheum: open("/opt/data/tmp/ibd0v9Zq", O_RDWR|O_CREAT|O_EXCL, 0600) = -1 ENOENT (No such file or directory)
  38. ‎[20:09] ‎<‎gryffus‎>‎ i skipped the rest
  39. ‎[20:09] ‎<‎gryffus‎>‎ and it seems that the it does not like tmp being in datadir.....
  40. ‎[20:09] ‎<‎gryffus‎>‎ but why it works on all other servers?
  41. ‎[20:09] ‎<‎litheum‎>‎ did the program exit after that ??
  42. ‎[20:09] ‎<‎gryffus‎>‎ yes
  43. ‎[20:10] ‎<‎litheum‎>‎ did you set tempdir to a directory that doesn't exist?
  44. ‎[20:10] ‎<‎litheum‎>‎ tmpdir? tempdir? whatever it is
  45. ‎[20:10] ‎<‎gryffus‎>‎ https://pastebin.com/gc573Jht end of strace
  46. ‎[20:10] --> treegor (~gary@bzq-82-81-213-77.cablep.bezeqint.net) se připojil ke kanálu.
  47. ‎[20:11] ‎<‎litheum‎>‎ look at that, it's trying to write to stderr, where is that message going??
  48. ‎[20:13] ‎<‎gryffus‎>‎ log-output=FILE, log-error=/var/log/mysqld.log
  49. ‎[20:14] ‎<‎gryffus‎>‎ but in my /var/log/mysqld.log there is nothing
  50. ‎[20:14] ‎<‎litheum‎>‎ nutty
  51. ‎[20:14] ‎<‎litheum‎>‎ but back to my other recent question: did you set tempdir to a directory that doesn't exist?
  52. ‎[20:14] <-- cidic (~cidic@96-88-240-57-static.hfc.comcastbusiness.net) opustil server (Quit: cidic).
  53. ‎[20:14] ‎<‎gryffus‎>‎ yes, that is possible
  54. ‎[20:14] ‎<‎gryffus‎>‎ let me check and try to create it
  55. ‎[20:15] --> gugah (~gugah@181.169.151.140) se připojil ke kanálu.
  56. ‎[20:15] <-- kneeki (~kneeki@cpe-76-173-67-35.hawaii.res.rr.com) opustil server (Remote host closed the connection).
  57. ‎[20:15] ‎<‎gryffus‎>‎ if i create it, i get [ERROR] --initialize specified but the data directory has files in it. Aborting.
  58. ‎[20:15] ‎<‎gryffus‎>‎ :(
  59. ‎[20:15] ‎<‎litheum‎>‎ great! that's something at least!
  60. ‎[20:15] ‎<‎gryffus‎>‎ but at least there is error message
  61. ‎[20:15] ‎<‎gryffus‎>‎ yeah
  62. ‎[20:16] ‎<‎litheum‎>‎ so set tmpdir somewhere else and get this mother rolling
  63. ‎[20:17] ‎<‎gryffus‎>‎ well, that is another problem... i need to set this same as on production, but on production we use datadir as /opt/data and tmpdir as /opt/data/tmp :(
  64. ‎[20:17] ‎<‎gryffus‎>‎ well but i got an idea
  65. ‎[20:17] ‎<‎gryffus‎>‎ maybe the /opt/data/tmp is not on our backups
  66. ‎[20:17] ‎<‎litheum‎>‎ ok, try mysql_install_db after creating the tmpdir
  67. ‎[20:18] ‎<‎litheum‎>‎ i don't think it cares whether the directory is empty or not
  68. ‎[20:19] ‎<‎gryffus‎>‎ well, i don't need to get clean db working
  69. ‎[20:19] ‎<‎gryffus‎>‎ just our backups
  70. ‎[20:19] ‎<‎salle‎>‎ gryffus: By the way tmpdir within datadir is quite bad idea
  71. ‎[20:19] ‎<‎gryffus‎>‎ so if running mysql does not care, i dont care about install db
  72. ‎[20:19] ‎<‎litheum‎>‎ gryffus: what?
  73. ‎[20:19] ‎<‎gryffus‎>‎ salle: yeah i have said that numerous times to our configuration team
  74. ‎[20:19] ‎<‎litheum‎>‎ gryffus: you don't actually need to initialize the datadir? what are you actually trying to do then?
  75. ‎[20:20] ‎<‎gryffus‎>‎ litheum: i was debugging why mysql stopped working after restoring backup
  76. ‎[20:20] ‎<‎salle‎>‎ Yep if the goal is to restore dump there there is no need to initialize datadir
  77. ‎[20:20] --> josefig (~josefig@unaffiliated/josefig) se připojil ke kanálu.
  78. ‎[20:21] ‎<‎litheum‎>‎ gryffus: so you had restored the backup, but mysqld wouldn't start, and you figured you'd debug that by trying mysql_install_db instead? i guess that makes sense. crazy crazy crazy that you don't get an error message to stderr or a log file when mysqld flips out at the missing tmpdir, that's awful
  79. ‎[20:23] ‎<‎gryffus‎>‎ litheum: i have restored the backup and mysqld wouldn't start, so i first tried to delete datadir and it did not started with same symptoms (not a single message in logs). So i tried init DB to get at least some debug info, but it was not working either... And you know rest of the story :)
  80. ‎[20:23] ‎<‎gryffus‎>‎ thanks :)
  81. ‎[20:23] ‎<‎gryffus‎>‎ strace actually helped me to find out
  82. ‎[20:24] ‎<‎litheum‎>‎ yah, strace is a ridiculously useful tool for lots of otherwise intractable problems
  83. ‎[20:24] ‎<‎gryffus‎>‎ litheum: yeah like networkmanager :D
  84. ‎[20:25] ‎<‎gryffus‎>‎ if you have ever tried to debug one of the plugins you know what i mean
  85. ‎[20:25] ‎<‎litheum‎>‎ i feel very fortunate to know not a single thing at all about networkmanager
  86. ‎[20:25] ‎<‎gryffus‎>‎ litheum: the feeling is right :D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement