You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用远程Master Key时Sentinel Envelope报错31:请求的Feature未找到

Sentinel Envelope保护JAR/WAR报错「The requested Feature was not found (31)」排查方案

问题场景

远程机器连接了Sentinel HASP Master Key,本地PC通过Maven构建Java应用,期望构建完成后自动用Sentinel Envelope加密保护生成的JAR/WAR包。已在本地Admin Control Center(ACC)完成远程许可配置:

  • 勾选「Allow Access to Remote Licenses」和「Broadcast Search for Remote Licenses」选项
  • 将远程PC的IP地址添加至「Remote License Search Parameters」字段
  • ACC的「Sentinel Keys」列表中能正常看到该远程Master Key

但启动Sentinel Envelope并点击「Protect」按钮时,弹出错误:The requested Feature was not found (31),且已确认所需Feature ID存在。

使用的Maven插件配置如下:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>3.1.1</version>
    <executions>
        <execution>
            <id>sentinel-envelope</id>
            <phase>package</phase>
            <goals>
                <goal>exec</goal>
            </goals>
            <configuration>
                <executable>${sentinel.vendorSuite.dir}\envelope.com</executable>
                <workingDirectory>${sentinel.vendorSuite.dir}</workingDirectory>
                <arguments>
                    <argument>--ems-srv-addr</argument>
                    <argument>${sentinel.ems.serverAddress}</argument>
                    <argument>--ems-srv-port</argument>
                    <argument>${sentinel.ems.serverPort}</argument>
                    <argument>--ems-srv-usrname</argument>
                    <argument>${sentinel.ems.usrName}</argument>
                    <argument>--ems-srv-pwd</argument>
                    <argument>${sentinel.ems.password}</argument>
                    <argument>--protect</argument>
                    <argument>${project.basedir}\sentinel\envelope_config.prjx</argument>
                </arguments>
            </configuration>
        </execution>
    </executions>
</plugin>

可能原因及解决办法

1. 命令行未指定远程许可搜索参数

ACC的配置仅对图形界面工具生效,命令行运行envelope.com时不会自动读取ACC的远程配置,这是最常见的触发原因。

解决:
在插件的<arguments>节点中添加远程许可搜索参数:

<argument>--search</argument>
<argument>remoteip=<远程PC的IP地址></argument>

若远程机器修改了HASP默认端口(默认4750),需额外指定端口:

<argument>--search</argument>
<argument>remoteip=192.168.1.100:4751</argument>

2. Feature ID与Master Key绑定的Feature不匹配

即便确认Feature ID存在,也可能出现以下细节错误:

  • Feature ID仅在EMS中创建,未部署到远程Master Key
  • 配置文件中的Feature ID存在拼写/格式错误(如数字位数、大小写偏差)
  • Master Key中的目标Feature已过期或被禁用

解决:

  • 登录EMS,检查该Feature ID是否已成功写入远程Master Key
  • 核对envelope_config.prjx中的Feature ID与EMS记录完全一致
  • 在ACC中查看远程Master Key详情,确认目标Feature处于激活状态

3. 网络端口被防火墙拦截

远程Master Key所在机器的HASP服务默认使用4750端口,若防火墙未开放该端口,本地命令行工具无法正常访问远程许可。

解决:

  • 在远程PC的防火墙中开放TCP/UDP 4750端口
  • 本地通过telnet <远程IP> 4750测试端口连通性
  • 若端口已修改,需在--search参数中指定新端口

4. 配置文件(prjx)Feature属性错误

envelope_config.prjx中可能存在Feature属性配置错误,例如:

  • 选择了Runtime Feature而非Master Feature
  • 未正确关联目标Master Key

解决:

  • 打开配置文件,确认FeatureID字段与目标Feature完全匹配,KeyType设置为Master
  • 若手动编辑容易出错,直接通过Sentinel Envelope图形界面重新生成配置文件

内容的提问来源于stack exchange,提问作者Sashko1121

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.13 14:13:16