All Products
Search
Document Center

E-MapReduce:FAQ

Last Updated:Dec 05, 2025

This topic answers frequently asked questions about EMR Serverless StarRocks.

How to access OSS across accounts

When you import data or perform data lake operations in Serverless StarRocks, you may need to access OSS resources that belong to another Alibaba Cloud account. By default, Serverless StarRocks is configured for password-free access to OSS buckets in the current account. To access OSS resources in another account, you must disable this default setting, manually configure the AccessKey pair for the destination account, and then submit the parameters to apply the new configuration.

  1. To disable password-free access, on the Parameter Configuration tab, clear the values of the following configuration items in the specified files.

    • core-site.xml

      fs.oss.credentials.provider =
    • jindosdk.cfg

      fs.oss.provider.format =
      fs.oss.provider.endpoint =
  2. Add the AccessKey pair for the destination account. On the Parameter Configuration tab, click Add Configuration Item to add the following configurations to the specified files.

    • core-site.xml

      fs.oss.accessKeyId = AccessKey ID of the destination account
      fs.oss.accessKeySecret = AccessKey secret of the destination account
    • jindosdk.cfg

      fs.oss.accessKeyId = AccessKey ID of the destination account
      fs.oss.accessKeySecret = AccessKey secret of the destination account
  3. To apply the configuration, on the Parameter Configuration tab, click Submit Parameters.

How to use UDF and JDBC connector drivers

Before you use User-Defined Function (UDF) and Java Database Connectivity (JDBC) drivers, you must obtain the required JAR files.

  1. Upload the JAR files to OSS. For more information, see Upload files.

    When you upload the JAR files, set their Object ACL to Public Read/Write to grant public read and write permissions.

  2. Obtain the URL for each JAR file.

    In the OSS console, find the URL for each JAR file that you uploaded. Use the HTTP URL of the internal endpoint. The URL uses one of the following formats:

    • For the JDBC driver: http://<YourBucketName>.oss-cn-xxxx-internal.aliyuncs.com/mysql-connector-java-*.jar.

    • For the UDF: http://<YourBucketName>.oss-cn-xxxx-internal.aliyuncs.com/<YourPath>/<jar_package_name>.

  3. Use the JAR files. For more information, see Java UDF and JDBC Catalog.

How to reset the instance password

Important
  • Resetting the instance password interrupts the connection between the client and the server. We recommend that you perform this operation on a production environment during off-peak hours to minimize disruption.

  • Only users with the AliyunEMRStarRocksFullAccess permission can reset the password.

  1. Go to the instance details page.

    1. Log on to the E-MapReduce console.

    2. In the left navigation pane, choose EMR Serverless > StarRocks.

    3. Click the name of the target instance.

  2. In the Basic Information section on the Instance Details page, click Reset Password.

  3. In the dialog box that appears, enter the new password, confirm it, and then click OK.

Why does an error occur when writing data to a Paimon table?

  • Symptom: When you use StarRocks to write data to a Paimon table, you may receive the following error message.

    (5025, 'Backend node not found. Check if any backend node is down.')
  • Cause: The permission check mechanism of the Paimon table prevents StarRocks from correctly identifying backend nodes during a write operation.

  • Solution:

    • Upgrade the version (Recommended) If your instance version is earlier than one of the following versions, perform a minor version update to apply the fix.

      • StarRocks 3.2: 3.2.11-1.89 or later

      • StarRocks 3.3: 3.3.8-1.88 or later

    • Workaround On the Parameter Configuration tab of the StarRocks instance, you can add the following configuration item to the core-site.xml file.

      dlf.permission.clientCheck=false

How to handle the not a RAM user error when creating a foreign table in StarRocks

  • Symptom: When you try to create a foreign table in StarRocks, you may receive the following error message.

    current user is not a RAM user
  • Cause: This error can be caused by insufficient permissions or an outdated instance version.

  • Solution:

    1. Check the RAM user permissions. Make sure the Resource Access Management (RAM) user has the required permissions to operate StarRocks. For more information, see Grant permissions to a RAM user.

    2. If the permissions are correct, navigate to the Instance Details page for the StarRocks instance to check and upgrade the kernel version.

      If your instance version is earlier than one of the following versions, perform a minor version update to apply the fix.

      • StarRocks 3.2: 3.2.11-1.89 or later

      • StarRocks 3.3: 3.3.8-1.88 or later

Why does an error occur when running an SQL statement that contains a semicolon in SQL Editor?

  • Symptom: When you run an SQL statement that contains a semicolon (;) in SQL Editor, an error is reported. The error message contains the most similar input is {a legal identifier}.

    image

  • Cause: SQL Editor uses the semicolon (;) as the statement terminator by default. Therefore, if your SQL statement contains a semicolon (;), a syntax parsing error occurs.

  • Solution:

    1. Set a custom separator.

      Before you run an SQL statement that contains a semicolon, set a custom separator to prevent syntax parsing errors. For example, you can change the separator to $$.

      delimiter $$
    2. Run the SQL statement that contains a semicolon. The following example shows how to do this.

      INSERT INTO sr_test VALUES 
      (1, 'asdsd,asdsads'), 
      (2, 'sadsad;asdsads');
    3. Restore the default separator.

      After the SQL statement is executed, restore the default separator (;) so that subsequent SQL operations can run as expected.

      delimiter ;
    4. Verify the result.

      Run a query statement to verify that the data was inserted correctly.

      image

Why does Serverless StarRocks fail to import data or access a foreign table?

  • Symptom: When you use Serverless StarRocks to import data or access a foreign table, the import or connection may fail if the destination is an Internet address.

  • Cause: A Serverless StarRocks instance runs in a virtual private cloud (VPC) by default. By default, the VPC does not have direct access to the Internet. Therefore, requests to access Internet resources, such as importing data or querying a foreign table, fail if Internet access is not configured.

  • Solution: You can deploy an Internet NAT gateway in the VPC and enable the SNAT feature. This allows the Serverless StarRocks instance to access Internet resources through the gateway. For more information, see Use the SNAT feature of an Internet NAT gateway to access the Internet.

How to prevent a CLB/SLB in a StarRocks instance from closing a client connection due to an idle timeout

  • Symptom: In a StarRocks instance with more than one FE node, you can enable Server Load Balancer (SLB) for load balancing purposes. For more information, see Manage gateways. After you enable SLB for the StarRocks instance, if an SQL query runs for more than 900 seconds, the SLB forcibly closes the client connection. This action prevents the query result from being returned.

  • Cause: An SLB TCP connection has a maximum idle timeout of 900 seconds. If no data is transmitted over the connection for 900 seconds, such as when a long-running SQL query is being executed, the SLB actively closes the connection. As a result, the connection is interrupted while the client is waiting for a response from StarRocks.

  • Solution: Set the TCP Keepalive parameter on the client to maintain the connection between the client and the SLB. This prevents the connection from being closed due to an idle timeout.

    • Global kernel parameter settings (system-level)

      You can modify the kernel parameters of the operating system to enable and configure TCP Keepalive parameters for all TCP connections. This helps monitor the status of network connections.

      Parameter

      Description

      Recommended value

      • Linux: net.ipv4.tcp_keepalive_time

      • FreeBSD/macOS: net.inet.tcp.keepidle

      The period of inactivity after which the first Keepalive probe is sent. Unit: seconds.

      600 seconds

      • Linux: net.ipv4.tcp_keepalive_intvl

      • FreeBSD/macOS: net.inet.tcp.keepintvl

      The interval between Keepalive probe retransmissions. Unit: seconds.

      60 seconds

      • Linux: net.ipv4.tcp_keepalive_probes

      • FreeBSD/macOS: net.inet.tcp.keepcnt

      The number of consecutive failed probes after which the connection is dropped.

      5

      Linux

      • Apply the settings temporarily

        # Set global Keepalive parameters (root permissions required)
        sudo sysctl -w net.ipv4.tcp_keepalive_time=600   # Corresponds to keepidle (600 seconds)
        sudo sysctl -w net.ipv4.tcp_keepalive_intvl=60   # Corresponds to keepintvl (60 seconds)
        sudo sysctl -w net.ipv4.tcp_keepalive_probes=5   # Corresponds to keepcount (5)
      • Apply the settings permanently

        Add the following content to /etc/sysctl.conf and run sysctl -p to apply the settings.

        echo "net.ipv4.tcp_keepalive_time = 600" >> /etc/sysctl.conf
        echo "net.ipv4.tcp_keepalive_intvl = 60" >> /etc/sysctl.conf
        echo "net.ipv4.tcp_keepalive_probes = 5" >> /etc/sysctl.conf

      FreeBSD/macOS

      • Apply the settings temporarily

        # Set global Keepalive parameters (root permissions required)
        sudo sysctl -w net.inet.tcp.keepidle=600
        sudo sysctl -w net.inet.tcp.keepintvl=60
        sudo sysctl -w net.inet.tcp.keepcnt=5
      • Apply the settings permanently

        Add the following content to /etc/sysctl.conf.

        echo "net.inet.tcp.keepidle = 600" >> /etc/sysctl.conf
        echo "net.inet.tcp.keepintvl = 60" >> /etc/sysctl.conf
        echo "net.inet.tcp.keepcnt = 5" >> /etc/sysctl.conf
    • Application-level settings

      You can use language-specific APIs to set TCP Keepalive parameters for a single connection.

      Java

      The Java standard library has limited support for TCP Keepalive. However, you can implement it using reflection or low-level socket options.

      Note

      The following code requires system support for options such as `tcp_keepidle` on Linux or FreeBSD. Additionally, some methods, such as reflection, may not work due to differences in JVM versions. We recommend that you test for compatibility before use.

      import java.io.IOException;
      import java.net.InetSocketAddress;
      import java.net.Socket;
      import java.net.SocketOption;
      import java.nio.channels.SocketChannel;
      
      public class TcpKeepaliveExample {
      
          public static void main(String[ ] args) {
      
              try (Socket socket = new Socket()) {
                  // 1. Enable Keepalive
                  socket.setKeepAlive(true);
      
                  // 2. Set Keepalive parameters (requires low-level socket options)
                  SocketChannel channel = socket.getChannel();
                  if (channel != null) {
                      // Set Keepidle (idle time)
                      channel.setOption(StandardSocketOptions.SO_KEEPALIVE, true); // Keepalive must be enabled first
                      setSocketOptionInt(socket, "tcp_keepidle", 600); // Requires system support
      
                      // Set Keepintvl (retransmission interval)
                      setSocketOptionInt(socket, "tcp_keepintvl", 60);
      
                      // Set Keepcount (number of failures)
                      setSocketOptionInt(socket, "tcp_keepcnt", 5); // Note: The parameter name may vary by system
                  }
      
                  // Connect to the server
                  socket.connect(new InetSocketAddress("example.com", 80));
                  // ... Other operations ...
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
      
          // Use reflection to set system-specific socket options (such as on Linux/FreeBSD)
          private static void setSocketOptionInt(Socket socket, String optionName, int value) {
              try {
                  Class<?> clazz = Class.forName("java.net.Socket$SocketOptions");
                  Object options = clazz.getDeclaredMethod("options").invoke(socket);
                  Class<?> optionsClass = options.getClass();
                  optionsClass.getDeclaredMethod("setOption", String.class, int.class)
                          .invoke(options, optionName, value);
              } catch (Exception e) {
                  throw new RuntimeException("Failed to set socket option " + optionName, e);
              }
          }
      }

      Python

      The Python socket module supports direct configuration of TCP Keepalive parameters.

      Note

      Different operating systems may use different parameter names. For example, macOS may require TCP_KEEPALIVE instead of TCP_KEEPIDLE. Some parameters may require root permissions to set.

      import socket
      
      def create_keepalive_socket():
          sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
          
          # 1. Enable Keepalive
          sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
          
          # 2. Set Keepalive parameters (Linux/FreeBSD)
          # Keepidle: 600 seconds
          sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 600)
          
          # Keepintvl: 60 seconds
          sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 60)
          
          # Keepcount: 5
          sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPCNT, 5)
          
          return sock
      
      # Example
      sock = create_keepalive_socket()
      sock.connect(("example.com", 80))
      # ... Other operations ...
      sock.close()

      Golang

      The Golang net package provides basic Keepalive configuration. However, you must use the low-level syscall package to set detailed parameters.

      Note

      Different operating systems may use different parameter names. Some parameters may require root permissions to set.

      package main
      
      import (
          "fmt"
          "net"
          "syscall"
      )
      
      func main() {
          // Create a TCP connection
          conn, err := net.Dial("tcp", "example.com:80")
          if err != nil {
              panic(err)
          }
          defer conn.Close()
      
          // Get the underlying file descriptor
          fd := conn.(*net.TCPConn).SyscallConn()
      
          // Set Keepalive parameters
          fd.Control(func(fdPtr *net.FileDesc) {
              fd := fdPtr.File
              // Enable Keepalive
              err = syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, syscall.TCP_KEEPALIVE, 1)
              if err != nil {
                  panic(err)
              }
      
              // Set Keepidle (idle time)
              err = syscall.SetsockoptInt(int(fd), syscall.SOL_TCP, syscall.TCP_KEEPIDLE, 600)
              if err != nil {
                  panic(err)
              }
      
              // Set Keepintvl (retransmission interval)
              err = syscall.SetsockoptInt(int(fd), syscall.SOL_TCP, syscall.TCP_KEEPINTVL, 60)
              if err != nil {
                  panic(err)
              }
      
              // Set Keepcount (number of failures)
              err = syscall.SetsockoptInt(int(fd), syscall.SOL_TCP, syscall.TCP_KEEPCNT, 5)
              if err != nil {
                  panic(err)
              }
          })
      
          // ... Other operations ...
      }