开发者社区 > 云原生 > Serverless > 正文

函数计算FC里部署的应用,能打开页面,但运行出现!200错误提示,怎么处理?

函数计算FC里部署的应用,能打开页面,但运行出现!200错误提示,怎么处理?运行接口这个报错 response: {'ErrorCode': 'CAExited', 'ErrorMessage': 'Function instance exited unexpectedly(code 1, message:operation not permitted) with start command \' \'.\nLogs:OpenBLAS WARNING - could not determine the L2 cache size on this system, assuming 256k\r\n2023-10-27 12:22:51,422 - modelscope - INFO - PyTorch version 2.0.1+cu117 Found.\r\n2023-10-27 12:22:51,439 - modelscope - INFO - Loading ast index from /mnt/auto/ast_indexer\r\n2023-10-27 12:22:51,443 - modelscope - INFO - No valid ast index found from /mnt/auto/ast_indexer, generating ast index from prebuilt!\r\n2023-10-27 12:22:51,782 - modelscope - INFO - Loading done! Current index file version is 1.8.1, with md5 2c26b8f616d95476e0bf242e6c0cabb6 and a total number of 893 components indexed\r\nOpenBLAS WARNING - could not determine the L2 cache size on this system, assuming 256k\r\n[2023-10-27 12:22:55,059] [INFO] [real_accelerator.py:133:get_accelerator] Setting ds_accelerator to cuda (auto detect)\r\n2023-10-27 12:22:55.940544: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0\r\nWARNING:tensorflow:Deprecation warnings have been disabled. Set TF_ENABLE_DEPRECATION_WARNINGS=1 to re-enable them.\r\nTraceback (most recent call last):\r\n File "/usr/src/app/app.py", line 27, in \r\n HubApi().login(sdk_token)\r\n File "/opt/conda/lib/python3.8/site-packages/modelscope/hub/api.py", line 109, in login\r\n raise_for_http_status(r)\r\n File "/opt/conda/lib/python3.8/site-packages/modelscope/hub/errors.py", line 162, in raise_for_http_status\r\n raise HTTPError(http_error_msg, response=rsp)\r\nrequests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://www.modelscope.cn/api/v1/login, body: b\'{"AccessToken": "6ddb66db-14ff-4831-8f82-61c852536623"}\''}

展开
收起
三分钟热度的鱼 2023-11-01 12:36:28 163 0
3 条回答
写回答
取消 提交回答
  • 面对过去,不要迷离;面对未来,不必彷徨;活在今天,你只要把自己完全展示给别人看。

    根据您提供的信息,部署的应用出现“!200 错误”,同时运行接口时出现 CAExited 错误,表明应用进程在启动时出现异常退出。根据错误提示中的堆栈信息,出现此问题可能是因为执行命令的操作未获得许可或操作系统未授权。
    针对这种情况,我建议您:

    1. 检查您的函数计算 FC 实例是否拥有正确的安全组规则和角色权限,以允许应用程序访问相应的资源和服务;
    2. 确保函数代码中的命令和路径没有出现错误;
    3. 更新您的系统组件以及相关的 Python 包,确保其符合函数计算 FC 对于环境的要求;
    4. 尝试重置实例或者重新创建一个新的实例来解决此问题。
    2023-11-02 23:06:42
    赞同 展开评论 打赏
  • 从你提供的信息来看,你的函数计算FC部署出现了"CAExited"的错误,错误消息为"Function instance exited unexpectedly(code 1, message:operation not permitted) with start command ' '." 这表明函数实例意外退出,操作未被允许。

    另外,从日志中可以看到,你的程序试图通过http://www.modelscope.cn/api/v1/login这个URL进行登录,但返回了400错误,即客户端错误。该错误通常由于请求格式不正确或请求中的数据有问题而触发。

    以下是一些可能的解决方案:

    1. 检查你的函数代码:确认是否有语法错误、逻辑错误或其他可能引起函数执行失败的问题。
    2. 检查你的依赖项:确认所有的依赖项都已正确配置和安装。
    3. 检查权限问题:确认你的函数是否有足够的权限执行其需要的操作。在你的情况下,这可能涉及到对特定资源的访问权限。
    4. 检查网络连接:确认你的函数可以正常连接到它需要访问的网络资源。在你的情况下,这可能涉及到对modelscope网站的访问。
    5. 检查你的请求数据:如果你在使用模型或者API进行登录或者其他操作,需要确认你传递的数据是否正确。比如在这个情况中,需要确认sdk_token是否正确。
    2023-11-02 16:10:33
    赞同 展开评论 打赏
  • Java

    当实例启动命令为java -Dserver.port=9000 -jar target/not_exist_file.jar时,报错信息如下。

    Function instance exited unexpectedly(code 1, message:operation not permitted) with start command 'java -Dserver.port=9000 -jar target/not_exist_file.jar '.
    Logs:Error: Unable to access jarfile target/not_exist_file.jar
    从报错日志中可以找到原因Unable to access jarfile target/not_exist_file.jar,即target/not_exist_file.jar文件不存在。报错的退出码为code 1, message:operation not permitted。

    如果启动参数中的文件不存在,则报错信息中的退出码一般为code 2, message:no such file or directory。特殊情况下,报错信息中的退出码可能不是code 2, message:no such file or directory或无退出码,此时,需要根据报错日志进行排查https://help.aliyun.com/zh/fc/user-guide/troubleshooting

    2023-11-01 14:22:47
    赞同 展开评论 打赏

快速交付实现商业价值。

相关产品

  • 函数计算
  • 相关电子书

    更多
    Serverless开发平台: 让研发效能再提升 立即下载
    Serverless 引领云上研发新范式 立即下载
    All in Serverless 阿里云核心产品全面升级 立即下载