Connecting to Memcached on the Telnet
Access a DCS Memcached instance using a telnet client on an ECS in the same VPC.
Prerequisites
- The DCS Memcached instance you want to access is in the Running state.
- An ECS has been created on which the client has been installed. For details on how to create ECSs, see the Elastic Cloud Server User Guide.
An ECS can communicate with a DCS instance that belongs to the same VPC and is configured with the same security group.
- If the ECS and DCS instance are in different VPCs, establish a VPC peering connection to achieve network connectivity between the ECS and DCS instance. For details, see Does DCS Support Cross-VPC Access?
- If different security groups have been configured for the ECS and DCS instance, set security group rules to achieve network connectivity between the ECS and DCS instance. For details, see How Do I Configure a Security Group?
- All annotations in the example code have been deleted.
- All command lines and code blocks are UTF-8 encoded. Using another encoding scheme will cause compilation problems or even command failures.
Connecting to Memcached on the Telnet
- Log in to the DCS console.
- Click in the upper left corner of the management console and select the region where your instance is located.
- In the navigation pane, choose Cache Manager.
- On the Cache Manager page, click the name of the DCS Memcached instance you want to access. Obtain the IP address or domain name and port number of the instance.
- Access the chosen DCS Memcached instance.
- Log in to the ECS.
- Run the following command to check whether telnet is installed on the ECS:
If the directory in which the telnet is installed is displayed, telnet has been installed on the ECS. If the client installation directory is not displayed, install the telnet manually.
- If telnet has not been installed in Linux, run the yum -y install telnet command to install it.
- In the Windows OS, choose Start > Control Panel > Programs > Programs and Features > Turn Windows features on or off, and enable telnet.
- Run the following command to access the chosen DCS Memcached instance:
telnet {ip or domain name} {port}
In this command: {ip or domain name} indicates the IP address or domain name of the DCS Memcached instance. {port} indicates the port number of the DCS Memcached instance. Both the IP address or domain name and the port number are obtained in 4.
When you have successfully accessed the chosen DCS Memcached instance, information similar to the following is displayed:
Trying XXX.XXX.XXX.XXX... Connected to XXX.XXX.XXX.XXX. Escape character is '^]'.
- If Password Protected is not enabled for the instance, run the following commands directly after the instance is accessed successfully.
- If Password Protected is enabled for the instance, attempts to perform operations on the instance will result in the message "ERROR authentication required", indicating that you do not have the required permissions. In this case, enter auth username@password to authenticate first. username and password are that used for accessing the DCS Memcached instance.
Example commands for using the DCS Memcached instance (lines in bold are the commands and the other lines are the command output):
set hello 0 0 6 world! STORED get hello VALUE hello 0 6 world! END
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot