Jump to content
  • 0
theone85ca

Error 1023 - Plesk Onyx - NAT

Question

Hello,

I'm getting error ...

1023 Unable to get ip id by address <PUBLIC IP> from db.

... with the Plesk module installed in Blesta. It seems like Blesta passes the customer information but gets stuck creating the domains etc in Plesk. I've posted on the Plesk forums too but I dont seem to be getting anywhere there. I should note that im setup on a Google Cloud Compute Engine so am NAT'd which im sure is the issue but I just can't seem to pin this one down.

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

I think we chat a bit earlier. It does sound like it's related to NAT, perhaps a conflict between the module and the public IP address. I found this regarding our competitor - https://forum-dev.sp.parallels.com/threads/plesk12-in-nat-mode-whmcs-error-1023.334334/

I don't know if it's related or not. I suppose it's possible if the server IP address, as added to the module configuration is being passed and set for the account IP. I'd have to look at the code to determine if that's what's happening. Do you have any logs under Tools > Logs > Module Log? You can click a row to expand it to show the raw input/output which may be helpful.

 

 

Share this post


Link to post
Share on other sites
  • 0

Hey Paul,

 

Yes we did. Thank you for your help.

Here's the failed log.

 

INPUT: SUCCESS

35.184.3.141|webspace:add
a:3:{s:7:"general";a:5:{s:4:"name";s:11:"nickwood.ca";s:10:"ip_address";s:12:"35.184.3.141";s:11:"owner_login";s:8:"nickwood";s:5:"htype";s:7:"vrt_hst";s:6:"status";s:1:"0";}s:7:"hosting";a:2:{s:10:"properties";a:2:{s:9:"ftp_login";s:8:"nickwood";s:12:"ftp_password";s:3:"***";}s:4:"ipv4";s:12:"35.184.3.141";}s:4:"plan";a:1:{s:2:"id";s:1:"7";}}

 

 

OUTPUT:FAILED

35.184.3.141
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.5.0">
  <webspace>
    <add>
      <result>
        <status>error</status>
        <errcode>1023</errcode>
        <errtext>Unable to get ip id by address '35.184.3.141' from db.</errtext>
      </result>
    </add>
  </webspace>
</packet>

 

 

 

I did make a little progress towards this. Plesk Onyx has NAT support built in. It automatically reads the local IP assigned to eth0 and just allows you to add the public IP. If I add another IP that's just the public one Blesta provisions everything fine. However, at that point its like the virtual hosts file isn't directing properly and all the domains just direct to the default Plesk page. It almost seems like this is a Plesk issue but considering the Blesta provided module doesn't seem to provisioning things when Plesk is setup correctly...

 

The Plesk Module isn't checking the IP it's been given against the one listed as 'IP Address' and not 'Public IP Address' is it?

 

Edited by theone85ca

Share this post


Link to post
Share on other sites
  • 0

Add your public IP as separete IP in plesk..and after that go and label it as dedicated IP so no account is created on this IP...make sure nated ip is used as default IP for creating accounts(you already sow plesk will just show default page if account is created on this IP)..I had Plesk servers behind NAT configured like this before Plesk had NAT auto map...not sure why your IP is not mapped properly but at this way you will have working solution till you fix it.You can also manualy change IP to NATed IP for existing domains and it will fix vhost isse..

Also you have to know that you can map public IP to private in Plesk admin panel but it will not mean anything till you run  plesk repair dns command ...

It happens because dns templates and zones for domains DNS needs to be changed also and this command will make sure it happens.So map public IP to private and run this command,than try to add account from blesta..

Share this post


Link to post
Share on other sites
  • 0

Maybe I'm missing something here.

I have the two IP's setup in Plesk, the internal is set as a shared IP and the public as dedicated. The command 'plesk repair dns' runs without error. Blesta also now creates full accounts as it did in my previous post. However, the same situation is occurring. The accounts are created on the dedicated IP and not the shared one. This causes the domains to be directed to the default Plesk page regardless of the content of the httpdocs.

Was there a way to specify which IP should be used for hosting?

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, theone85ca said:

Maybe I'm missing something here.

I have the two IP's setup in Plesk, the internal is set as a shared IP and the public as dedicated. The command 'plesk repair dns' runs without error. Blesta also now creates full accounts as it did in my previous post. However, the same situation is occurring. The accounts are created on the dedicated IP and not the shared one. This causes the domains to be directed to the default Plesk page regardless of the content of the httpdocs.

Was there a way to specify which IP should be used for hosting?

Here is what I had ..and it worked

As you see first IP is maped from private to public..second is not maped

2017_03_10_22_05_36_IP_Addresses_Nelsa_H

Share this post


Link to post
Share on other sites
  • 0
On 3/10/2017 at 5:18 PM, theone85ca said:

This setup, per your image doesn't seem to be working for me. :(

Everytime I register a new domain is automatically puts it on the public IP which then only displays the default page. So frustrating.

 

 

