Invoice Ninja V5 PDF Not Generating

There’s a little issue with Invoice Ninja V5 not generating your PDF form after installation via manual path.
The initial test via configuration stage works but once you actually try to generate the PDF, it just hangs and loops.
Checking the logs, the PDF was never generated, thus there is nothing to return to the web browser.

On my installation, the problem was that the “<invoice_ninja_folder>/storage/app/public” folder was NOT created,
create it and change owner to www-data.

Next execute …

php artisan storage:link

This will create a symbolic link under the “<invoice_ninja_folder>/public” folder that points to the “<invoice_ninja_folder>/storage/app/public” folder.

Now this should enable Invoice Ninja V5 generate pdf properly.

Sources:

Source 1
Source 2
Source 3
Source 4

MariaDB/MySQL Replication Error : Event Invalid Data Length 0

This is also known as ‘Event too small’ Error.

Doing a mysqlbinlog on the relay log file… you’ll see this at the end of the log.

ERROR: Error IN Log_event::read_log_event(): 'Event invalid', data_len: 0, event_type: 0
ERROR: Could NOT READ entry at offset xxxxxxx: Error IN log format OR READ error.

To fix this, just follow these steps…

  1. STOP SLAVE
  2. SHOW SLAVE STATUS
  3. Note down ‘Relay_Master_Log_File‘ and ‘Exec_Master_Log_Pos‘ entries.
  4. RESET SLAVE
  5. CHANGE MASTER TO ….. (use MASTER_LOG_FILE=relay_master_log_file and MASTER_LOG_POS=exec_master_log_pos from Step 3)
  6. START SLAVE

Found this fix from this site…

http://www.softwareprojects.com/resources/programming/t-how-to-recover-from-mysql-replication-event-too-sma-1859.html

10 year old to date but still works.

pfBlockerNG – DNSBL out of Sync & Reloading Unbound Fail

There’s a problem when updating pfBlockerNG and DNSBL gets out of sync (yellow) and stays there no matter how much your restart/reload the plugin or script or database.

Below is the error you will find in pfblockerng log file.

Reloading Unbound Resolver..
DNSBL enabled FAIL - restoring Unbound conf *** Fix error(s) and a Force Reload required! ***
error: SSL handshake failed

This is related to the unbound error log you will find in the system log under DNS Resolver.

unbound error: remote control failed ssl crypto error:????????:SSL routines:SSL3_READ_BYTES:sslv3 alert bad certificate
unbound notice: failed connection from 127.0.0.1 port ?????
unbound error: remote control connection closed prematurely

To fix this, just delete the cert files under /var/ubound/

unbound_control.key
unbound_control.pem
unbound_server.key
unbound_server.pem

and reboot DNS Resolver as well as force update/reload pfBlockerNG.

Rebooting DNS Resolver will regenerate the cert keys.

This should fix the DNSBL out of sync issue.

Source

Ubuntu 20.04 + Tomcat 9 Not Creating and Logging to Catalina.out

There’s a small logging problem when installing Tomcat 9 in Ubuntu 20.04. The catalina.out log file is not created and populated by tomcat. This is due to Ubuntu rsyslog access rights to the folder vs debian which rsyslog runs in root permission. To fix this you can modify the tomcat9.conf under the /usr/lib/tmpfiles.d/ folder. Change the permission to 2770 instead of 2750.

That’s it! Save and reboot!

 

Source: File “catalina.out” not being created/populated when using Tomcat 9.0.31 + Ubuntu 20.04, and content goes to the Ubuntu syslog instead?

IntelliJ Not Searching All Files in “Find In Path”

Here’s a little annoyance in Idea’s IntelliJ “Find in Path…” feature. I’m not sure, but I think this is the behavior in their other products also (i.e PhpStorm, PyCharm, etc…)

When doing “Find in Path…” for a word you know is in that certain file, and that file does not show in the search result window. First thing that comes into mind is it may be a bug. But actually its a limitation?/feature?. The search preview only shows the FIRST 100 search results. That it! Image sample below.

To “fix” this, go to Help->Find Action and type “Registry“. Look for ide.usages.page.size and change the value to the total amount you want. I set mine to 1000.

Now, try searching again. This should show more than 100 search result, and hopefully the file your looking for.

Changing MS Teams Organization Name

I had forgotten that I used a temporary name for my MS Teams organization name. There’s no way of changing the organization name from the MS Teams dashboard as well as the settings page.

Looking around the net, there is actually a way to change it, by going into the MS billing account information and change the organization name there. I linked the source below as well as the screen shot of the steps on how to modify the organization name without deactivating or removing the MS Teams organization and recreating everything from scratch.

 

Source

Installing LetsEncrypt in One Server, One IP Address and Two Different Domain Names

I have to domains pointing to one server ( one ip address ) and want to have two different SSL certificates for the two domains.

Initially I did…

certbot --nginx -d domain1.com -d domain2.com

now the problem here is that the folder created for the cert will be one of the two domain names… ( domain1.com or domain2.com )
I like to have two separate folders for each domain.

So, the simplest thing to do…. execute each domain separately, that’s it!

certbot --nginx -d domain1.com
certbot --nginx -d domain2.com

next, in the “default” file under nginx/sites-available folder… you can separate the two server configs and change the folder path for each domain two reflect their correct ssl folder.

ssl_certificate /etc/letsencrypt/live/domain1.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain1.com/privkey.pem; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/domain2.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/domain2.com/privkey.pem; # managed by Certbot

Recover Lost Partition Table VMFS Datastore Partition

I almost forgot about this, hopefully I still remember what I did 😀

After the initial borked upgrade from 6.5 to 6.7, the partition table I also “accidentally” deleted.

This should help with the recovery if ever you also remove/deleted your datastore BUT didn’t know it actually deletes your partition table. ( ./Facepalm -> ./wrist )

So, all-in-all, you just need to

Sources:
Recovering a Lost Partition with VMFS Datasotre
Recreating a missing VMFS datastore partition in VMware vSphere 5.x and 6.x
Removed VMFS3 volume from iSCSI target – am I screwed?