Hello Friends,
I thought I'd set up a SIP server during the holidays and kamailio seemed like a good choice. Since my setup won't be handling large amounts of users, a file based backend seemed like a good choice. Since I didn't find any "new users, please start with these steps" instruction on the web page I just installed the base package for Debian squeeze along with kamailio-berkeley-modules and proceded to try to configure the database.
I set DBENGINE=DB_BERKELEY in /etc/kamailio/kamctlrc and ran 'kamdbctl create', which fails with this message:
root@uma:/home/noa# kamdbctl create db4.6_load: /usr/share/kamailio//db_berkeley/kamailio/lcr_gw: reopen: No such file or directory ERROR: Creating standard tables failed!
I tried DBENGINE=DBTEXT, and the command failed similarly:
INFO: creating DBTEXT tables at: /usr/local/etc/kamailio/dbtext ... cp: cannot stat `/usr/share/kamailio//dbtext/kamailio/lcr_gw': No such file or directory ERROR: Creating core tables failed!
Based on this I have a few questions:
1) Is there a text somewhere outlining the recommended steps to get a basic server going using the .deb packages?
2) What is the recommended backend for the least amount of install time trouble?
3) Is the issue I got into above a known problem? Is there a fix available? I asked my friend google, but she didn't seem to have an easily findable solution.
/noa
Hello,
On 12/26/10 1:46 PM, Noa Resare wrote:
Hello Friends,
I thought I'd set up a SIP server during the holidays and kamailio seemed like a good choice. Since my setup won't be handling large amounts of users, a file based backend seemed like a good choice. Since I didn't find any "new users, please start with these steps" instruction on the web page I just installed the base package for Debian squeeze along with kamailio-berkeley-modules and proceded to try to configure the database.
I set DBENGINE=DB_BERKELEY in /etc/kamailio/kamctlrc and ran 'kamdbctl create', which fails with this message:
root@uma:/home/noa# kamdbctl create db4.6_load: /usr/share/kamailio//db_berkeley/kamailio/lcr_gw: reopen: No such file or directory ERROR: Creating standard tables failed!
I tried DBENGINE=DBTEXT, and the command failed similarly:
INFO: creating DBTEXT tables at: /usr/local/etc/kamailio/dbtext ... cp: cannot stat `/usr/share/kamailio//dbtext/kamailio/lcr_gw': No such file or directory ERROR: Creating core tables failed!
the LCR module got refurbished and changed completely the database structure, but the scripts to create the tables for db_text and db_berkeley engines seem to be not maintained in this case.
Based on this I have a few questions:
- Is there a text somewhere outlining the recommended steps to get a
basic server going using the .deb packages?
Just set your apt sources.list accordingly: http://www.kamailio.org/dokuwiki/doku.php/packages:debs
Then install the packages you want to use.
There is a tutorial to install from source, but if you skip first part about compilation & install, and then work with new paths for files (configs and binaries are in /etc/kamailio and /usr/sbin when installing from debs), it should guide you pretty easy steps to get it work: http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git
- What is the recommended backend for the least amount of install
time trouble?
MySQL is the most used and for sure no troubles in handling db creation. Postgres should be fine as well.
Cheers, Daniel
- Is the issue I got into above a known problem? Is there a fix
available? I asked my friend google, but she didn't seem to have an easily findable solution.
Daniel-Constantin Mierla writes:
the LCR module got refurbished and changed completely the database structure, but the scripts to create the tables for db_text and db_berkeley engines seem to be not maintained in this case.
yes, unless they can be generated automatically from the schema files.
-- juha
On 12/27/10 11:52 AM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
the LCR module got refurbished and changed completely the database structure, but the scripts to create the tables for db_text and db_berkeley engines seem to be not maintained in this case.
yes, unless they can be generated automatically from the schema files.
I tried with dbtext and the lcr tables are created ok.
Noa, what specific version are you using? Seems to be installed from packages, right? Which distro? Then the problem might be in the packaging specs. I did it from sources and all tables are created. Can you send the output of: ls /usr/share/kamailio/dbtext/kamailio/
Juha, they are automatically generated in the source tree, but sometimes it needs to adjust other files (e.g., kamctl, kamdbctl) when the names of tables change.
Cheers, Daniel
On 12/27/10 1:40 PM, Daniel-Constantin Mierla wrote:
On 12/27/10 11:52 AM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
the LCR module got refurbished and changed completely the database structure, but the scripts to create the tables for db_text and db_berkeley engines seem to be not maintained in this case.
yes, unless they can be generated automatically from the schema files.
I tried with dbtext and the lcr tables are created ok.
Noa, what specific version are you using? Seems to be installed from packages, right? Which distro? Then the problem might be in the packaging specs. I did it from sources and all tables are created. Can you send the output of: ls /usr/share/kamailio/dbtext/kamailio/
OK, it proved to be something different -- the new lcr tables for db text were not in the remote repository. I had them locally, probably due to local db schema generation, so my install worked fine.
I uploaded them on remote repository.
Noa, you need to fetch latest version from git branch 3.1 in order to get them (I provided the link to a turorial using git in previous message). Over the night, the new nightly debian builds should have them included.
Juha, they are automatically generated in the source tree, but sometimes it needs to adjust other files (e.g., kamctl, kamdbctl) when the names of tables change.
Juha, can the files for former lcr module tables 'gw' and 'lcr' be removed?
Cheers, Daniel
On 12/27/10 2:09 PM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
Juha, can the files for former lcr module tables 'gw' and 'lcr' be removed?
yes, in 3.1 lcr module uses these three tables: lcr_gw, lcr_rule, lcr_rule_target.
ok, done, cherry-picked in 3.1 for dbtext and db_berkeley.
Cheers, Daniel
On Tue, Dec 28, 2010 at 11:05 AM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
On 12/27/10 2:09 PM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
Juha, can the files for former lcr module tables 'gw' and 'lcr' be
removed?
yes, in 3.1 lcr module uses these three tables: lcr_gw, lcr_rule, lcr_rule_target.
ok, done, cherry-picked in 3.1 for dbtext and db_berkeley.
Great. I tried building .debs from the 3.1 branch (last commit 553190) and indeed it reinits the database of DBTEXT type correctly. Not for db_berkeley though.
/noa
On 12/29/10 6:44 PM, Noa Resare wrote:
On Tue, Dec 28, 2010 at 11:05 AM, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
On 12/27/10 2:09 PM, Juha Heinanen wrote: Daniel-Constantin Mierla writes: Juha, can the files for former lcr module tables 'gw' and 'lcr' be removed? yes, in 3.1 lcr module uses these three tables: lcr_gw, lcr_rule, lcr_rule_target. ok, done, cherry-picked in 3.1 for dbtext and db_berkeley.
Great. I tried building .debs from the 3.1 branch (last commit 553190) and indeed it reinits the database of DBTEXT type correctly. Not for db_berkeley though.
thanks for trying and reporting. db_berkely wasn't fixed indeed, I will do it in moments.
Cheers, Daniel
On 12/29/10 6:48 PM, Daniel-Constantin Mierla wrote:
On 12/29/10 6:44 PM, Noa Resare wrote:
On Tue, Dec 28, 2010 at 11:05 AM, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
On 12/27/10 2:09 PM, Juha Heinanen wrote: Daniel-Constantin Mierla writes: Juha, can the files for former lcr module tables 'gw' and 'lcr' be removed? yes, in 3.1 lcr module uses these three tables: lcr_gw, lcr_rule, lcr_rule_target. ok, done, cherry-picked in 3.1 for dbtext and db_berkeley.
Great. I tried building .debs from the 3.1 branch (last commit 553190) and indeed it reinits the database of DBTEXT type correctly. Not for db_berkeley though.
thanks for trying and reporting. db_berkely wasn't fixed indeed, I will do it in moments.
actually I backported for db_berkeley as well -- first time I thought i didn't do it.
However, the fix for db_berkely was done one day later than for dbtext, the commit hash 8442fb34 -- take again the latest version of the branch.
Cheers, Daniel
I've now verified that berkeley db creation works in the 3.1 branch. Good work!
/noa
On Wed, Dec 29, 2010 at 7:07 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
On 12/29/10 6:48 PM, Daniel-Constantin Mierla wrote:
On 12/29/10 6:44 PM, Noa Resare wrote:
On Tue, Dec 28, 2010 at 11:05 AM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
On 12/27/10 2:09 PM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
Juha, can the files for former lcr module tables 'gw' and 'lcr' be
removed?
yes, in 3.1 lcr module uses these three tables: lcr_gw, lcr_rule, lcr_rule_target.
ok, done, cherry-picked in 3.1 for dbtext and db_berkeley.
Great. I tried building .debs from the 3.1 branch (last commit 553190) and indeed it reinits the database of DBTEXT type correctly. Not for db_berkeley though.
thanks for trying and reporting. db_berkely wasn't fixed indeed, I will do it in moments.
actually I backported for db_berkeley as well -- first time I thought i didn't do it.
However, the fix for db_berkely was done one day later than for dbtext, the commit hash 8442fb34 -- take again the latest version of the branch.
Cheers, Daniel
-- Daniel-Constantin Mierla Kamailio (OpenSER) Advanced Training Jan 24-26, 2011, Irvine, CA, USAhttp://www.asipto.com
On Mon, Dec 27, 2010 at 1:40 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
I tried with dbtext and the lcr tables are created ok.
Noa, what specific version are you using? Seems to be installed from packages, right? Which distro? Then the problem might be in the packaging specs. I did it from sources and all tables are created. Can you send the output of: ls /usr/share/kamailio/dbtext/kamailio/
I'm using the 3.1.1+squeeze1 .deb packages as available from http://deb.kamailio.org/kamailio (on Debian squeeze)
The contents of /usr/share/kamailio/dbtext/kamailio matches the output of dpkg --contents kamailio_3.1.1+squeeze1_i386.deb |grep dbtext.kamailio (see attached file)
/noa
On Mon, Dec 27, 2010 at 11:26 AM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
Hello,
On 12/26/10 1:46 PM, Noa Resare wrote:
Hello Friends,
I thought I'd set up a SIP server during the holidays and kamailio seemed like a good choice. Since my setup won't be handling large amounts of users, a file based backend seemed like a good choice. Since I didn't find any "new users, please start with these steps" instruction on the web page I just installed the base package for Debian squeeze along with kamailio-berkeley-modules and proceded to try to configure the database.
I set DBENGINE=DB_BERKELEY in /etc/kamailio/kamctlrc and ran 'kamdbctl create', which fails with this message:
root@uma:/home/noa# kamdbctl create db4.6_load: /usr/share/kamailio//db_berkeley/kamailio/lcr_gw: reopen: No such file or directory ERROR: Creating standard tables failed!
I tried DBENGINE=DBTEXT, and the command failed similarly:
INFO: creating DBTEXT tables at: /usr/local/etc/kamailio/dbtext ... cp: cannot stat `/usr/share/kamailio//dbtext/kamailio/lcr_gw': No such file or directory ERROR: Creating core tables failed!
the LCR module got refurbished and changed completely the database
structure, but the scripts to create the tables for db_text and db_berkeley engines seem to be not maintained in this case.
Based on this I have a few questions:
- Is there a text somewhere outlining the recommended steps to get a
basic server going using the .deb packages?
Just set your apt sources.list accordingly: http://www.kamailio.org/dokuwiki/doku.php/packages:debs
Then install the packages you want to use.
There is a tutorial to install from source, but if you skip first part about compilation & install, and then work with new paths for files (configs and binaries are in /etc/kamailio and /usr/sbin when installing from debs), it should guide you pretty easy steps to get it work: http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git
- What is the recommended backend for the least amount of install time
trouble?
MySQL is the most used and for sure no troubles in handling db creation. Postgres should be fine as well.
The MySQL integration seems to work without issues. Thanks!
/noa