If you want to deploy retrace server for testing purposes, please skip to Deploying Testing Retrace Server
-
Install dependencies
First you should install all dependent packages.
Dependencies can be listed by:
$ ./autogen.sh sysdeps
or installed by (two versions based on your package manager):
$ ./autogen.sh sysdeps --install-yum $ ./autogen.sh sysdeps --install-dnf
The dependency installer gets the data from the rpm spec file
-
Build from source
When you have all dependencies installed you can now build a rpm package by these commands:
$ ./autogen.sh $ make rpm
Now in the
noarch
folder you can find a rpm package. You can install it by:$ rpm -ivh noarch/retrace-server-*.rpm
-
Deploy
After installing the retrace server, before having a functional retrace server you need do a few things:
-
Add repositories If you need to add another distribution, another repository or new url for mirror do it in /usr/share/retrace-server/plugins/distribution.py. To learn more about writing plugins please read Plugin section in README
-
Run reposync To download packages from repository run (must run as
retrace
user):$ sudo -u retrace retrace-server-reposync distribution version architecture
Don't forget to substitute the last three arguments. You want to run this command on all combinations of distribution version and architecture always when new packages or new versions are releases. Therefore it is recommended to set this into cron.
-
Open port 443
To enable communication via https you have to open port 443. You can do so by running these commands:
Open port 443 in the firewall
# firewall-cmd --permanent --zone=public --add-service=https
Reload the firewall
# firewall-cmd --reload
Make sure that the port is listed
# firewall-cmd --zone=public --list-ports
-
Restart httpd
# service httpd restart
-
Disable SELinux
# setenforce 0
-
-
Test your server
There are two ways how to test if your server is running:
-
Abrt Plugin
There is plugin in ABRT that should be available in your system if you have ABRT installed. See
abrt-retrace-client -h
to learn more. -
Web UI
You should be able to see front page by visiting https://my_server
There also exist a Web UI for assigning retrace task. It can be found under
\manager
, but firstly must be enabled in configuration file.open /etc/retrace-server.conf set `AllowTaskManager = 1`
Mind that this a security risk and should not be enabled in production servers.
-
When deploying retrace server only for testing purposes, you don't want to have all pacakges from all repositories. You only need some packages, so you can retrace one or two coredumps. In this section a simple tutorial is written how to deploy such a server. Each point corresponds with point from section Deploying Retrace Server.
-
Install dependencies
There is no change when deploying real and testing retrace server.
-
Build from source
There is no change when deploying real and testing retrace server.
-
Deploy
-
Add repositories
This is the main difference. Since you don't want to have all packages from fedora, you should NOT run commands like
$ retrace-server-reposync fedora version architecture
You only need a few packages (and their dependencies). Therefore you should create a local repository, download only necessary packages there and tell retrace-server that this is your repository. Here is how you can do it.
-
Create a new folder and call it for example
local_repo
$ mkdir /var/tmp/local_repo
-
Now you have to download packages into that folder. If you have yours coredump, find out which package it comes from - it will be later marked as my-packages.
If you use yum run this:
# yum --downloadonly --releasever=25 --installroot=/var/tmp/local_repo/ \ --enablerepo=\*debuginfo\* -y --downloaddir=/var/tmp/local_repo/ \ --nogpgcheck install abrt-addon-ccpp shadow-utils gdb rpm *my-packages*
If you use dnf run this:
# dnf --releasever=25 --enablerepo=\*debuginfo\* -y --installroot=/var/tmp/local_repo/ \ download --resolve --destdir /var/tmp/local_repo/ abrt-addon-ccpp shadow-utils \ gdb rpm *my-packages*
Then if you look into
/var/tmp/local_repo
you should see a few packages.It is your own local repository. Now you need to create a plugin for it. Easiest way is to copy existing plugin and create changes in it.
$ cd /usr/share/retrace-server/plugins/ # cp fedora.py local.py
Now open
/usr/share/retrace-server/plugins/local.py
in your favourite text editor and do the following changes: All occurances of wordFedora
replace byLocal
, allfedora
bylocal
and you only want one repository with one mirror, so yourrepos
part should look like this:repos = [ [ "/var/tmp/local_repo" ] ]
-
-
Run reposync
$ sudo -u retrace retrace-server-reposync local 25 x86_64
-
Open port 443
There is no change when deploying real and testing retrace server.
-
Restart httpd
There is no change when deploying real and testing retrace server.
-
Disable SELinux
There is no change when deploying real and testing retrace server.
-
-
Test your server
You should be able to test your server the same way as when server deployed normally. Only difference would be, that you cannot update just any coredump. The package from which the crashing app comes must be in your repository. You can download it later and run
reposync
again and you should be good to go. And do not forget, your release is now calledLocal release 25 (Twenty five)
.
##Most often problems mainly when testing retrace server deployed
-
Submitting coredump via manager from local folder and retrace server cannot find it
Create tarball of the coredump
tar -cf coredump.tar coredump
and put it into /var or /var/spool. Then put path asfile:///var/(spool/)coredump.tar
-
Task fails on running mock (last command starts with /usr/bin/mock init --resul...)
There is a lot of possibilites, but most often it is one of two:
* You have not enough space in `/usr/lib/mock` * A gpg check failed. Set `RequireGPGCheck = 0` in `/etc/retrace-server.conf` and restart httpd.