Debugging

Timotheus Pokorra edited this page Mar 17, 2016 · 10 revisions

My lbs.solidcharity.com server is the development server at the same time. That way I can test the new code immediately.

It runs an installation installed from RPM.

I use the makeinstall.sh script to copy the code from my git directory to the live installation, and restart uwsgi.

I can see most errors in /var/log/uwsgi.log.

Sometimes it is easier to run lbs.py directly, to see errors on the command line. This is what I do:

systemctl stop nginx
systemctl stop uwsgi
cd mygitdirectory/web
./lbs.py
# now I can see the requests coming in, stack traces, print() output etc
# attention: for builds to start, visit the machines page in the webbrowser
# after the test:
chown -R uwsgi:uwsgi /var/lib/lightbuildserver/src
chown -R uwsgi:uwsgi /var/lib/lightbuildserver/tarballs
chown -R uwsgi:uwsgi /var/lib/lightbuildserver/repos
chown -R uwsgi:uwsgi /var/lib/lightbuildserver/logs
chown -R uwsgi:uwsgi /var/lib/lightbuildserver/db
cd ..
systemctl start nginx
systemctl start uwsgi
./makeinstall.sh

To check the the database:

sqlite3 /var/lib/lightbuildserver/db/lightbuildserver.db
   select id, name, status, buildjob, queue, username, projectname, packagename from machine;
   select id, status, username, projectname, packagename, branchname, distro, release, arch, dependsOnOtherProjects, buildmachine, started, finished, buildsuccess, buildnumber from build limit 20;
   select id, status, buildmachine, started, finished, hanging, buildsuccess, buildnumber from build where status <> 'FINISHED' and status <> 'CANCELLED' limit 20;

see the database structure: https://github.com/SolidCharity/LightBuildServer/blob/master/lib/LightBuildServer.py#L49

To initiate the build, you need to visit the page /machines, which will trigger builds from the job queue.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.