Hi folks. Enthusiastic about TKLDEV and reliving fond memories. Trying to port Ampache patch for TKLpatch to TKLDEV and do now what we should have done then, being a bit wiser and all. But I get stuck.

When I try to make a patch with LAMP as the base, /etc/init.d/mysql start fails. I can't figure out what the snag is. I move it around in the script based on the great model appliances on Github that also have lamp base. Any ideas? The patch is on github at https://github.com/ghoulmann/TKL-ampache.

Thank you,

 

Rik

Forum: 
Eric (tssgery)'s picture

I have seen this before, and if you are seeing the same thing as me... here is what is happening.

The first time you try and build your appliance, mysqld starts correctly and grabs the listening port. The second time you try to build, mysqld does not start because the port is in use. 

What's happening is that during the first build, mysqld is not shut down and the process remains active holding the port. The second startup can't succeed as it cannot grab the port for listening

I solved this my making sure that I stop mysqld as part of my patch. That way the second build will not get caught with this issue. My steps are something like:

 

/etc/init.d/mysqld start

<do whatever with mysql that I need to>

/etc/init.d/mysqld stop

 

You can reboot your tkldev image and try a build. If mysqld fails to start during the first build... post the error you are seeing and someone might be able to debug further. If mysqld does start then stop mysqld during your patch building.

 

Thanks Eric. I remember now - that takes me back to TKLPatch. However, in this case, rebooting the dev environment didn't help. Here's the output when the make gets to mysql start in a freshly booted environment:

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
. ok
+ /etc/init.d/mysql start
df: Warning: cannot read table of mounted file systems: No such file or directory
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
make: *** [build/stamps/root.patched] Error 1

Eric (tssgery)'s picture

I was hoping that was it, but it seems you are seeing a different problem.

I would check two things now, though I doubt either of these are what you are seeing

  • make sure your disk is not full. mysql won't start if you have no free space
  • make sure there is not another mysql instance running anywhere. In a chroot or on the tkldev root itself.

 

Failing that, you are beyong the scope of what I am familiar with. The logfiles in /var/log might tell you the specific failure though.

 

 

I got the problem solved. It must be the second bullet item in your list: I had one TKLDEV instance for all my building. Investigated logs and processes and everything looked fine. Nevertheless, I started a new TKLDEV instance and pulled my work into it - working fine there. So, my other hack lab has something running on boot that interfered. Lesson learned.

 

Thank you, Eric.

L. Arnold's picture

Glad I searched for this.  Was going crazy w/ my first ISO build.  I did do a few snapshot rebuilds and had success but then kept running into an error (that moved).

Would be worth either updating the documentation or the build to fix this it seems.  Pretty high cost downloads w/ ultimate failures.  (I'll bet I was close to 10x)

Best :)

Add new comment