Jump to content
  • 0

License key issue..


mobbdeep

Question

Hello,

I recently moved my entire service over to my own Linux VPS with a new IP, directory paths, etc. Previously, it was on a cPanel account but now it's on my own Linux VPS using Apache and the root directory path is /usr/var/html/blesta. The problem I am having is when I login to my AdminCP, it requires me to input a license key. At this point, I know to re-issue the license key at which I did through my reseller. However, upon entering the license key at website.com/admin/license, I get the following error:

do164364715501436Z.png

They went as far as reissuing me a complete new license key but I am getting the same error regardless of how many times it gets reissued or given a new license key.

Additionally, I the following:

  • system.debug is set to false in my ~/config/blesta.php file
  • mbstring.func_overload is disabled in my php.ini
  • Latest version of CURL installed
  • SSL is enabled via php and Apache vhost
  • Port 443 is open in the firewall

Not sure what I am forgetting.

Thanks!

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 1

It appears adding TLS support properly in my Apache config worked. To those who are using a setup like mine:

Your Apache config file needs to look like so:

<VirtualHost *:80>
        ServerAdmin email@yourdomain.com
        DocumentRoot "/var/www/html/yourdomain.com/"
        ServerName yourdomain.com
        ServerAlias www.yourdomain.com
        ErrorLog "/var/log/httpd/yourdomain.com-error_log"
        CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

<Directory "/var/www/html/yourdomain.com/">
        DirectoryIndex index.html index.php
        Options Indexes MultiViews FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

	Redirect permanent / httpd://yourdomain.com/
</VirtualHost>

<VirtualHost *:443>
        ServerAdmin email@yourdomain.com
        DocumentRoot "/var/www/html/yourdomain.com/"
        ServerName yourdomain.com
        ServerAlias www.yourdomain.com
        ErrorLog "/var/log/httpd/yourdomain.com-error_log"
        CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

        <If "%{HTTP_HOST} == 'www.yourdomain.com'">
        Redirect permanent / https://yourdomain.com/
  </If>

<Directory "/var/www/html/yourdomain.com/">
        DirectoryIndex index.html index.php
        Options Indexes MultiViews FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>
	SSLEngine On
        SSLProtocol -ALL +TLSv1.1 +TLSv1.2
        SSLCertificateFile /etc/letsencrypt/live/yourdomain.com/cert.dh.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/yourdomain.com/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/live/yourdomain.com/chain.pem
 </VirtualHost>

SSLProtocol -ALL +TLSv1.1 +TLSv1.2 is what's vital in this situation I was having.

Link to comment
Share on other sites

  • 0

Probably your install is unable to validate the license. If you PM me the license key, I can check our logs. Another thing to note besides the things you mentioned, is that you should have moved Blesta by moving the database + files. The /config/blesta.php config file contains a critical System Key which must match the installed database. If you did something like a fresh install and overwrote your database then you would have permanently broken encryption, this included. This is mentioned in our Moving Blesta Guide.

Link to comment
Share on other sites

  • 0

Also, just to add.. if you upload a fresh copy of Blesta to another directory on the server, and access in your browser, it will do a system requirement check. If you are failing on any of the common requirements then it will be obvious. You can delete the files after the check, no need to install. It won't check the firewall though.

Link to comment
Share on other sites

  • 0
5 hours ago, Paul said:

Probably your install is unable to validate the license. If you PM me the license key, I can check our logs. Another thing to note besides the things you mentioned, is that you should have moved Blesta by moving the database + files. The /config/blesta.php config file contains a critical System Key which must match the installed database. If you did something like a fresh install and overwrote your database then you would have permanently broken encryption, this included. This is mentioned in our Moving Blesta Guide.

 

5 hours ago, Paul said:

Also, just to add.. if you upload a fresh copy of Blesta to another directory on the server, and access in your browser, it will do a system requirement check. If you are failing on any of the common requirements then it will be obvious. You can delete the files after the check, no need to install. It won't check the firewall though.

