billing module 2.0 update caused multiple problems

Discussion in 'Plugins/Modules/Addons' started by davidisko, Nov 5, 2016.

  1. davidisko

    davidisko New Member

    1. after updating ispconfig billing module 2.0 some of my invoices, many, just disappeared from invoices list but they are in mysql database.

    2. i cannot create pdf invoice also.
    After clicking on Save & Finalize Invoice the screen just scrolls up to the top and does nothing.

    3. i'm missing delete button in Drafts - therefore can't delete drafts.
    I can see the same problem in ispconfig demo
    [​IMG]

    4. i can see all of my clients in ISPConfig -> Client - > Clients
    but not in the ISPConfig -> Billing -> Client list
    maybe that's why i can't see all of my invoices


    ------
    i've updated billing module using obtained zip file, which i unzipped on the server and run php update.php as root.
    tried it run again, but it didn't help.
    it says "ISPConfig Billing module has been updated."

    debian jessie 8.6, php 5.6.27, mysql 5.5.52
    ispconfig 3.1.1p1, billing module 2.0
     
    Last edited: Nov 6, 2016
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    1 + 4) Some of your clients have incomplete client details, run: Tools > resync, select clients, in ispconfig to reimport them in the billing module.

    2) Which PDF invoce template do you use? The PDF creation functions owkrs fin as you can see in the online demo. Maybe you use a custom PDF invoice template which does not fully work with the new version?

    3) A draft can only be deleted when you did not finalize it. Any document that got an invoice number assigned (as you can see in your screenshot) can not be deleted anymore.
     
  3. davidisko

    davidisko New Member

    1 + 4) Resync of clients helped.

    2) After i removed whole billing directory i forgot to upload my own templates i was using. After copying and modifying the template it works.

    3) Invoice can be deleted directly from database - invoice table, together with invoice items from invoice_item table, and lowering last invoice number then. I hope this will not make any problems in future.

    Thanks for your help.
     
  4. davidisko

    davidisko New Member

    One problem left.
    Before update to 2.0 i was using SMTP auth for sending invoices via email but now it is not working.

    Verified settings in System -> Interface - Main Config -> Mail
    SMTP host, SMTP port, SMTP user, SMTP password, tried STARTTLS and SSL. Everything is ok.
    Use SMTP to send system mails is checked.
    Mailbox is working.

    This is logged in /var/log/mail.log. (domain and ip are replaced with fake one)
    Nov 8 13:46:06 server1 postfix/smtpd[32730]: connect from server1.domain.tld[1.2.3.4]
    Nov 8 13:46:06 server1 postfix/smtpd[32730]: warning: non-SMTP command from server1.domain.tld[1.2.3.4]: Subject: =?UTF-8?B?hmgreddf6cmEgxI0ufsdIYUG7ffwg=?=
    Nov 8 13:46:06 server1 postfix/smtpd[32730]: disconnect from server1.domain.tld[1.2.3.4]

    /var/log/apache2/error.log
    [Tue Nov 08 13:46:06.766516 2016] [fcgid:warn] [pid 28093] [client 192.168.1.50:55088] mod_fcgid: stderr: PHP Warning: fputs(): SSL: Connection reset by peer in /usr/local/ispconfig/interface/lib/classes/ispcmail.inc.php on line 800, referer: https://admin.domain.tld/index.php
    [Tue Nov 08 13:46:06.766623 2016] [fcgid:warn] [pid 28093] [client 192.168.1.50:55088] mod_fcgid: stderr: PHP Warning: fputs(): SSL operation failed with code 1. OpenSSL Error messages:, referer: https://admin.domain.tld/index.php
    [Tue Nov 08 13:46:06.766632 2016] [fcgid:warn] [pid 28093] [client 192.168.1.50:55088] mod_fcgid: stderr: error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry in /usr/local/ispconfig/interface/lib/classes/ispcmail.inc.php on line 636, referer: https://admin.domain.tld/index.php

    It's working with "SMTP to send system mails" unchecked but i don't want that.
     
    Last edited: Nov 8, 2016
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    That should be ok.

    Try to use localhost as mail server and no ssl or tls. As far as I know, you can't use ssl or tls with the smtp lib that is part of ispconfig.
     
  6. davidisko

    davidisko New Member

    I assure you it worked till 2.0 update.

    There is paid wildcard cerfiticate on the mail server.
    using localhost as SMTP host will throw error about wrong certificate - common name will be not as the one provided in certificate. IT won't sent the email of course.

    Nov 8 17:30:24 server1 postfix/smtpd[1983]: connect from localhost[127.0.0.1]
    Nov 8 17:30:24 server1 postfix/smtpd[1983]: lost connection after STARTTLS from localhost[127.0.0.1]
    Nov 8 17:30:24 server1 postfix/smtpd[1983]: disconnect from localhost[127.0.0.1]

    [Tue Nov 08 17:30:24.716288 2016] [fcgid:warn] [pid 27716] [client 192.168.1.50:46152] mod_fcgid: stderr: PHP Warning: stream_socket_enable_crypto(): Peer certificate CN=`*.domain.tld' did not match expected CN=`localhost' in /usr/local/ispconfig/interface/lib/classes/ispcmail.inc.php on line 605, referer: https://admin.domain.tld/index.php

    The mailserver will not accept SMTP auth on port 25 (without encryption), we do not support this.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Your problem is not related to the billing module at all. The email sending function is a part of ispconfig and not billing.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

  9. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Please try if adding these lines BEFORE the line 605 solves your problem:
    PHP:
                stream_context_set_option($this->_smtp_conn'ssl''verify_host'false);
                
    stream_context_set_option($this->_smtp_conn'ssl''verify_peer'false);
                
    stream_context_set_option($this->_smtp_conn'ssl''allow_self_signed'true);
     
  10. davidisko

    davidisko New Member

    [Tue Nov 08 21:58:49.189589 2016] [fcgid:warn] [pid 8185] [client 192.168.1.50:57150] mod_fcgid: stderr: PHP Warning: fputs(): SSL: Broken pipe in /usr/local/ispconfig/interface/lib/classes/ispcmail.inc.php on line 803, referer: https://admin.domain.tld/index.php
    [Tue Nov 08 21:58:49.189668 2016] [fcgid:warn] [pid 8185] [client 192.168.1.50:57150] mod_fcgid: stderr: PHP Warning: fputs(): SSL operation failed with code 1. OpenSSL Error messages:, referer: https://admin.domain.tld/index.php
    [Tue Nov 08 21:58:49.189674 2016] [fcgid:warn] [pid 8185] [client 192.168.1.50:57150] mod_fcgid: stderr: error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry in /usr/local/ispconfig/interface/lib/classes/ispcmail.inc.php on line 639, referer: https://admin.domain.tld/index.php

    Nov 8 21:58:49 server1 postfix/smtpd[8355]: connect from server1.domain.tld[1.2.3.4]
    Nov 8 21:58:49 server1 postfix/smtpd[8355]: warning: non-SMTP command from server1.domain.tld[1.2.3.4]: Subject: ==?UTF-8?B?hmgreddf6cmEgxI0ufsdIYUG7ffwg=?=
    Nov 8 21:58:49 server1 postfix/smtpd[8355]: disconnect from server1.domain.tld[1.2.3.4]
     

Share This Page