[OpenSIPS-Users] openxcap: cannot find libgnutls on this system

Ming Li MLi at counterpath.com
Wed Mar 21 01:18:47 CET 2012


Hello,

I installed and configured openxcap 2.0.1 on my SuSE 12.1. When I
start the openXcap server(/etc/init.d/openxcap start), there is a
error says:

Mar 20 16:30:23 XCAP-MING openxcap[6949]: Starting OpenXCAP 2.0.1
Mar 20 16:30:23 XCAP-MING openxcap[6949]: using set_wakeup_fd
Mar 20 16:30:23 XCAP-MING openxcap[6949]: fatal error: failed to
create OpenXCAP 2.0.1: cannot find libgnutls on this system


I checked my system, both 32 bits and 64 bits libgnutls.so.xx.xx.xxx
have been installed.

I run python to check xcap like below:
================================================================
XCAP-MING:/ # python
Python 2.7.2 (default, Aug 19 2011, 20:41:43) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> help()

Welcome to Python 2.7!  This is the online help utility.

help> xcap
Help on package xcap:

NAME
   xcap - XCAP package

FILE
   /usr/local/lib/python2.7/site-packages/xcap/__init__.py

PACKAGE CONTENTS
   appusage (package)
   authentication
   datatypes
   dbutil
   element
   errors
   interfaces (package)
   logutil
   resource
   sax (package)
   server
   tls
   tweaks
   uri
   xcapdiff
   xpath

