Перестала сниматся абонплата

Модуль организации Diulup и VPN доступа
Ответить
Shturm_N
Сообщения: 141
Зарегистрирован: Вт мар 02, 2010 1:59 pm
Откуда: Lugansk
Контактная информация:

Перестала сниматся абонплата

Сообщение Shturm_N » Сб апр 13, 2019 8:49 pm

Ветка установлена старая 0,5. Последний срез. По ряду причин не обновлял до сего времени.
Внезапно перестала сниматься абонплата. Причем на ровном месте. Не помню, чтоб обновлял, что либо в ОС. Хотя не исключаю. На всякий случай откатил всю систему на снэпшот до появления проблемы (благо - биллинг живет в виртуалке и есть автоматические бэкапы в виде снэпшотов). Причем, создан снэпшот на три дня раньше. Тоже самое. Абонплата у меня только за активные дни и только дневная. Пробовал запуск скрипта в дэбаг режиме (/usr/abills/libexec/periodic daily NO_ADM_REPORT DEBUG=10 ). Запросы в базу он строит верные. Руками запросы из дэбага кидаю в базу - все верно и все строится, визуально, правильно. Ошибок нигде не появляется но в положенные дни в отчетах пусто. Пробовал в скрипт periodic вставлять контрольные print различных переменных, чтоб понять где проблема. Прекращается работа примерно на строках:

