This topic answers frequently asked questions about EMR Serverless StarRocks.
How do I access OSS across accounts?
By default, EMR Serverless StarRocks provides password-free access to OSS buckets in the same account. To access OSS resources in another account, you must disable this default, configure the target account's AccessKey pair, and apply the new configuration.
-
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 =
-
-
Add the AccessKey pair for the target account: On the Parameter Configuration tab, click Add Configuration Item and add the following configurations to the specified files.
-
core-site.xml
fs.oss.accessKeyId = AccessKey ID of the target account fs.oss.accessKeySecret = AccessKey Secret of the target account -
jindosdk.cfg
fs.oss.accessKeyId = AccessKey ID of the target account fs.oss.accessKeySecret = AccessKey Secret of the target account
-
-
Apply the configuration: On the Parameter Configuration tab, click Submit Parameters.
Use UDF and JDBC connector drivers
Before you use UDF and JDBC drivers, you must obtain the required JAR files from an external source.
-
Upload the JAR files to OSS. For more information, see Upload files.
When you upload the files, set the object ACL to Public Read/Write to grant the JAR files public read and write permissions.
-
Obtain the URL for each JAR file.
In the OSS console, find the link for each successfully uploaded JAR file. Use the HTTP URL of the internal endpoint, which must be in one of the following formats:
-
For a JDBC driver:
http://<YourBucketName>.oss-cn-xxxx-internal.aliyuncs.com/mysql-connector-java-*.jar. -
For a UDF:
http://<YourBucketName>.oss-cn-xxxx-internal.aliyuncs.com/<YourPath>/<jar_package_name>.
-
-
Use the JAR files. For more information, see Java UDF and JDBC Catalog.
How do I reset the instance password?
-
Resetting the instance password interrupts client-server connections. To minimize production impact, perform this operation during off-peak hours.
-
Only users with the AliyunEMRStarRocksFullAccess permission can reset the password.
-
Go to the instance details page.
-
Log in to the E-MapReduce console.
-
In the left-side navigation pane, choose EMR Serverless > StarRocks.
-
Click the name of the target instance.
-
-
On the Instance Details page, in the Basic Information section, click Reset Password.
-
In the dialog box that appears, enter and confirm the new password, and then click OK.
Error writing data to Paimon tables
-
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: A permission check in Paimon tables can prevent StarRocks from correctly identifying BE nodes during write operations.
-
Solution:
-
Upgrade the version (Recommended): If your instance version is earlier than one of the following, 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, add the following configuration item to the
core-site.xmlfile.dlf.permission.clientCheck=false
-
When creating a foreign table in StarRocks, if you receive the
not a RAM user
error, what should you do?
-
Symptom: When creating a foreign table in StarRocks, you may receive the following error message:
current user is not a RAM user -
Cause: This error is caused by insufficient permissions or an outdated instance version.
-
Solution:
-
Check the RAM user permissions: Ensure that the Resource Access Management (RAM) user has the required permissions for StarRocks. For more information, see Grant permissions to a RAM user.
-
If the permissions are correct, check and upgrade the kernel version on the StarRocks Instance Details page.
If your instance version is earlier than one of the following, 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
-
-
Error with semicolons in the SQL Editor
-
Symptom: When you run an SQL statement containing a semicolon (
;) in the SQL Editor, you receive an error. The error message includesthe most similar input is {a legal identifier}.The error code is 1064, and the details also include
Unexpected input '<EOF>', indicating a syntax error at line 3, column 11. -
This error occurs because the SQL Editor uses the semicolon (
;) as a statement terminator by default. If your SQL statement contains a semicolon (;), a syntax parsing error occurs. -
Solution:
-
Set a custom delimiter.
Before you run an SQL statement that contains a semicolon, set a custom delimiter to prevent syntax parsing errors. For example, you can change the delimiter to
$$.delimiter $$ -
Run the SQL statement that contains a semicolon. An example is shown below:
INSERT INTO sr_test VALUES (1, 'asdsd,asdsads'), (2, 'sadsad;asdsads'); -
Restore the default delimiter.
After the SQL statement is executed, restore the default delimiter (
;) so that subsequent SQL operations can run as expected.delimiter ; -
Verify the result.
Run a query to verify that the data was inserted correctly.
delimiter ; SELECT * FROM sr_test;Output test_id test_desc 0 1 asdsd,asdsads 1 2 sadsad;asdsads
-
Failure to import data or access foreign tables
-
Symptom: When you use EMR Serverless StarRocks to import data or access a foreign table, the import or connection may fail if the destination is a public IP address.
-
Cause: An EMR Serverless StarRocks instance runs in a Virtual Private Cloud (VPC) environment by default, which may not have direct access to the internet. Therefore, requests to public resources, such as for data imports or foreign table queries, fail unless internet access is configured.
-
Solution: You can deploy an Internet NAT gateway in the VPC and enable the SNAT feature. This allows the EMR Serverless StarRocks instance to access public resources through the gateway. For more information, see Use the SNAT feature of an Internet NAT gateway to access the Internet.
Prevent connection closure by SLB/CLB idle timeout
-
Symptom: When using SLB with a StarRocks instance, the SLB forcibly closes the client connection if an SQL query runs for more than 900 seconds, preventing the query from returning a result. For more information about enabling SLB, see Manage gateways.
-
Cause: SLB closes any TCP connection that is idle for more than 900 seconds. This can happen during a long-running SQL query, interrupting the connection before StarRocks returns a result.
-
Solution: Configure client-side TCP Keepalive parameters to prevent the SLB from closing idle connections.
-
Global kernel parameter settings (system-level)
Modify the operating system's kernel parameters to enable and configure appropriate TCP Keepalive settings for all TCP connections. This helps monitor the status of network connections. The following table describes the parameters to be configured.
Parameter
Description
Recommended value
-
Linux:
net.ipv4.tcp_keepalive_time -
FreeBSD/macOS:
net.inet.tcp.keepidle
The period of inactivity in seconds after which the first Keepalive probe is sent.
600 seconds
-
Linux:
net.ipv4.tcp_keepalive_intvl -
FreeBSD/macOS:
net.inet.tcp.keepintvl
The interval in seconds between Keepalive probe retransmissions.
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 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 settings permanently
Add the following content to
/etc/sysctl.confand runsysctl -pto 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 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 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 by using reflection or low-level socket options.
NoteThe following code requires system support for options such as
tcp_keepidleon 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 in a production environment.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
socketmodule supports direct configuration of TCP Keepalive parameters.NoteDifferent operating systems may use different parameter names. For example, macOS may require
TCP_KEEPALIVEinstead ofTCP_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
netpackage provides basic Keepalive configuration. However, you must use the low-levelsyscallpackage to set detailed parameters.NoteDifferent 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 file, err := conn.(*net.TCPConn).File() if err != nil { panic(err) } defer file.Close() fd := int(file.Fd()) // Enable Keepalive err = syscall.SetsockoptInt(fd, syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, 1) if err != nil { panic(fmt.Errorf("set SO_KEEPALIVE: %v", err)) } // Set Keepidle (idle time) err = syscall.SetsockoptInt(fd, syscall.IPPROTO_TCP, syscall.TCP_KEEPIDLE, 600) if err != nil { panic(fmt.Errorf("set TCP_KEEPIDLE: %v", err)) } // Set Keepintvl (retransmission interval) err = syscall.SetsockoptInt(fd, syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, 60) if err != nil { panic(fmt.Errorf("set TCP_KEEPINTVL: %v", err)) } // Set Keepcount (number of failures) err = syscall.SetsockoptInt(fd, syscall.IPPROTO_TCP, syscall.TCP_KEEPCNT, 5) if err != nil { panic(fmt.Errorf("set TCP_KEEPCNT: %v", err)) } // ... Other operations ... }
-
An "Unexpected exception: Table '' is not a OLAP table" error is reported when you back up StarRocks data
-
Symptom: The following error message is reported when you use StarRocks to create a data snapshot backup.
Unexpected exception: Table '<table_name>' is not a OLAP table -
Cause analysis:
-
The instance uses the storage-compute separation mode.
StarRocks instances that use storage-compute separation do not support data backup and restoration. Only instances with integrated storage and compute support this feature.
-
The table engine type is incompatible.
The StarRocks backup feature supports only tables that use the OLAP engine. If the engine type of a table is not OLAP, this error is reported.
-
-
Solution:
-
Check the instance type.
On the Instance List page of StarRocks, check the Instance Type. If the instance type is Storage-Compute Separation, data backup and restoration are not supported. We recommend that you use an instance with integrated storage and compute to enable backup and restoration. For more information, see Backup and restoration。
-
Check the table engine type.
Check the DDL definition of the target table to confirm whether
ENGINE=OLAPis set.SHOW CREATE TABLE <table_name>;If the engine of the table is not OLAP, re-create the table based on your business requirements and make sure that
ENGINE=OLAPis specified.
-
Data load into a Primary Key table fails with the error msg: Cancelled, msg: Primary-key index exceeds the limit
Issue:
Data load into a Primary Key table fails with the error msg:
msg: Cancelled, msg: Primary-key index exceeds the limit. tablet_id: 2506733, consumption: 33176971421, limit: 32116807950. Memory stats of top five tablets: 3656508(4465M) 3656496(4464M) 3656544(4464M) 3656520(4462M) 3656532(4461M): be: backend-0.backend.xxx.svc.cluster.local.xxxTroubleshooting approach:
Analyze the current memory usage of the BE node to determine whether a resource bottleneck exists.
Determine whether the cluster uses a shared-nothing or shared-data architecture, and check the corresponding configuration items.
Detailed troubleshooting steps:
Analyze memory usage
The error occurs because the memory consumed by the primary key index exceeds the memory limit of the BE node.
Check the
mem_limitconfiguration of the BE node, which you can obtain by runningSHOW FRONTENDSorSHOW BACKENDS, and evaluate its available memory capacity.
Solutions
Solution 1: Enable persistent indexes (recommended)
Shared-nothing cluster: Set
enable_persistent_indextotrue.Shared-data cluster: Set
persistent_index_typetocloud_native.
Solution 2: Design partitions appropriately
Partition the Primary Key table based on appropriate dimensions, such as time or region, to avoid writing to the entire table.
After the table is partitioned, each write affects only a subset of the partitions. The primary key index needs to load data only from the affected partitions, which reduces the memory pressure of each write.
Load job fails with the "[E1008]Reached timeout=xxx ms" error
Issue:
When a Flink job loads data into StarRocks, the following error occurs:
Message: [E1008] Reached timeout=7500ms @x.x.x.x:8060.When data is loaded by using
INSERT INTO, the following error occurs:java.sql.SQLException: [E1008] Reached timeout=7500ms @10.106.7.182:8060.
Troubleshooting:
If the timeout value in the error is not 30000 ms, which is the default value of
rpc_connect_timeout_ms, check whether therpc_connect_timeout_msparameter of the BE node was manually changed.For load jobs that use
INSERT INTO, check whether thequery_timeoutparameter is configured, such asquery_timeout = 15. StarRocks sets the RPC timeout threshold to half thequery_timeoutvalue and converts the result to milliseconds. Therefore, ifquery_timeout=15, the corresponding timeout is 7500 ms.
Detailed troubleshooting steps:
If you confirm that the
rpc_connect_timeout_msparameter of the BE node was changed: Restore the parameter to its default value of 30000 ms to prevent false timeout errors caused by an excessively short connection timeout.The
Reached timeout=7500mserror typically indicates a high brpc thread load on the BE node. This delays RPC request processing and eventually triggers a timeout.Run
SHOW TABLET FROM <destination_database>.<destination_table> ORDER BY RowCount DESC; to analyze the data distribution of the destination table and determine whether data is appropriately distributed among the tablets. For example, if the amount of data in a single tablet significantly exceeds the recommended range of 1 GB to 10 GB, some BE nodes may become overloaded, which degrades write performance.Solutions:
Solution 1 (recommended):
Optimize the table bucketing strategy. Select an appropriate high-cardinality field as the bucketing key inDISTRIBUTED BY HASH(...)to distribute data evenly among the tablets.Solution 2 (temporary mitigation):
If CPU and I/O usage on the BE nodes have not reached their limits, tune the following parameters as appropriate:Increase
brpc_num_threads. The default value is the number of CPU cores on the BE node. You can try setting the parameter to two or four times its default value. Do not exceed four times the default value because doing so may increase thread contention.Increase
flush_thread_num_per_store. The default value is 2. You can set the parameter to 4 to increase concurrency when data is flushed to disks.
Load job fails with the "Error:NULL value in non-nullable column 'xxx'" error
Issue: When you load data into a StarRocks table, the following error occurs:
Error: NULL value in non-nullable column 'xxx'.Cause: A
NULLvalue is written to a column defined asNOT NULL. This violates the table schema constraint and causes the load job to fail.Solutions:
Solution 1: Fix the upstream data
Before data is written to StarRocks, filter out or replace
NULLvalues to ensure that the data complies with the constraints of the destination table.Solution 2: Modify the table schema
If the business logic allows the field to contain NULL values, modify the table schema and remove the
NOT NULLconstraint.
The "because of too many versions, current/limit: 1009/1000" error occurs when you import data by using Flink Connector
Issue:
When you continuously write data to a StarRocks table by using Flink Connector, the following error occurs:
because of too many versions, current/limit: 1009/1000.Cause:In the StarRocks Primary Key model or the Unique Key model that uses Merge-on-Write, each data import generates a new version. To prevent metadata bloat and ensure query performance, the system allows each partition to retain up to 1,000 versions by default.
Solution:
Check the Compaction Score of the partitions
Run the following SQL statement to check the compaction load of each partition in the destination table:
SELECT TABLE_NAME, PARTITION_NAME, AvgCS AS avg_compaction_score, MaxCS AS max_compaction_score FROM information_schema.partitions_meta WHERE TABLE_NAME = 'your_table_name';If the
MaxCSvalue—the maximum Compaction Score—of the affected partition is significantly greater than 100, the partition contains a large number of small versions that are waiting to be merged. This indicates that compaction has not completed in time.Manually trigger compaction
Run the following statement:
ALTER TABLE your_db.your_table COMPACT PARTITION your_partition_name;Optimize the Flink sink parameters
Increase the values of the following Flink sink parameters:
sink.buffer-flush.max-bytes,sink.buffer-flush.max-rows,sink.buffer-flush.interval-ms. This reduces the data import frequency and prevents the generation of excessive small versions.
Failed to get status for file xxx error when querying data by using an External Catalog
Issue:
When you query a table in an external data lake, such as Paimon or Iceberg, the following error occurs:
(1064, 'Failed to get status for file: oss://data-lakehouse-oss-normal/dataware.db/dwd_annotation2_user/metadata/00097-10647858-814a-499e-b300-51c570ee7ee0.metadata.json')The OSS API returns the following error:<Error> <Code>AccessDenied</Code> <Message>You have no right to access this object because of bucket acl.</Message> <RequestId>68EC744EB6CD8C3539FAB32A</RequestId> <HostId>data-lakehouse-oss-normal.oss-cn-shenzhen-internal.aliyuncs.com</HostId> <EC>0003-00000001</EC> <RecommendDoc>https://api.alibabacloud.com/troubleshoot?q=0003-00000001</RecommendDoc> </Error>Cause: StarRocks relies on access to an object storage service, such as Alibaba Cloud OSS, when it queries tables in an external data lake, such as Hive, Iceberg, or Hudi, by using an External Catalog. Incorrect permissions or configurations can prevent StarRocks from reading metadata or data files.
Solution:
First, verify that the AccessKey is valid. Confirm that the configured
accessKeyIdandaccessKeySecretcan access the destination OSS bucket.If the
accessKeyIdandaccessKeySecretare correctly configured, check whether the OSS bucket is accessed across Alibaba Cloud accounts. For cross-account access to an OSS bucket, modify the relevant configurations. For more information, see How do I access OSS across accounts? .
How do I view the disk space occupied by persistent indexes on CN and BE nodes?
After persistent indexes are enabled by setting enable_persistent_index = true or persistent_index_type = 'cloud_native', primary key indexes are stored on disks. You can query the information_schema.be_tablets table to obtain their disk usage.
-- Query the index size of each table and sort the results, by index size in descending order.
SELECT
tables_config.TABLE_NAME,
t1.TABLE_ID,
t1.index_sum_mb
FROM (
-- Calculate the total index size of each table in MB.
SELECT
TABLE_ID,
SUM(INDEX_DISK)/1024/1024 AS index_sum_mb
FROM information_schema.be_tablets
GROUP BY TABLE_ID
) t1
JOIN tables_config ON tables_config.TABLE_ID = t1.TABLE_ID
ORDER BY index_sum_mb DESC
-- Optional: Add a LIMIT clause to limit the number of returned rows when the result set is excessively large.
-- LIMIT 100
;How do I view ongoing write transactions and the tablets associated with different transaction batches?
Track ongoing or recently completed load jobs to identify the tablets to which data is written.
SELECT
txn_table.*,
tc.table_name
FROM (
SELECT
bt.TABLET_ID,
bt.COMMIT_TIME,
bt.PUBLISH_TIME,
bt.TABLE_ID
FROM information_schema.be_txns bt
JOIN information_schema.be_tablets btt
ON bt.TABLET_ID = btt.TABLET_ID
) AS txn_table
JOIN information_schema.tables_config tc
ON txn_table.TABLE_ID = tc.TABLE_ID;How do I analyze a sudden increase in CPU or memory load during a specific period?
Use audit logs to identify queries that consume large amounts of resources.
SELECT
queryId,
timestamp,
ROUND(memCostBytes / 1024 / 1024 / 1024, 2) AS memCostGB,
cpuCostNs
FROM _starrocks_audit_db_.starrocks_audit_tbl
WHERE timestamp BETWEEN '2025-xx-xx hh:mm:ss' AND '2025-xx-xx hh:mm:ss'
ORDER BY cpuCostNs DESC, memCostGB DESC
LIMIT 20;How do I analyze a sudden increase in I/O load during a specific period?
I/O spikes are typically caused by large-scale scans, such as full table scans or queries that cannot use partition pruning or indexes.
SELECT
queryId,
timestamp,
ROUND(scanBytes / 1024 / 1024 / 1024, 2) AS scanTotalGB
FROM _starrocks_audit_db_.starrocks_audit_tbl
WHERE timestamp BETWEEN '2025-xx-xx hh:mm:ss' AND '2025-xx-xx hh:mm:ss'
ORDER BY scanTotalGB DESC
LIMIT 20;Insufficient storage error when scaling in BE nodes in a fully managed StarRocks cluster
Issue:
When you scale in BE nodes from the console of a fully managed StarRocks cluster, the following error appears:
invalid status: [insufficient storage].Cause: The storage validation requirements for the scale-in operation are not met. The system allows the operation only if the total storage capacity after scale-in meets the following requirement:
Used storage < Total capacity after scale-in × 0.7
The values are calculated as follows:
Total capacity after scale-in = Combined capacity of the remaining nodes after the specified nodes are removed
Used storage = Sum of (total capacity − available capacity) across all nodes
Run
SHOW BACKENDSto obtain totalCapacity and availCapacity.
Solution:
Check the current cluster capacity.
Run the following SQL statement to obtain the total and available capacities of each BE node:
SHOW BACKENDS\GCheck the
TotalCapacityandAvailCapacityfields. Determine whether the used storage exceeds 70% of the total capacity after scale-in.Expand the disks and retry.
If the disk capacity is insufficient, expand the disks of the BE nodes in the EMR console. Make sure that
Used storage < Total capacity after scale-in × 0.7, and then retry the scale-in operation.
RAM.Permission.NotAllow is reported when logging on to StarRocks Manager
Issue:
When you use a RAM user to log on to StarRocks Manager, the
"You are not authorized to perform the operation"message appears. The error code isRAM.Permission.NotAllow.Cause: The RAM user does not have the permissions required to perform operations on EMR Serverless StarRocks and therefore cannot access StarRocks Manager. For more information, see Authorize a RAM user.
Solution:
Method 1: Grant a system policy.
Log on to the RAM console and grant the
AliyunEMRStarRocksFullAccesssystem policy to the RAM user. The RAM user then has full permissions to perform operations on EMR Serverless StarRocks.Method 2: Grant fine-grained permissions.
If you do not want to grant full permissions, use the RequestId in the error message to identify the missing permissions and grant them to the RAM user in the RAM console. For example, if the
emr-serverless-starrocks:ListInstancespermission is missing, create a custom policy that grants only this permission.
On the Policies page of the RAM console, search for
AliyunEMRStarRocksFullAccessto view all permissions included in the system policy.
How do I resolve the "must be an aggregate expression or appear in GROUP BY clause" error in StarRocks?
-
Symptom: When you run an SQL query that contains a GROUP BY clause in StarRocks, the following error occurs if the SELECT list contains a non-aggregate column that is not included in the GROUP BY clause.
Getting analyzing error: ... must be an aggregate expression or appear in GROUP BY clause -
Cause: The
ONLY_FULL_GROUP_BYrule insql_modetriggers this error. When this rule is enabled, every non-aggregate column in the SELECT list must also appear in the GROUP BY clause. -
Solution:
-
Connect to the StarRocks instance by using the SQL Editor in StarRocks Manager or a MySQL client.
-
Run the following command to clear
sql_modeand remove theONLY_FULL_GROUP_BYrule.SET GLOBAL sql_mode=''; -
Verify that
sql_modeis empty.SELECT @@GLOBAL.sql_mode;
The
SET GLOBAL sql_modesetting takes effect immediately without a service restart. DisablingONLY_FULL_GROUP_BYmay produce inaccurate values for non-aggregate columns in GROUP BY queries. Test this change in a test environment before applying it to production. This operation changes the global setting. -