1、帮查一下怎么在调度器那里没有呢?

答:调度中心对应的任务可以设定执行参数,执行器用不用,看业务需求

2、有没有一个接口获取入驻企业里的所有人员名单?

答:通讯录接口

3、token正常,接口数据请求好像还报错。

答:可能API中心和你的服务在同一个节点。

4、部署代码 k8s 访问不了。

答:一、用pai delete -n pai-hardware 删除一下再部署;二、用pai logs 看看部署有没有报错。

5、微应用上架后,发现地址填错了,该怎么办?

答:新增版本,修改正确地址后重新发布。

6、swagger登录了仍提示令牌不合法,你们有遇到吗?

答:Swegger正式环境调试403无权限。

7、提示登录用户130xxxxxxxx不存在,该怎么办?

答:控制台数据没导,需要重新做数据。

8、前端上传文件报错

答:plugins/pai-ui.js 里增加一行 cacheKey: process.env.TOKEN_KEY + ‘-vuex’,

9、获取oss-token方式

答:

10、pai乱码的问题jdl版本是要多少之下

答:要用jdk8 发现乱码是jdk15(使用OpenJDK解决乱码问题)

11、解压后 改了配置环境 java版本还是之前的

答:cmd开新的,旧的不会之识别到新的环境变量。

12、调式的时候,一直是404,不知道什么原因

答:本地运行,要把application.yaml 中 swagger 的配置 关于 path的注释掉;或是在自己把URL上的前/hyd-demo-api删除。

13、一直收不到短信验证码。

答:没开启短信配置,默认1234。

14、swagger Authorize 登录报 Network Error

答:请配置swagger.token-url为https://pai.flyrise.cn/auth-api/oauth/token ,并重新部署

15、为什么开启多租户之后租户ID没插入进去?

答:检查VO租户ID字段是否是空字符串,null值才会自动插入。

16、为什么园区ID是空字符串却会自动插入值?

答:两个阶段的两种实现方式

17、用pai deploy micro -n pai-uni-preview打包工程时报错,怎么解决?

答:先本地执行npm run build:app-plusnpm run build:h5 及查看.npmrc是否使用淘宝源。如果本地编译没有问题可在技术支持群提问。

18、用pai deploy micro -n xxx 发布小程序之后在APP打开还是旧的?

答:1.请在开发中心工程版本记录查看是否有发布成功记录。
2.请在套件详情-页面管理 对应的工程检查是否和你的pages.json描述的微应用是否一致,如果不一致,则在工程根目录单独执行pai deploy microapp
3.请在开发沙箱安装该套件
4.请检查可视化楼层绑定的微应用和你需要打开的微应用是否是同一个
5.如果以上步骤不能定位问题,请在技术支持群提问

19、用pai deploy micro -n xxx –h5 以H5形式发布小程序之后怎么访问?

答:以H5形式发布的小程序和发布前端一致。注意router.base 需为工程名去掉pai-./

20、如何单独指定Feign接口超时时间?

答:1.在调用方的接口里自定义Requestion.Options对象

    Request.Options options =new Request.Options(20, TimeUnit.SECONDS,20,TimeUnit.SECONDS,true);

​ 2.在被调用方的接口中接收Requestion.Options对象

    @GetMapping("/test/getStaff")
    Reply<Bing> getStaff(Request.Options options);

21、开发中心-页面管理如何发布?

答:参考http://api.flyrise.cn:9099/docs/open-docs/open-docs-1ctpsc1un0m86
5.1 配置工程 pages.json
在工程根目录 执行 paid deploy microapp

22、本地调试的时候,使用Feign跨服务调用找不到服务?

答:被调用服务的Service.yaml的metadata.labels是否存在register: enable,若不存在,则添加并删除被调用服务再重新部署

23、上传附件受限

目前安装包默认配置的是200MB, pai的环境也是200MB,但上传仍提示以下错误信息:

异常信息:
{
  "timestamp": "2022-04-18T01:50:17.407+0800",
  "status": 500,
  "error": "Internal Server Error",
  "message": "Maximum upload size exceeded; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.impl.FileSizeLimitExceededException: The field file exceeds its maximum permitted size of 1048576 bytes.",
  "path": "/visit-apply/upload"
}

参考资料:

1048576 bytes等于1MB。
计算方法如下:
1KB=1024B,所以1048576 bytes ÷ 1024 = 1024KB
1MB=1024KB,所以1024KB ÷ 1024 =1MB

所以tomcat的配置要按需配置,以下示例为150MB

spring:
  servlet:
    multipart:
      max-file-size: 150MB
      max-request-size: 150MB

24、编译流程表单,报错 syntaxError: Unexpected token u in JsoN at position 0

答:可能是npm 版本过高。建议使用6版本。

25、本地工程,开发时,重复跳登录页

答:@flyriselink/pai-ui 版本可能过高。在使用1.6版本可能会出现问题,建议回退/锁定版本。

26、中台有excel导入导出数据的组件吗?

答:产品组有提供公共包:

        <dependency>
            <groupId>cn.flyrise</groupId>
            <artifactId>pai-common-excel</artifactId>
            <version>1.0.1-SNAPSHOT</version>
        </dependency>

27、弃用域名后相关配置调整

  • 企业档案无法使用云企库调整
    # nacos: pai-enterprisey-prod.yaml
    pai:
    cloud-ent-db:
      enable: 'true'
      #uri: http://link.flyrise.cn/auth-api/oauth/token
      uri: http://39.108.55.230:31080/auth-api/oauth/token
      #db-uri: http://link.flyrise.cn/cloud-enterprisedb-api/v2
      db-uri: http://39.108.55.230:30011/cloud-enterprisedb-api/v2
  • 运营中心边端管理相关同步数据
    # Deployment: pai-data-sync-edge-agent
    # pai.data.sync.cloud.server.url = http://link.flyrise.cn/data-sync-cloud-server-api
    pai.data.sync.cloud.server.url = http://39.108.55.230:31080/data-sync-cloud-server-api

28、禁止使用高权限账号运行相关服务,后台查询出使用root账号运行的服务

构建Docker镜像失败[Sending build context to Docker daemon  125.9MB, , Step 1/10 : FROM dev.flyrise.cn:8082/library/openjdk:8-alpine, 8-alpine: Pulling
 from library/openjdk, Digest: sha256:4aea0d200b040a5071052a06ec21c6b80162cccb0722e4474b0df14b3be5e4b6, Status: Downloaded newer image for dev.flyrise
.cn:8082/library/openjdk:8-alpine,  ---> 1422e9283a0f, Step 2/10 : MAINTAINER 杨濠洲<907038364@qq.com>,  ---> Using cache,  ---> 59266059afea, Step 3/
10 : LABEL BUILD zky 朱康元 latest-develop-202407301523 2024-07-30 15:23:05,  ---> Running in dbc1dfdab403, Removing intermediate container dbc1dfdab4
03,  ---> 1807e32d0485, Step 4/10 : ENV TZ=Asia/Shanghai,  ---> Running in 29b47ff80372, Removing intermediate container 29b47ff80372,  ---> 01490ccbb
ea1, Step 5/10 : RUN cp /usr/share/zoneinfo/$TZ /etc/localtime     && echo $TZ > /etc/timezone,  ---> Running in d5ebb8407844, cp: can't create '/etc/
localtime': File exists, The command '/bin/sh -c cp /usr/share/zoneinfo/$TZ /etc/localtime     && echo $TZ > /etc/timezone' returned a non-zero code: 
1]

因安全要求不允许默认的root运行相关服务,增加了默认普通用户导致无法操作系统目录,请根据以下调整Dockerfile

FROM dev.flyrise.cn:8082/library/openjdk:8-alpine
LABEL MAINTAINER 开人者人名<开发者邮箱>

WORKDIR /home/pai
EXPOSE 8080 9999

COPY ./target/pai-*.jar ./app.jar

ENV JAVA_OPTS=""
ENTRYPOINT ["sh", "-c", "java $JVM_OPTS $JAVA_OPTS -jar app.jar"]

特别说明:如明额外的文件,如字体等,可以直接放到 jar所在目录,即 /home/pai
建议使用:Hutool包的 FileUtil.getUserHomePath() 来获取用户主目录

