Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to open database #10

Open
AlfredoCubitos opened this issue Dec 10, 2024 · 2 comments
Open

unable to open database #10

AlfredoCubitos opened this issue Dec 10, 2024 · 2 comments

Comments

@AlfredoCubitos
Copy link

I tried to build a development environment.

The command sudo node_modules/.bin/gulp deploy --force seems to work fine, no errors.
calling moodeutl -r throws the following error:

Error: unable to open database "/var/local/www/db/moode-sqlite3.db": unable to open database file
watchdog.sh: no process found
worker.php: no process found
rm: cannot remove '/var/run/worker.pid': No such file or directory
Failed to stop mpd2cdspvolume.service: Unit mpd2cdspvolume.service not loaded.
Failed to stop localdisplay.service: Unit localdisplay.service not loaded.
PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [14] unable to open database file in /var/www/inc/sql.php:11
Stack trace:
#0 /var/www/inc/sql.php(11): PDO->__construct()
#1 /var/www/daemon/worker.php(29): sqlConnect()
#2 {main}

The database file does not exist.
Shouldn't it created automatically or have I to do this manually?

@AlfredoCubitos
Copy link
Author

ok, I found out that I have to use --all option.
The database was created, but with no content.
So I added the content with the sqlite3 command .read
When I call moodeutl -r the host reboots!! :-(

Whats going wrong???

@moodeaudio
Copy link
Contributor

What I did on my Mac is clone the moode repo, change into the moode dir and then run the commands below

lt5user@LT5 moode % sudo node_modules/.bin/gulp build && sudo node_modules/.bin/gulp deploy --test

Then I end up with a dir named build

lt5user@LT5 moode % ls build                                                                      
cache	develop	dist
lt5user@LT5 moode % 

The dist dir has all of /var/www/ which I then pull (all or in part) from my Pi's by mounting a containing SMB share on my Mac and using cp commands.

# From the Pi mount the Mac share and copy some files
sudo bash -c './devutl.sh -m;
cp /mnt/moode-player/GitHub/moode/build/dist/var/www/util/* /var/www/util/;
cp /mnt/moode-player/GitHub/moode/build/dist/var/www/command/* /var/www/command/'

The Pi's are running moOde (latest release) and so already have /var/local/www and the rest of the application files.

This process works great for me but other devs in our Forum do it differently and could prolly help you get going. You might want to get a Forum account and post your questions there. Just send an email to forum at moodeaudio dot org with your preferred userid (>= 5 chars) and I'll create an account for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants