×


Category: Server Management Service


Install Bcrypt in Docker and resolve related errors

This article covers how to install Bcrypt in Docker and fix relating Docker errors.

To fix bcrypt error on Docker:

The error looks like this,

internal/modules/cjs/loader.js:807
app_1 | return process.dlopen(module, path.toNamespacedPath(filename));

To resolve, simply Add the following lines of code to the start.sh file,

#!/usr/bin/env bash

# install new dependencies if any
npm install
# uninstall the current bcrypt modules
npm uninstall bcrypt
# install the bcrypt modules for the machine
npm install bcrypt
echo "Starting API server"
npm start

Here,

i. npm uninstall bcrypt would remove bcrypt modules for the other operating system.
ii. npm install bcrypt would install for the current machine that the app would be running on.


NRPE: No Output Returned From Plugin - How to fix this Nagios error ?

This article covers how to resolve Nagios error, NRPE: No Output Returned From Plugin. This error happens as a result of Permissions or Missing plugin.

To fix this Nagios error:

1. The most common solution is to check the permissions on the check_nrpe binary on the Nagios XI server:

ls -la /usr/local/nagios/libexec/check_nrpe

The expected permissions should resemble:

-rwxrwxr-x. 1 nagios nagios  75444 Nov 21 01:38 check_nrpe

2. If not, change ownership to user/group "nagios" and fix up the permissions:

$ chown nagios:nagios /usr/local/nagios/libexec/check_nrpe
$ chmod u+rwx /usr/local/nagios/libexec/check_nrpe
$ chmod u+rx /usr/local/nagios/libexec/check_nrpe


Cloud SQL Proxy error – An attempt was made to access a socket

This article covers methods to resolve Cloud SQL Proxy error. 

The Cloud SQL Proxy error looks like this:

An attempt was made to access a socket in a way forbidden by its access permissions


Therefore you cannot bind to it while it's running:

The SQL Server engages the 3306 port locally. 

1. Stop the SQL Server to bind the CloudSQL Proxy to it.

2. Incase of Windows 10: Go to Task Manager -> Services -> MySQL57

3. Right click and stop that task. 

4. Once you have done that try running the same command again. 

It'll work and show as output:

Listening on 127.0.0.1:3306 for <instance-name>


Requirements for using the Cloud SQL Auth proxy.

To use the Cloud SQL Auth proxy, you must meet the following requirements:

1. The Cloud SQL Admin API must be enabled.

2. You must provide the Cloud SQL Auth proxy with Google Cloud authentication credentials.

3. You must provide the Cloud SQL Auth proxy with a valid database user account and password.

4. The instance must either have a public IPv4 address, or be configured to use private IP.

The public IP address does not need to be accessible to any external address (it does not need to be added as an authorized network address).


Plesk error Access to the path is denied - Fix it Now

This article covers Plesk Access to the path is denied error. For instance, while trying to access http://example.com/testfolder/test.aspx, it produces the error:

Access to the path %plesk_vhosts%example.com\httpdocs\testfolder is denied

This signifies that the Required system user and/or permissions are not configured properly for the directory %plesk_vhosts%example.com\httpdocs\testfolder in Plesk.


To fix this Plesk error:

1. Connect to the server via RDP.

2. When default permissions on the domain folder are lost, the following actions can be performed to restore them:

i. For Plesk 12.5, Onyx and Obsidian:

"%plesk_cli%\repair.exe" --repair-webspace-security -webspace-name example.com

If it is necessary to repair permissions for all domains, the following command should be used:

"%plesk_cli%\repair.exe" --repair-all-webspaces-security

Also, Plesk Reconfigurator could be used: in the Windows Start menu, select All Programs > Plesk > Plesk Reconfigurator and select Repair Plesk installation > Plesk Virtual Hosts Security > Check .

ii. For Plesk before 12.5:

Go to the Domains page, mark the required domains, and click on the Check permissions button.

Then uncheck the Check-only mode checkbox and click OK .


Plesk error PHP has encountered an Access Violation - Fix it now

This article covers how to fix PHP has encountered an Access Violation which occurs in the Windows server with the Plesk control panel. 

Do a copy libmysql.dll from C:\Program Files (x86)\SWsoft\Plesk\Additional\PleskPHP5 to C:\WINDOWS\system32

Wait for few minutes and it should fix the issue.


To fix PHP has encountered an Access Violation at XXXXX in Plesk:

1. Connect to the server via SSH.

2. Create a backup of the psa database:

plesk db dump psa > /root/psa_backup.sql

3. Download the attached script:

$ wget https://plesk.zendesk.com/hc/article_attachments/115001860533/script_kb213376309

4. Make the script executable:

$ chmod +x script_kb213376309

5. Launch the script for the affected subscription:

Note: change the "example.com" website in the command below to the correct one.

$ ./script_kb213376309 example.com

6. If an error like below appears:

ERROR 1062 (23000) at line 5: Duplicate entry '123-789' for key 'PRIMARY' exit status 1

find the duplicate record in the database:

Note: change the "123" ipCollectionId in the command below to the correct one based on the error message regarding the duplicate entry.

plesk db "select * from IpAddressesCollections where ipCollectionId=123;"

7. Remove the duplicate record from the database:

Note: change the "123" ipCollectionId in the command below to the correct one based on the error message regarding the duplicate entry

Change the "456" ipAddressId in the command below to the correct one based on the output from the previous step.

$ plesk db "delete from IpAddressesCollections where ipCollectionId=123 and ipAddressId=456;"


Nagios error Service check timed out after n Seconds

This article covers how to resolve 'Service check timed out after n Seconds' error for our customers.

You can increase the timeout on the check, though you will have to alter the check in XI and the plugin timeout in the ncpa.cfg file on the remote host.


If it is related to Nagios XI check_xi_ncpa Timeout:

This timeout is how long the check_xi_ncpa command on the Nagios XI server will wait for a response from the NCPA agent. 

By default the timeout is not set, thereby defaulting to the plugin timeout or the global timeout.

1. In the Nagios XI web interface navigate to Configure > Core Config Manager > Commands. 

2. This brings up the Commands page, use the Search field to search for ncpa and click Search.

3. Click the check_xi_ncpa command.

4. You can change the timeout in Nagios XI with the switch -T in the check_xi_ncpa command.

5. In the Command Line, add -T <time value in seconds> after $HOSTADDRESS$. Ex. -T 120

6. Save your changes and then click the Apply Configuration button.