29、构建ARM平台前端镜像失败

#23 493.8 > deasync@0.1.30 install /build/pai-operate-ui/node_modules/deasync
#23 493.8 > node ./build.js
#23 493.8
#23 497.3 gyp ERR! find Python
#23 497.3 gyp ERR! find Python Python is not set from command line or npm configuration
#23 497.3 gyp ERR! find Python Python is not set from environment variable PYTHON
#23 497.3 gyp ERR! find Python checking if "python" can be used
#23 497.3 gyp ERR! find Python - "python" is not in PATH or produced an error
#23 497.3 gyp ERR! find Python checking if "python2" can be used
#23 497.3 gyp ERR! find Python - "python2" is not in PATH or produced an error
#23 497.3 gyp ERR! find Python checking if "python3" can be used
#23 497.3 gyp ERR! find Python - "python3" is not in PATH or produced an error
#23 497.3 gyp ERR! find Python
#23 497.3 gyp ERR! find Python **********************************************************
#23 497.3 gyp ERR! find Python You need to install the latest version of Python.
#23 497.3 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#23 497.3 gyp ERR! find Python you can try one of the following options:
#23 497.3 gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#23 497.3 gyp ERR! find Python   (accepted by both node-gyp and npm)
#23 497.3 gyp ERR! find Python - Set the environment variable PYTHON
#23 497.3 gyp ERR! find Python - Set the npm configuration variable python:
#23 497.3 gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
#23 497.3 gyp ERR! find Python For more information consult the documentation at:
#23 497.3 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#23 497.3 gyp ERR! find Python **********************************************************
#23 497.3 gyp ERR! find Python
#23 497.3 gyp ERR! configure error
#23 497.3 gyp ERR! stack Error: Could not find any Python installation to use
#23 497.3 gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:307:47)
#23 497.3 gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:136:21)
#23 497.3 gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:179:16)
#23 497.3 gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:271:16)
#23 497.3 gyp ERR! stack     at exithandler (child_process.js:390:5)
#23 497.3 gyp ERR! stack     at ChildProcess.errorhandler (child_process.js:402:5)
#23 497.3 gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
#23 497.3 gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:12)
#23 497.3 gyp ERR! stack     at onErrorNT (internal/child_process.js:472:16)
#23 497.3 gyp ERR! stack     at processTicksAndRejections (internal/process/task_queues.js:82:21)
#23 497.3 gyp ERR! System Linux 5.4.260-1.el7.elrepo.x86_64
#23 497.3 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
#23 497.3 gyp ERR! cwd /build/pai-operate-ui/node_modules/deasync
#23 497.3 gyp ERR! node -v v14.21.3
#23 497.3 gyp ERR! node-gyp -v v5.1.1
#23 497.3 gyp ERR! not ok
#23 497.4 Build failed
#23 509.8 npm ERR! code ELIFECYCLE
#23 509.8 npm ERR! errno 1
#23 509.8 npm ERR! deasync@0.1.30 install: `node ./build.js`
#23 509.8 npm ERR! Exit status 1
#23 509.8 npm ERR!
#23 509.8 npm ERR! Failed at the deasync@0.1.30 install script.

根据pai服务端日志提示在ARM版的Node基础镜像才会出现这个错误,在多次偿试无果后做了一下调整可以实现最终构建,强制指定(下下策,尽量不指定)使用AMD版的Node基础镜像--platform=linux/amd64进行编译后再使用前端传入的平台进行打包

FROM --platform=linux/amd64 dev.flyrise.cn:8082/library/node:14-alpine as builder

WORKDIR /build/pai-operate-ui
COPY . .

RUN npm install
RUN npm run build:prod

FROM dev.flyrise.cn:8082/library/nginx:1.21.5-oe2203lts
LABEL MAINTAINER lxl<lxl@flyrise.cn>

RUN mkdir -p /var/log/nginx
WORKDIR /usr/share/nginx/html/operate/

COPY default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /build/pai-operate-ui/dist/ ./
文档更新时间: 2024-08-02 17:56   作者:管理员