DATA
   __cfgfile__ = 'config.ini'
   __version__ = '2.0.1'
   dependencies = <application.dependency.ApplicationDependencies object>
   package_dependencies = [<application.dependency.PackageDependency obje...
   package_requirements = {'python-application': '1.2.8', 'python-gnutls'...

VERSION
   2.0.1

help> xcap.server
using set_wakeup_fd
fatal error: OpenXCAP needs a backend to be specified in order to run
problem in xcap.server - <type 'exceptions.SystemExit'>: 1

===================================================

It seems to me that it failed to call set_wakeup_fd because of missing
backend setting.
but the backend has been set in config.ini file. I do not know what is going on.

I past my configure files for opensips and openxcap here

============== config.ini =============================
;configuration file for OpenXCAP

[Server]

; IP address to listen for requests
; 0.0.0.0 means any address of this host

address = 0.0.0.0

; This is a comma separated list of XCAP root URIs. The first is the
; primary XCAP root URI, while the others (if specified) are aliases.
; The primary root URI is used when generating xcap-diff
; If the scheme is https, then the server will listen for requests in TLS mode.

;root = http://xcap.example.com/xcap-root
root = http://192.168.111.128/xcap-root

; The backend to be used for storage and authentication. Current supported
; values are Database and OpenSIPS. OpenSIPS backend inherits all the settings
; from the Database backend but performs extra actions related to the
; integration with OpenSIPS for which it read the settings from [OpenSIPS]
; section

backend = OpenSIPS

; Validate XCAP documents against XML schemas

; document_validation = Yes

; Allow URIs in pres-rules and resource-lists to point to lists not served
; by this server

allow_external_references = No

; List os applications that won't be enabled on the server
;disabled_applications = test-app, org.openxcap.dialog-rules

[Logging]

; Start, stop and major server error messages are always logged to syslog.

; This section can be used to log more details about XCAP clients accessing
; the server. The values in the commented lines represent the defaults built
; in the server software

; Directory where to write access.log file that will contain requests and/or
; responses to OpenXCAP server in Apache style. If set to an empty string,
; access logs will be printed to stdout if the server runs in no-fork mode
; or to syslog if the server runs in the background

directory=/var/log/openxcap

; The following parameters control what kind of information (like
; stacktrace, body or headers) is logged for which response codes. The
; values must be a comma-separated list of HTTP response codes or the
; keyword 'any' that matches all response codes.

log_stacktrace=500
log_response_headers=500
log_response_body=500
log_request_headers=500
log_request_body=500


[Authentication]

; The HTTP authentication type, this can be either 'basic' or 'digest'. The
; standard states 'digest' as the mandatory, however it can be changed to
; basic

type = digest

; Specify if the passwords are stored as plain text - Yes
; or in a hashed format MD5('username:domain:password') - No
; cleartext_passwords = Yes

; The default authentication realm, if none indicated in the HTTP request
; URI
;default_realm = example.com
default_realm = 192.168.111.128

; A comma-separated list of hosts or networks to trust.
; The elements can be an IP address in CIDR format, a
; hostname or an IP address (in the latter 2 a mask of 32
; is assumed), or the special keywords 'any' and 'none'
; (being equivalent to 0.0.0.0/0 and 0.0.0.0/32
; respectively).
; trusted_peers =


[TLS]

; Location of X509 certificate and private key that identify this server.
; The path is relative to /etc/openxcap, or it can be given as an absolute
; path.

; Server X509 certificate
; certificate =

; Server X509 private key
; private_key =


[Database]

; The database connection URI for the datase with subscriber accounts
;authentication_db_uri = mysql://opensips:opensipsrw@localhost/opensips
authentication_db_uri = mysql://opensips:opensipsrw@localhost/opensips

; The database connection URI for the database that stores the XCAP documents
;storage_db_uri = mysql://opensips:opensipsrw@localhost/opensips
storage_db_uri = mysql://opensips:opensipsrw@localhost/opensips

; Authentication and storage tables
subscriber_table = subscriber
xcap_table = xcap

[OpenSIPS]

; The address and port of the xml-rpc management interface
;xmlrpc_url = http://sip.example.com:8080
xmlrpc_url = http://192.168.111.128:8080

; Publish xcap-diff event via OpenSIPS management interface
; enable_publish_xcapdiff = yes
enable_publish_xcapdiff = yes

====================================================

============ opensips.cfg ==============================
#
# $Id: opensips.cfg 8591 2011-11-26 08:27:25Z bogdan_iancu $
#
# OpenSIPS basic configuration script
#     by Anca Vamanu <anca at voice-system.ro>
#
# Please refer to the Core CookBook at:
#      http://www.opensips.org/Resources/DocsCookbooks
# for a explanation of possible statements, functions and parameters.
#


####### Global Parameters #########

debug=3
log_stderror=yes
log_facility=LOG_LOCAL0

fork=yes
children=4

/* uncomment the following lines to enable debugging */
#debug=6
#fork=no
#log_stderror=yes

/* uncomment the next line to disable TCP (default on) */
#disable_tcp=yes

/* uncomment the next line to enable the auto temporary blacklisting of
  not available destinations (default disabled) */
#disable_dns_blacklist=no

/* uncomment the next line to enable IPv6 lookup after IPv4 dns
  lookup failures (default disabled) */
#dns_try_ipv6=yes

/* uncomment the next line to disable the auto discovery of local aliases
  based on revers DNS on IPs (default on) */
#auto_aliases=no

/* uncomment the following lines to enable TLS support  (default off) */
#disable_tls = no
#listen = tls:your_IP:5061
#tls_verify_server = 1
#tls_verify_client = 1
#tls_require_client_certificate = 0
#tls_method = TLSv1
#tls_certificate = "/usr/local/etc/opensips/tls/user/user-cert.pem"
#tls_private_key = "/usr/local/etc/opensips/tls/user/user-privkey.pem"
#tls_ca_list = "/usr/local/etc/opensips/tls/user/user-calist.pem"

/* default db_url to be used by modules requiring DB connection;
  uncomment it if you use any module requiring DB connectivity */
#db_default_url="mysql://opensips:opensipsrw@localhost/opensips"


port=5060

/* uncomment and configure the following line if you want opensips to
  bind on a specific interface/port/proto (default bind on all available) */
#listen=udp:192.168.1.2:5060


####### Modules Section ########

#set module path
mpath="/usr/local/lib/opensips/modules/"

/* uncomment next line for MySQL DB support */
loadmodule "db_mysql.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
loadmodule "uri.so"
loadmodule "acc.so"
/* uncomment next lines for MySQL based authentication support
  NOTE: a DB (like db_mysql) module must be also loaded */
loadmodule "auth.so"
loadmodule "auth_db.so"
/* uncomment next line for aliases support
  NOTE: a DB (like db_mysql) module must be also loaded */
#loadmodule "alias_db.so"
/* uncomment next line for multi-domain support
  NOTE: a DB (like db_mysql) module must be also loaded
  NOTE: be sure and enable multi-domain support in all used modules
        (see "multi-module params" section ) */
#loadmodule "domain.so"
/* uncomment the next two lines for presence server support
  NOTE: a DB (like db_mysql) module must be also loaded */
loadmodule "presence.so"
loadmodule "presence_xml.so"


# ----------------- setting module-specific parameters ---------------


# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")


# ----- rr params -----
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 0)


# ----- registrar params -----
/* uncomment the next line not to allow more than 10 contacts per AOR */
#modparam("registrar", "max_contacts", 10)


# ----- usrloc params -----
#modparam("usrloc", "db_mode",   0)
/* uncomment the following lines if you want to enable DB persistency
  for location entries */
modparam("usrloc", "db_mode",   2)
modparam("usrloc", "db_url",
       "mysql://opensips:opensipsrw@localhost/opensips")


# ----- uri params -----
modparam("uri", "use_uri_table", 0)


# ----- acc params -----
/* what sepcial events should be accounted ? */
modparam("acc", "early_media", 1)
modparam("acc", "report_cancels", 1)
/* by default ww do not adjust the direct of the sequential requests.
  if you enable this parameter, be sure the enable "append_fromtag"
  in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
modparam("acc", "failed_transaction_flag", 3)
modparam("acc", "log_flag", 1)
modparam("acc", "log_missed_flag", 2)
/* uncomment the following lines to enable DB accounting also */
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 2)


# ----- auth_db params -----
/* uncomment the following lines if you want to enable the DB based
  authentication */
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "db_url",
       "mysql://opensips:opensipsrw@localhost/opensips")
#modparam("auth_db", "load_credentials", "")


# ----- alias_db params -----
/* uncomment the following lines if you want to enable the DB based
  aliases */
#modparam("alias_db", "db_url",
#       "mysql://opensips:opensipsrw@localhost/opensips")


# ----- domain params -----
/* uncomment the following lines to enable multi-domain detection
  support */
#modparam("domain", "db_url",
#       "mysql://opensips:opensipsrw@localhost/opensips")
#modparam("domain", "db_mode", 1)   # Use caching


# ----- multi-module params -----
/* uncomment the following line if you want to enable multi-domain support
  in the modules (dafault off) */
#modparam("auth_db|usrloc|uri", "use_domain", 1)


# ----- presence params -----
/* uncomment the following lines if you want to enable presence */
modparam("presence|presence_xml", "db_url",
       "mysql://opensips:opensipsrw@localhost/opensips")
modparam("presence_xml", "force_active", 1)
modparam("presence", "server_address", "sip:192.168.111.1:5060")


# main request routing logic
......

=================================================

also the MySql database is set up properly.

Thanks in advance for suggestions and answers to my problem.

Thank you,
Sam.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120321/ff329893/attachment-0001.htm>


More information about the Users mailing list