Domain forward not working properly.

Created:

2016-11-16 12:43:28 UTC

Modified:

2017-04-24 12:14:00 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Domain forward not working properly.

Applicable to:

  • Plesk 10.4 for Windows
  • Plesk 10.4 for Linux
  • Plesk for Linux
  • Plesk 11.5 for Linux

Symptoms

Domain forward for domain.tld is not working сorrectly. Domain domain.tld was assigned to IP address 10.10.10.11 . But Parallels Plesk shows another IP address for current domain.

    >ping domain.tld

Pinging domain.tld [10.10.10.11] with 32 bytes of data:
Reply from 10.10.10.11: bytes=32 time=1ms TTL=63
Reply from 10.10.10.11: bytes=32 time=1ms TTL=63
Reply from 10.10.10.11: bytes=32 time=1ms TTL=63
Reply from 10.10.10.11: bytes=32 time=1ms TTL=63

Cause

Inconsistency in the Plesk psa database.

Resolution

To aviod the issue please follow to plan below:

  1. Create a dump of the psa database :

    # mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` psa > psa.`date "+%Y-%m-%d_%H:%M"`.sql
  2. Find the domain ID

    mysql> select id,name from domains where name='domain_name';
    +----+------------------------------+
    | id | name |
    +----+------------------------------+
    | 58 | domain_name |
    +----+------------------------------+
    1 row in set (0.00 sec)
    1. Using the dom_id find the ipCollectionId for the domain.tld:

      mysql> select * from DomainServices where dom_id=58;+-----+--------+------+--------+---------------+----------------+| id | dom_id | type | status | parameters_id | ipCollectionId |+-----+--------+------+--------+---------------+----------------+| 58 | 58 | mail | 16 | 58 | 189 || 581 | 58 | web | 0 | 0 | 559 |+-----+--------+------+--------+---------------+----------------+2 rows in set (0.00 sec)

  3. Using ipCollectionId determine IP address that was assigned to the domain according the database

    mysql> select * from IpAddressesCollections where ipCollectionId=559;
    +----------------+-------------+
    | ipCollectionId | ipAddressId |
    +----------------+-------------+
    | 559 | 1 |
    +----------------+-------------+
    1 row in set (0.00 sec)

    mysql> select * from IP_Addresses;
    +----+---------------+-----------------+-------+--------------------+-------------------+-------+-------+--------+---------------+
    | id | ip_address | mask | iface | ssl_certificate_id | default_domain_id | ftps | main | status | serviceNodeId |
    +----+---------------+-----------------+-------+--------------------+-------------------+-------+-------+--------+---------------+
    | 1 | 10.10.53.58 | 255.255.255.255 | eth0 | 1 | 0 | false | true | 0 | 1 |
    | 2 | 10.10.10.11 | 255.255.255.255 | eth0 | 21 | 77 | false | false | 0 | 1 |
    +----+---------------+-----------------+-------+--------------------+-------------------+-------+-------+--------+---------------+
    2 rows in set (0.00 sec)

    As we can see IP address with id=1 is not correct IP address for the domain.tld .

  4. Set correct IP address for domain.tld

    mysql> update IpAddressesCollections set ipAddressId=2 where ipCollectionId=559;
    Query OK, 1 row affected (0.06 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    mysql> select * from IpAddressesCollections where ipCollectionId=559;
    +----------------+-------------+
    | ipCollectionId | ipAddressId |
    +----------------+-------------+
    | 559 | 2 |
    +----------------+-------------+
    1 row in set (0.00 sec)

    mysql> select * from IpAddressesCollections where ipCollectionId=189;
    +----------------+-------------+
    | ipCollectionId | ipAddressId |
    +----------------+-------------+
    | 189 | 1 |
    +----------------+-------------+
    1 row in set (0.00 sec)

    mysql> update IpAddressesCollections set ipAddressId=2 where ipCollectionId=189;
    Query OK, 1 row affected (0.06 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    mysql> select * from IpAddressesCollections where ipCollectionId=189;
    +----------------+-------------+
    | ipCollectionId | ipAddressId |
    +----------------+-------------+
    | 189 | 2 |
    +----------------+-------------+
    1 row in set (0.00 sec)
Have more questions? Submit a request
Please sign in to leave a comment.