plesk-01.png

It looks like the 1st item in the list is using a private IP 10.128.x.x, which is mapped to a public IP 35.184.x.x? Is the public IP address a shared IP? If it's a shared IP, shouldn't it show the default page? Sorry if I'm not understanding, I'm assuming that by default page you mean the standard page that's show when accessing the IP address in a browser rather than the website's content that's usually displayed when accessing a shared IP rather than a dedicated IP. Or is that public IP address a dedicated IP? If it's a dedicated IP, and it only maps to 1 local IP, there may be some other issue going on with Plesk.

Share this post


Link to post
Share on other sites
  • 0
On ‎11‎.‎3‎.‎2017 at 2:18 AM, theone85ca said:

This setup, per your image doesn't seem to be working for me. :(

Everytime I register a new domain is automatically puts it on the public IP which then only displays the default page. So frustrating.

 

 

plesk-01.png

Well I'm not using NATed servers for some time...since there are few updates for both onix and Plesk 12.5 till than...it may not work any more ..Now I wil check on my test VPS is there any way to force this to work...now till than you can change IP manualy in domains--->domain.tld--->web hosting access. I know this is odd but at least blesta will create new account.I cant offer any other solution from my head eight now...I suppose you tryed option re-read IP.If this is bug on plesk side than it is not problem to open request on plesk dev forum or plesk support portal,problem is clearly happen because Plesk doesn't reckognize public IP as existing IP...Now fist we shold chek is this bug on Plesk side...maybe check is this happen when using WHMCS or Client Exec..or any other scrript...I suppose same problem will happen as I know for sure there is no field for private IP in any script I mention....and I doubt

Now..I have plesk onix on my test VPS and this node is on my network and behind router so I can explore this issue..

Share this post


Link to post
Share on other sites
  • 0
17 hours ago, Paul said:

It looks like the 1st item in the list is using a private IP 10.128.x.x, which is mapped to a public IP 35.184.x.x? Is the public IP address a shared IP? If it's a shared IP, shouldn't it show the default page? Sorry if I'm not understanding, I'm assuming that by default page you mean the standard page that's show when accessing the IP address in a browser rather than the website's content that's usually displayed when accessing a shared IP rather than a dedicated IP. Or is that public IP address a dedicated IP? If it's a dedicated IP, and it only maps to 1 local IP, there may be some other issue going on with Plesk.

There are two default pages on Plesk...it looks exactlly same..but one is template for newly created accounts and second is server/hostname default template...so you can customize one on one way..second on other..

Now when you set nameservers or A record for some domain to pont on plesk server but you didnt add this domain to plesk ..that server will show default server/hostname page...in short every time you visit domain which plesk dont reckognize and that domain point to plesk server...default server template will be served.In this case plesk see other,non mapped IP,as broken....because it doesn't exist from plesk point of view...it throw up default server/hostname template...insted files in domain root dir...

Share this post


Link to post
Share on other sites
  • 0
On 3/14/2017 at 2:58 PM, Nelsa said:

 

I'm testing modified plesk module with two fields for IP adress ,one field ip_adress and second public_ip:adress ..should be done very soon

2017_03_14_16_05_21_Settings_Company_Mod

Hello, 

 

Is an update available for this at all?
I'm testing Blesta at the moment for POC but have hit this stumbling block. 

If I set the public IP as dedicated I am able to add account to Plesk via Blesta, but then have to go to website settings to change the IP back to the shared pool for the site to work.
This is fine for POC but won't work for us in production.

Please let me know. 

Share this post


Link to post
Share on other sites
  • 0

Hi, 

Thanks for the update, is there anywhere to see a roadmap to next release date or any info on the next releases?
This is not in production for us - POC stage, so if testing is required let me know. Be happy to beta test and provide feedback.

Kind regards

Share this post


Link to post
Share on other sites
  • 0
30 minutes ago, luke_ins said:

Hi, 

Thanks for the update, is there anywhere to see a roadmap to next release date or any info on the next releases?
This is not in production for us - POC stage, so if testing is required let me know. Be happy to beta test and provide feedback.

Kind regards

https://dev.blesta.com/browse/CORE-1771

Share this post


Link to post
Share on other sites
  • 0
On 3/14/2017 at 10:58 AM, Nelsa said:

 

I'm testing modified plesk module with two fields for IP adress ,one field ip_adress and second public_ip:adress ..should be done very soon

2017_03_14_16_05_21_Settings_Company_Mod

Hello - did you ever manage to come up with a solution for this? I'm dealing with the same issue and it's keeping me from being able to roll out Blesta into production.

Share this post


Link to post
Share on other sites
  • 0
On 9/18/2018 at 10:46 PM, ashevillewebhosting said:

Hello - did you ever manage to come up with a solution for this? I'm dealing with the same issue and it's keeping me from being able to roll out Blesta into production.