I did the normal of what I normally do when moving hosts. I took a full site backup and a full database backup then uploaded my site to the new host and imported the database. The only difference of the database previously is the username and database name as when I was on cPanel, they were named cpaneluser_username apposed to now on a Linux VPS, it's just username. I didn't do a fresh install of Blesta or overwrote the database or anything. I just put the website on maintenance, took a backup of the database and website via cPanel, then uploaded both onto the Linux VPS running CentOS 7. I even followed @Blesta.Store's tutorial on his website's knowledgebase. I don't know if this makes a difference but I originally installed Blesta on a cPanel service which use the path ~/username/public_html/.. and now I am using ~/var/www/html/domain.com/.. but that shouldn't change anything since I didn't do a new install then try overwriting the new install with backed up files.

Also, I just did a dependency check with a new upload of Blesta in a separate directory and everything checks out good.

Link to comment
Share on other sites

  • 0

Thanks for PM'ing me your license key. The license is in a state of re-issue, and has not been activated. Our license logs also show no requests for this license, so it's not just a matter of a failure to validate on our end, but no connection has been made to us. By all counts, your installation is not able to reach our license servers to validate the license.

  • Make sure port 443 egress is open at your firewall
  • Make sure you don't have any disabled_functions in your php.ini.. for example, if curl, curl_exec, are disabled in your php.ini, then Blesta will be unable to make any calls to any 3rd party API's, including for license validation.

The only other thing I can check on our end, is whether we are blocking your server's IP address.. but I will need that in order to check. We shouldn't be blocking you unless your server was sending malicious requests to us in the past.

Link to comment
Share on other sites

  • 0
12 hours ago, Paul said:

Thanks for PM'ing me your license key. The license is in a state of re-issue, and has not been activated. Our license logs also show no requests for this license, so it's not just a matter of a failure to validate on our end, but no connection has been made to us. By all counts, your installation is not able to reach our license servers to validate the license.

  • Make sure port 443 egress is open at your firewall
  • Make sure you don't have any disabled_functions in your php.ini.. for example, if curl, curl_exec, are disabled in your php.ini, then Blesta will be unable to make any calls to any 3rd party API's, including for license validation.

 The only other thing I can check on our end, is whether we are blocking your server's IP address.. but I will need that in order to check. We shouldn't be blocking you unless your server was sending malicious requests to us in the past.

I have PM'd you my VPS IP. I just got it the other day from Virmach so hopefully it doesn't come up blocked or anything.

Regarding port 443 egress being opened in my firewall, I double checked that and all is well. Also, nothing is set under disable_functions in my php.ini.

Just to confirm, opening port 443 egress would be:

firewall-cmd --zone=public --add-port=443/tcp --permanent

Correct?

Link to comment
Share on other sites

  • 0
13 hours ago, mobbdeep said:

I have PM'd you my VPS IP. I just got it the other day from Virmach so hopefully it doesn't come up blocked or anything.

Regarding port 443 egress being opened in my firewall, I double checked that and all is well. Also, nothing is set under disable_functions in my php.ini.

Just to confirm, opening port 443 egress would be:


firewall-cmd --zone=public --add-port=443/tcp --permanent

Correct?

I'm not familiar with firewall-cmd does that open up egress or ingress or both? Your server must be able to make an egress connection to us on 443.

Via SSH you can run:

GET https://account.blesta.com

To see if there is a response, should output HTML code for that page. If it does output the proper HTML code, then it's not the firewall and might be your PHP. PHP CURL is used to establish the connection.

Link to comment
Share on other sites

  • 0
21 minutes ago, Paul said:

I'm not familiar with firewall-cmd does that open up egress or ingress or both? Your server must be able to make an egress connection to us on 443.

Via SSH you can run:


GET https://account.blesta.com

To see if there is a response, should output HTML code for that page. If it does output the proper HTML code, then it's not the firewall and might be your PHP. PHP CURL is used to establish the connection.

If I..

curl -L https://account.blesta.com

It returns the HTML code for that page.

I sent you my php.ini via PM if you'd like to take a look. Again, I didn't make any changes to it that may interfere with the connection or license validation.

Link to comment
Share on other sites

  • 0
1 minute ago, mobbdeep said:

If I..


curl -L https://account.blesta.com

It returns the HTML code for that page.

I sent you my php.ini via PM if you'd like to take a look. Again, I didn't make any changes to it that may interfere with the connection or license validation.

Try testing your CURL, see https://docs.blesta.com/pages/viewpage.action?pageId=10551368

On this page there is an example PHP script to check what version of SSL/TLS your server can communicate. This will test both curl and your SSL/TLS version. Copy the curl-check.php code, then upload and run in your browser.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...