Smobiler上海石磨_.NET移动开发平台

标题: SmobilerService已经成功部署到了Linux上,应用无法启动 [打印本页]

作者: jinding    时间: 2023-3-2 17:23
标题: SmobilerService已经成功部署到了Linux上,应用无法启动
SmobilerService已经成功部署到了Linux上,Linux发行版是Ubuntu Server 20.04,运行时环境 .net core 3.1添加应用后,运行提示如下:

  1. 2023/03/02 08:48:17 [SmobilerProcess8180_RunSingleProcess_Ex] System.Exception: /home/imarmot/www/les/SmobilerProcess8180.dll文件不存在!
  2.    at x78kiAThmELNWaiToD.E7bL8XDcr47HOx90p7.zAnhjp1jeE()
  3. 2023/03/02 08:48:17 [SmobilerProcess8180_StopSingleProcess] for RunSingleProcess_Finally server status True deamon status False
复制代码
同样的东西,在Windows Server下运行没问题。

我将SmobilerService下 server/bin/netcoreapp3.1/下的SmobilerProcess.dll和SmobilerProcess.runtimeconfig.json重命名后放到了
/home/imarmot/www/les目录下。依然无法运行。日至如下:
  1. 2023/03/02 08:57:42 [SmobilerProcess8180_RunSingleProcess] Init:listenval=60 MaxMemory=0 IsHidden=False
  2. 2023/03/02 08:57:43 [SmobilerProcess8180_RunSingleProcess_While_Ex] System.Exception: Process HasExited with code 0
  3.    at x78kiAThmELNWaiToD.E7bL8XDcr47HOx90p7.zAnhjp1jeE()
  4. 2023/03/02 08:57:43 [SmobilerProcess8180_StopSingleProcess] for RunSingleProcess_While_Finally server status True deamon status False
  5. 2023/03/02 08:57:43 [SmobilerProcess8180_StopSingleProcess] Begin Leap......
  6. 2023/03/02 08:57:43 [SmobilerProcess8180_StopSingleProcess] Leap Sucessful.....
  7. 2023/03/02 08:57:43 [SmobilerProcess8180_StopSingleProcess] for RunSingleProcess_Finally server status True deamon status False
复制代码


请问Smobiler应用可以运行在Linux下吗?如果仅仅SmobilerService能运行在Linux就没有意义了。
开发Smobiler应用时,目标框架只能选择 .Net Framework,无法选择.net Core。
所以我怀疑是.Net Framework的问题,又在Linux上安装了Mono。Smobiler应用依然无法运行起来。
请问如何能让Smobiler应用运行起来?谢谢。

作者: Lula.Jin    时间: 2023-3-3 09:27
netframework项目无法运行在linux的,需要创建net core项目 ,参考https://github.com/comsmobiler/SmobilerSamplesNetCore  ,netcore项目 目前无设计器,需要引用netframework的项目
作者: jinding    时间: 2023-3-3 16:30
Lula.Jin 发表于 2023-3-3 09:27
netframework项目无法运行在linux的,需要创建net core项目 ,参考https://github.com/comsmobiler/Smobile ...

使用此例子编译后,部署到Linux后,还是无法启动。日志显示为:
  1. 2023/03/03 08:25:44 [SmobilerProcess8180_RunSingleProcess] Init:listenval=60 MaxMemory=0 IsHidden=False
  2. 2023/03/03 08:25:44 [SmobilerProcess8180_RunSingleProcess_While_Ex] System.Exception: Process HasExited with code 131
  3.    at x78kiAThmELNWaiToD.E7bL8XDcr47HOx90p7.zAnhjp1jeE()
  4. 2023/03/03 08:25:44 [SmobilerProcess8180_StopSingleProcess] for RunSingleProcess_While_Finally server status True deamon status False
  5. 2023/03/03 08:25:44 [SmobilerProcess8180_StopSingleProcess] Begin Leap......
  6. 2023/03/03 08:25:44 [SmobilerProcess8180_StopSingleProcess] Leap Sucessful.....
  7. 2023/03/03 08:25:44 [SmobilerProcess8180_StopSingleProcess] for RunSingleProcess_Finally server status True deamon status False
复制代码

编译的是 SmobilerSamplesNetCore 这个项目。我的操作对吗?


作者: Lula.Jin    时间: 2023-3-3 17:38
是的,将SmobilerSamplesNetCore编译后的dll放发到linux上部署
作者: jinding    时间: 2023-3-4 08:39
Lula.Jin 发表于 2023-3-3 17:38
是的,将SmobilerSamplesNetCore编译后的dll放发到linux上部署

谢谢,依照您给出的路径,经过多次尝试,终于将Smobiler应用成功部署到了Linux上。




欢迎光临 Smobiler上海石磨_.NET移动开发平台 (https://www.smobiler.cn/) Powered by Discuz! X3.2