Код: Выделить всё

  foreach my $s (@$list) {
    my $ret        = 0;
    my $error_text = '';
    my $count      = $s->{count} || 0;
    my $login      = $s->{login} || '-';
    my $type       = $s->{type};
    my $action     = $s->{action};
    my $shedule_id = $s->{id};
Насколько я понимаю, periodic должен дёрнуть скрипт /usr/abills/Abills/mysql/Fees.pm. Но туда, похоже, выполнение не передается вообще.
Подскажите, пожалуйста, где я мог ошибиться?

~AsmodeuS~
Site Admin
Сообщения: 5697
Зарегистрирован: Пт янв 28, 2005 3:11 pm
Контактная информация:

Re: Перестала сниматся абонплата

Сообщение ~AsmodeuS~ » Вс апр 14, 2019 8:52 am

/usr/abills/libexec/periodic daily DEBUG=1..5

Shturm_N
Сообщения: 141
Зарегистрирован: Вт мар 02, 2010 1:59 pm
Откуда: Lugansk
Контактная информация:

Re: Перестала сниматся абонплата

Сообщение Shturm_N » Вс апр 14, 2019 9:04 am

Код: Выделить всё

root@monitor:~# /usr/abills/libexec/periodic daily DEBUG=5
==> FUNCTION: credit_operation
==> FUNCTION: reduction_operation
==> FUNCTION: dv_daily_fees
==> FUNCTION: dv_users_warning_messages
==> FUNCTION: dv_holdup_fees
==> FUNCTION: admin_report_daily
Redundant argument in sprintf at /usr/abills/libexec/periodic line 458.
==> FUNCTION: sheduler
DBI::db=HASH(0x55c7f2490f48)Admins=HASH(0x55c7f21a3148)DEBUG MODE: 5
==> FUNCTION: credit_operation
Reset Credit
poloid82 (141) DEPOSIT: 495.9276 CREDIT: 100 CREDIT_DATE: 2019-04-14
==> FUNCTION: reduction_operation
Reset reduction
==> FUNCTION: dv_daily_fees
DV: Daily periodic fees
TP ID: 103 DF: 3.33 POSTPAID: 1 REDUCTION: 1 EXT_BILL: 0 CREDIT: 0
TP ID: 107 DF: 3.33 POSTPAID: 1 REDUCTION: 1 EXT_BILL: 0 CREDIT: 0
TP ID: 108 DF: 5 POSTPAID: 1 REDUCTION: 1 EXT_BILL: 0 CREDIT: 0
TP ID: 111 DF: 3.34 POSTPAID: 1 REDUCTION: 1 EXT_BILL: 0 CREDIT: 0
TP ID: 112 DF: 5.34 POSTPAID: 1 REDUCTION: 1 EXT_BILL: 0 CREDIT: 0
TP ID: 113 DF: 8.66 POSTPAID: 1 REDUCTION: 1 EXT_BILL: 0 CREDIT: 0
TP ID: 114 DF: 13.33 POSTPAID: 1 REDUCTION: 1 EXT_BILL: 0 CREDIT: 0
TP ID: 116 DF: 10.66 POSTPAID: 1 REDUCTION: 1 EXT_BILL: 0 CREDIT: 0
Bonus payments
==> FUNCTION: dv_users_warning_messages
DV: Daily warning messages
==> FUNCTION: dv_holdup_fees
==> FUNCTION: admin_report_daily
==> FUNCTION: sheduler
Shedule

~AsmodeuS~
Site Admin
Сообщения: 5697
Зарегистрирован: Пт янв 28, 2005 3:11 pm
Контактная информация:

Re: Перестала сниматся абонплата

Сообщение ~AsmodeuS~ » Вс апр 14, 2019 7:46 pm

/usr/abills/libexec/periodic monthly DEBUG=1 DATE="2019-04-01"

Shturm_N
Сообщения: 141
Зарегистрирован: Вт мар 02, 2010 1:59 pm
Откуда: Lugansk
Контактная информация:

Re: Перестала сниматся абонплата

Сообщение Shturm_N » Вс апр 14, 2019 8:18 pm

Код: Выделить всё

root@monitor:/usr/abills/libexec# /usr/abills/libexec/periodic monthly DEBUG=1 DATE="2019-04-01"
sh: 1: -c: not found
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: [Warning] Using a password on the command line interface can be insecure.
-- Connecting to 127.0.0.1...
-- Starting transaction...
-- Setting savepoint...
-- Retrieving table structure for table _district_list...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table _segment_list...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table admin_actions...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table admin_permits...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table admin_settings...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table admin_system_actions...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table admins...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table admins_allow_ips...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table admins_groups...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table bills...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table bonus_log...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table builds...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table cards_bruteforce...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table cards_dillers...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table cards_users...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table companie_admins...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table companies...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table config...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table dhcphosts_hosts...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table dhcphosts_leases...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table dhcphosts_networks...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table dhcphosts_routes...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table dillers_permits...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table dillers_tps...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table districts...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table docs_acts...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table docs_invoice2payments...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table docs_invoice_orders...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table docs_invoices...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table docs_main...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table docs_receipt_orders...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table docs_receipts...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table docs_tax_invoice_orders...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table docs_tax_invoices...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table domains...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table dv_calls...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table dv_log...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table dv_log_intervals...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table dv_log_intervals_old...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table dv_main...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table exchange_rate...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table exchange_rate_log...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table extfin_balance_reports...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table fees...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table fees_types...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table filters...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table groups...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table help...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table holidays...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table id...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table intervals...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table ippools...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table mail_access...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table mail_aliases...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table mail_boxes...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table mail_domains...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table msgs_admins...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table msgs_attachments...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table msgs_chapters...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table msgs_dispatch...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table msgs_dispatch_admins...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table msgs_messages...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table msgs_reply...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table msgs_survey_answers...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table msgs_survey_questions...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table msgs_survey_subjects...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table msgs_unreg_requests...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table multidoms_nas_tps...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table nas...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table nas_groups...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table nas_ippools...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table netflow_address...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table networks...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table payments...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table reg_wizard...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table reports_wizard...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table shedule...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table sqlcmd_history...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table storage_sn...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table streets...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table tarif_plans...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table tp_bonus_rating...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table tp_groups...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table tp_nas...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table traffic_classes...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table trafic_tarifs...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table users...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table users_bruteforce...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table users_nas...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table users_pi...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table voip_calls...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table voip_ivr_log...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table voip_log...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table voip_main...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table voip_route_extra_tarification...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table voip_route_groups...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table voip_route_prices...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table voip_routes...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table voip_tps...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table voip_trunks...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table web_online...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Retrieving table structure for table web_users_sessions...
-- Sending SELECT query...
-- Retrieving rows...
-- Rolling back to savepoint sp...
-- Releasing savepoint...
-- Disconnecting from 127.0.0.1...
/bin/tar: Removing leading `/' from member names
You have new mail in /var/mail/root

Shturm_N
Сообщения: 141
Зарегистрирован: Вт мар 02, 2010 1:59 pm
Откуда: Lugansk
Контактная информация:

Re: Перестала сниматся абонплата

Сообщение Shturm_N » Вс апр 14, 2019 8:34 pm

Сегодня клонировал виртуалку и обновил до последнего релиза Abills. Но проблема та же.

Shturm_N
Сообщения: 141
Зарегистрирован: Вт мар 02, 2010 1:59 pm
Откуда: Lugansk
Контактная информация:

Re: Перестала сниматся абонплата

Сообщение Shturm_N » Пн апр 15, 2019 8:59 am

Победил.
по итогу:
1. развернул на дублере последний срез из свн. и проверил что работает в заводских настройках.
2. скопировал базу.
2. залил старую базу.
3. сравнением структур и выедргиванием кусков из стартовой структуры смог запустить связку.
4. нашел как перелить статистику и активации.
5. создал дампы и перелил их на основу.

~AsmodeuS~
Site Admin
Сообщения: 5697
Зарегистрирован: Пт янв 28, 2005 3:11 pm
Контактная информация:

Re: Перестала сниматся абонплата

Сообщение ~AsmodeuS~ » Пн апр 15, 2019 1:32 pm

супер, поздравляю

Ответить