Hello, sorry for the late response....I did make some changes to blesta original module but after migrating to new dedicated servers I start to use an original module since there is no NAT any more....this customized module had different fields for server IP address and hosting account IP since Plesk API package has IP in Hosting section and in gen_setup section and those two are completely different parameters......can be the same but in most cases will not be. If you look in tools->logs->plesk (input for webspace:add)  after you add plesk hosting in blesta ....you will see the content of Plesk API XML package  and you will see "IP_ADDRESS" and "IPv4" with the same value..... but these values can be obtained from different fields in settings.

Share this post


Link to post
Share on other sites
  • 0

Hello all,

I believe I may have found my solution; with the very kind help of Nelsa. Using the private IP in Blesta works fine; however my end goal was to replace the IP with the hostname so that the client could utilize the login feature with a secure URL instead of an invalid IP. 

  1. Add field for hostname to add_row.pdt and edit_row.pdt in Plesk>Views>Defaut. (this would be a FQDN and secured for Plesk login)
  2. Add entry for 'hostname' to all addModuleRow() functions in plesk.php
  3. Edit admin_service_info.pdt & client_service_info.pdt in Plesk>Views>Defaut, replacing 'ip_address' with 'hostname'. This allows both client and admin to use login feature with secured FQDN.
  4. Leave ip_address/ipv4 as is; seems to provision and work fine using the private IP, as long as I set the NAT public address in Plesk for said IP.

I'm no expert, just a network guy, so if there's something flawed here please let me know; seems to be working in my test environment. 

The one thing I haven't figured out; how to set the label name for  the 'hostname' field in the add/edit views. If anyone has some insight there I'd gladly appreciate it!

Share this post


Link to post
Share on other sites
  • 0

What does happen, if you change the order of  the ip addresses? It just might use the first in list.

Alternative, assigning  different ports?

If you use NAT, you can use a dynamic IP and reserve it in DHCP for your server.

Share this post


Link to post
Share on other sites
  • 0

Plesk API xml request package for add:webspace has two fields for IP address...one is server ip and second is hosting account IP...this is logic because you may want to have different IP for hosting accounts...doesn't have to be related to NAT...if you look other billing scripts for this niche they have separate fields for IP list and server IP/hostname used for requests and internal script usage...So Plesk API xml include ip_address and ipv4 but there is big difference how these two are build in module....while ip_address value is taken from module meta row which itself is value you put in module settings ip field.....second parameter ipv4 is simple ipv4=ip_address ....and those two are in completly different section of XML request....ip_address is part of general/gen_setup section where general information about webspace is provided like user name,phone,login ..etc...second section hosting is where specific hosting features are specified and one of fields is ipv4....So generally this ipv4 can be set also to be populated at same way like ip_address but you have to first add new field to module settings template and than set ipv4 to be taken from there....so when it comes to your question "what happens if you change order"...it will happen that your request will fail if you put private IP in ip_address since it is used as target for post request....if you set different public IP it will work if it resolve to right server...If you want to have second ip optiona than it can be implemented in module with one simple IF statemen before existing code for ipv4 and than new code put in IF and existing code leave after IF as it is...otherwise you will have to put same IP in both fields if server is not behind NAT. But again this has usecase also when server is not behind NAT but you have more IPs...

Anyway  this was my adhoc implementation which doesn't require big changes to module...and it worked for us few years...I did say I will publish this plugin but since changes are so small I didn't see.any logic to publish this as new plugin...or even as hack.

Share this post


Link to post
Share on other sites
  • 0

"Plesk API xml request package for add:webspace has two fields for IP address...one is server ip and second is hosting account IP...this is logic because you may want to have different IP for hosting accounts......" 

Yes, but I assign static IPs after the account is created (cPanel)and I am not using a local IP, just the public one(s)

Unless you sit next to server, you should not need a private IP, and still, you can start it as normal.

Share this post


Link to post
Share on other sites
  • 0
24 minutes ago, Tiny said:

"Plesk API xml request package for add:webspace has two fields for IP address...one is server ip and second is hosting account IP...this is logic because you may want to have different IP for hosting accounts......" 

Yes, but I assign static IPs after the account is created (cPanel)and I am not using a local IP, just the public one(s)

Yes,that is how most people do...you can also add same server twice with different ip and than when create package just select that server for that package...But there is space for improvements ...for example module can be adopted so user can specify list of IP and than when creating new package, in service options select IP from that list for that package....But for us was important to have module that can auto provision new accounts without intervention on servers behind NAT.....amd that was not possible.

Without this customization only way to make module to work was to add private IP manualy in Plesk as second IP ...only reason this IP has to exist is because plesk will not create webspace if IP is not on the list of IP....and for some reason it doesn't reckognize public IP as one of server IPs....in fact I know reason....it is because when comparing this ipv4 with server IPs....private IP is fetched for comparation.... This was very ugly solution.... problem was everytime new account is created you had to go and manualy change IP from that private IP to right one...Because of this I started to look for better solution...

Share this post


Link to post
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...