Vero wont boot if sql database isnt available?

Hi,
I am unable to boot vero4k+ when I’m trying to use mysql database, since the database is on my home net and I need to start up vero and connect to vpn before it can reach the database.

What is the easiest fix? Can I change some setting so it boots without database?
Or do I need to learn how to make it connect to VPN during boitup before starting osmc?

Regards /Peter

In settings>profiles there is an option for “show login screen at startup” that might get around this issue. The MySQL db doesn’t try to load until you login to a profile.

No, that way it seem to erase and replace the advancedsettings file with a blank, so doesn’t matter, when I run the vpn it still don’t use the database

I suggest you provide full debug logs:

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Depending on the used skin you have to set the settings-level to standard or higher, in summary:

  • enable debug logging at settings->system->logging

  • enable component-specific logging for all components

  • enable event logging and notification event logging

  • reboot the OSMC device twice(!)

  • reproduce the issue

  • upload the log set (all configs and logs!) either using the Log Uploader method within the My OSMC menu in the GUI or the ssh method invoking command grab-logs -A

  • publish the provided URL from the log set upload, here

Thanks for your understanding. We hope that we can help you get up and running again shortly.

OSMC skin screenshots:

With some help I made the rather inelegant solution of a chrontab that starts openvpn, sleeps a bit and restarts mediacenter service.
Booting up takes forever (way longer than the sleep) but in the end everything works as intended.

But I guess a better solution would be to not have osmc autostart on boot but instead start it from chrontab after openvpn?
How would I go about that?

logs: https://paste.osmc.tv/xohulusaci

Regards/Peter

sudo systemctl disable mediacenter
and to start
sudo systemctl start mediacenter

A better solution is:

  1. Don’t run openvpn from cron. Move your vilfo.ovpn to /etc/openvpn and call it vilfo.conf. Disable your crontab entry.

  2. Create a short script wait_for_tun.sh (either in /home/osmc or /usr/local/bin):

    #!/bin/sh
    while [ ! -e /proc/sys/net/ipv4/conf/tun* ]; do
    	sleep 5
    done
    

    Remember to make it executable.

  3. For testing purposes, edit (using sudo) the file /lib/systemd/system/mediacenter.service and under the [Service] section add this line:
    ExecStartPre=/usr/local/bin/wait_for_tun.sh
    (I’m assuming it’s been placed in /usr/local/bin.)

Reboot and see if it’s working as you would like. If openvpn doesn’t run vilfo.conf, you might need to edit /etc/default/openvpn and add a line AUTOSTART="vilfo".

1 Like

Thank you.

You’re welcome. But does it work?

Please also note that above I used the phrase “for testing purposes” for a reason. That’s because the edit has a good chance of being overwritten during an update. If it works correctly, you need to make the change permanent.