<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>-Nudge-<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Anyone got any prior experience with this kind of problem?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Alternatively, if we chose to “start again” is there a simple way to reset all the databases form scratch?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Before the problem reported below, we did try a “ngcp-reset-db” but it didn’t seem to work.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>The manual says this, but we still had old data after running this.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>“To reset database to its original state you can use the script provided by CE: * Execute ngcp-reset-db. It will assign new unique password for the NGCP services and restart all services. IMPORTANT: All existing data will be wiped out without possibility of restoring.”<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Thanks again<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Gavin<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> spce-user-bounces@lists.sipwise.com [mailto:spce-user-bounces@lists.sipwise.com] <b>On Behalf Of </b>Gavin Sweet<br><b>Sent:</b> 19 April 2013 14:33<br><b>To:</b> spce-user@lists.sipwise.com<br><b>Subject:</b> [Spce-user] adding permanent registrations/contacts fails following DB restore<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hi all – <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>We are suddenly unable to get device registrations to properly apply when made through the GUI admin interface or through the SOAP API. Both methods appear to return normally – the GUI reports that the registration has been added, the API returns an Ok. But, in fact the registrations haven’t been added to the DB, and no changes are updated in the GUI. All other functions (add subscribers, change preferences etc) all seem to still work properly over the GUI and the SOAP API.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The only change that we can imagine could have caused this is that we have restored the databases on the system concerned (our lab server) from one of our production servers. <o:p></o:p></p><p class=MsoNormal>Does this sound likely? Anyone know why or how to solve it? <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Restoring from production to lab is just part of the process to baseline again after testing (we have recently started testing with the SOAP API). The backup from which the restore was done was from production to lab server  … just mysqldump > db.sql on production server, then mysql <db.sql on target lab server. The db’s that we backed up and restored were kamailio, billing and provisioning. When that didn’t work we also included the ngcp DB. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The only other change that has recently been made was to run the ngcp-reset-db script at one point when the databases appeared to have failed to restore correctly. (By the way, this did not seem to actually wipe out all data in the way it is intended).<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Looking in the oss.log and comparing between the working production server and the not-working lab server I can see no differences for the same function. In both cases, create_subscriber_registered_device is called and then a POST to /subscriber/add_permanent_contact made – seeming to return properly, but the records are simply not stored in the db, and so not returned in the GUI.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Any help /suggestions / offers of counselling would be greatly appreciated.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Cheers<o:p></o:p></p><p class=MsoNormal>Gavin<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Heres a full snippet from oss.log:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:8.0pt'>Apr 19 13:23:49 skt-salem03 provisioning: Sipwise::Provisioning::_log_xmldata: create_subscriber_registered_device called with: {'authentication' => {'password' => '***<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'>*****','type' => 'admin','username' => 'administrator'},'parameters' => {'contact' => 'sip:a112@1.2.3.4','domain' => 'skyrack.net','username' => 'a001001'}}<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'>Apr 19 13:23:49 skt-salem03 provisioning: Sipwise::Provisioning::handle_request: calling function 'create_subscriber_registered_device' for admin 'administrator'<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'>Apr 19 13:23:49 skt-salem03 provisioning: Sipwise::Provisioning::Config::new: using config file "/etc/ngcp-ossbss/provisioning.conf"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'>Apr 19 13:23:49 skt-salem03 provisioning: Sipwise::Provisioning::new: Sipwise::Provisioning::XMLDispatcher object initialized<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'>Apr 19 13:23:49 skt-salem03 provisioning: Sipwise::Provisioning::XMLDispatcher::dispatch: dispatching xmlrpc proxy request to 10.239.110.182:8000/RPC2<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'>Apr 19 13:23:54 skt-salem03 provisioning: Sipwise::Provisioning::_log_xmldata: create_subscriber_registered_device returned with: 1<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'>Apr 19 13:23:54 skt-salem03 /usr/sbin/apache2: ***Provisioning::call_prov calling 'billing::get_voip_account_subscriber_by_id'<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'>Apr 19 13:23:54 skt-salem03 oss: 213.152.52.193 - - [19/Apr/2013:13:23:49 +0100] "POST /subscriber/add_permanent_contact HTTP/1.1" 302 818 "https://109.239.110.183:1443<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'>/subscriber/detail?subscriber_id=18" "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0"<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'>Apr 19 13:23:54 skt-salem03 /usr/sbin/apache2: ***Provisioning::call_prov calling 'voip::create_subscriber_registered_device'<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'>Apr 19 13:23:54 skt-salem03 apache2: [info] Subsequent (No.6) HTTPS request received for child 12 (server myserver:443)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt'><o:p> </o:p></span></p><div class=MsoNormal align=center style='text-align:center'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><hr size=1 width="100%" noshade style='color:gray' align=center></span></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>No virus found in this message.<br>Checked by AVG - <a href="http://www.avg.com">www.avg.com</a><br>Version: 2013.0.2904 / Virus Database: 3162/6250 - Release Date: 04/17/13<o:p></o:p></span></p></div></div></body></html>