Koha Test Wiki Canasta - March 2024

One of a series of test instances for migrating the Koha Wiki MediaWiki database.

For the current Koha Wiki, visit https://wiki.koha-community.org .

Troubleshooting KohaDevBox

From Koha Test Wiki Canasta
Jump to navigation Jump to search

Problems you might run into with KohaDevBox, and how to get around them.

Please note kohadevbox is not very maintained lately and devs are switching to Koha-testing-docker.

Faulty /etc/exports

Guest: debian/jessie64

Running "vagrant up" would die like this:

==> jessie: Exporting NFS shared folders...
==> jessie: Preparing to edit /etc/exports. Administrator privileges will be required...
[sudo] passord for magnus: 
● nfs-server.service - NFS server and services
  Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
  Active: active (exited) since ti. 2017-10-31 09:29:07 CET; 8min ago
 Process: 1333 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
 Process: 1321 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Main PID: 1333 (code=exited, status=0/SUCCESS)
   Tasks: 0
  Memory: 0B
     CPU: 0
  CGroup: /system.slice/nfs-server.service

okt. 31 09:29:06 frodo systemd[1]: Starting NFS server and services...
okt. 31 09:29:07 frodo systemd[1]: Started NFS server and services.
exportfs: duplicated export entries:
exportfs: 	192.168.50.10:/home/magnus/scripts/kohaclone
exportfs: 	192.168.50.10:/home/magnus/scripts/kohaclone
exportfs: duplicated export entries:
exportfs: 	192.168.50.10:/home/magnus/.vagrant.d/cache/debian/jessie64
exportfs: 	192.168.50.10:/home/magnus/.vagrant.d/cache/debian/jessie64
==> jessie: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mkdir -p 
Stdout from the command:
Stderr from the command:
mkdir: cannot create directory ‘’: No such file or directory

(The most interesting part of the output is in bold above.)

The problem was that stuff in /etc/exports on the host had become doubled up, something like this:

$cat /etc/exports
# VAGRANT-BEGIN: 1000 5edf206e-3c12-4a2b-a3f7-05f6a7483ef4
"/home/magnus/scripts/kohaclone" 192.168.50.10(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=594634540)
"/home/magnus/scripts/kohadocs" 192.168.50.10(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=4148708993)
"/home/magnus/.vagrant.d/cache/debian/jessie64" 192.168.50.10(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=1563108561)
# VAGRANT-END: 1000 5edf206e-3c12-4a2b-a3f7-05f6a7483ef4

# VAGRANT-BEGIN: 1000 5edf206e-3c12-4a2b-a3f7-05f6a7483ef4
"/home/magnus/scripts/kohaclone" 192.168.50.10(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=594634540)
"/home/magnus/scripts/kohadocs" 192.168.50.10(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=4148708993)
"/home/magnus/.vagrant.d/cache/debian/jessie64" 192.168.50.10(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=1563108561)
# VAGRANT-END: 1000 5edf206e-3c12-4a2b-a3f7-05f6a7483ef4

Solution: Delete all of the lines that looked like the ones above + "vagrant destroy" + "vagrant up".

Missing sudo privileges

Guest: debian/jessie64

"Vagrant up" would die like this:

==> jessie: Exporting NFS shared folders...
==> jessie: Preparing to edit /etc/exports. Administrator privileges will be required...
● nfs-server.service - NFS server and services
   Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
   Active: active (exited) since ti. 2017-10-31 09:29:07 CET; 48min ago
  Process: 1333 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
  Process: 1321 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 1333 (code=exited, status=0/SUCCESS)
    Tasks: 0
   Memory: 0B
      CPU: 0
   CGroup: /system.slice/nfs-server.service

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
==> jessie: Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed! 

mkdir -p 
Stdout from the command:
Stderr from the command:
mkdir: cannot create directory ‘’: No such file or directory

The solution: Log into the virtualbox with "vagrant ssh", and edit /etc/sudoers on the guest, by adding the line starting with "vagrant" under the line starting with "root":

# User privilege specification
root    ALL=(ALL:ALL) ALL
vagrant ALL=(ALL) NOPASSWD:ALL

Then logging out and running "vagrant up --provision".

NFS errors

At the beginning this error:

fatal: [jessie]: FAILED! => {"changed": true, "cmd": "./koha-gitify kohadev /home/vagrant/kohaclonehop", "delta": "0:00:00.023661", "end": "2018-03-12 11:18:17.651157", "failed": true, "rc": 2, "start": "2018-03-12 11:18:17.627496", "stderr": "ERROR: git checkout not found at (/home/vagrant/kohaclonehop)", "stdout": "", "stdout_lines": [], "warnings": []}

When I reload I got:

vagrant reload --provision 
==> jessie: Preparing to edit /etc/exports. Administrator privileges will be required...
[sudo] Mot de passe de claire : 
==> jessie: Mounting NFS shared folders...
==> jessie: Mounting shared folders...
    jessie: /vagrant => /home/claire/kohadevbox
Vagrant was unable to mount VirtualBox shared folders. This is usually
because the filesystem "vboxsf" is not available. This filesystem is
made available via the VirtualBox Guest Additions and kernel module.
Please verify that these guest additions are properly installed in the
guest. This is not a bug in Vagrant and is usually caused by a faulty
Vagrant box. For context, the command attempted was:
mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant
The error output from the command was:
mount: unknown filesystem type 'vboxsf'

I finally installed virtualbox-guest-x11 + reboot + destroyed

apt install virtualbox-guest-x1
reboot
vagrant destroy
export SYNC_REPO="..."
SKIP_WEBINSTALLER=1 CREATE_ADMIN_USER=1 vagrant up

And it works... (thanks tcohen and kidclamp for their time :))