大圣头不冷ಥ_ಥ 2024-06-17 23:11 采纳率: 0%
浏览 19

wsl2下如何配置vtd仿真环境!

已经安装了 wsl2 与 vtd,但是运行期间报错打不开端口,已经检查了权限和防火墙已经占用,束手无策了。有没有人在 wsl 上配置过 vtd 呀!不想弄两台电脑了。


```bash
vtdStop.sh: working in VTD_ROOT=/root/VTD.2.2/bin/..
vtdStop.sh: stopping VTD ...
vtdStop.sh: VTD is stopped.
(base) root@DESKTOP-3ECV44J:~/VTD.2.2/bin# sudo ./vtdStart_test.sh 
调试信息:开始执行脚本
调试信息:VTD_ROOT设置为 /root/VTD.2.2/bin/..
working in VTD_ROOT=/root/VTD.2.2
调试信息:主机设置为 DESKTOP-3ECV44J
现在在主机 DESKTOP-3ECV44J 上启动SimServer和GUI...

============================================================
             [
            [
           [
          [
 [       [  [  [[[[[   [[[[[   [[[
  [     [  [  [    [  [      [
   [   [  [  [[[[[   [[[[    [[[
    [ [  [  [  [    [          [
     [  [  [   [   [[[[[   [[[

 Copyright (C) VIRES Simulationstechnologie GmbH
============================================================

 

 Version 1.3.1  -  17:50:49 Jul 20 2017

 Author:   VIRES

 Revision: 143
============================================================


INFO  Mon 2024-06-17 21:41:17 processCmdLine:     Run as a Master
INFO  Mon 2024-06-17 21:41:17 SetupBase::initialize: Resolved VTD_ROOT </root/VTD.2.2>
INFO  Mon 2024-06-17 21:41:17 SetupBase::initialize: -- Default setting --
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: ---- Settings info ----
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: Config name = Standard
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: Idle rate = 20
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: Work rate = 33
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: log dir = /tmp
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: log name = taskRec_SimServer.txt
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: notify level = INFO
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: username = root
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: vtdRoot = /root/VTD.2.2
INFO  Mon 2024-06-17 21:41:17 Master::initialize: unblock signals  SIGCHLD SIGINT SIGTERM
INFO  Mon 2024-06-17 21:41:17 Master::initialize: Preparing for redirecting </root/VTD.2.2/Data/Setups/Current/Config/SimServer/simServer.xml> [configName = Standard] base on VTD_ROOT...
INFO  Mon 2024-06-17 21:41:17 Master::initialize: Config file absolute path </root/VTD.2.2/Data/Setups/Current/Config/SimServer>
INFO  Mon 2024-06-17 21:41:17 Master::initialize: VTD_ROOT absolute path </root/VTD.2.2>
INFO  Mon 2024-06-17 21:41:17 Master::initialize: Config file relative path to VTD_ROOT <Data/Setups/Standard/Config/SimServer>
INFO  Mon 2024-06-17 21:41:17 Master::initialize: Reset config file's path to <Data/Setups/Standard/Config/SimServer/simServer.xml>
INFO  Mon 2024-06-17 21:41:17 Master::initialize: Change working directory to </root/VTD.2.2>
INFO  Mon 2024-06-17 21:41:17 Master::initialize: Verify working directory </root/VTD.2.2>
INFO  Mon 2024-06-17 21:41:17 MasterSetup::normalize: normalizing <Data/Setups/Standard/Config/SimServer/simServer.xml> [setupName = Standard] ...
INFO  Mon 2024-06-17 21:41:17 MasterSetup::normalize: normalizing slave <desktop-3ecv44j> ...
INFO  Mon 2024-06-17 21:41:17 MasterSetup::normalize: predefined envvar [PORT_SIMSERVER = 32512]
INFO  Mon 2024-06-17 21:41:17 Master::initialize: Run as a Master, host <desktop-3ecv44j> [tuple = 127.0.1.1:32512], 
INFO  Mon 2024-06-17 21:41:17 vtd::SocketTcpMultipleServerChannel::open: open: success open port 32512 on channel Master.
INFO  Mon 2024-06-17 21:41:17 Master::initialize: Set envvar PORT_SIMSERVER to <32512>
INFO  Mon 2024-06-17 21:41:17 Master::initialize: going to cbInit ... 
INFO  Mon 2024-06-17 21:41:17 Master::cbInit:     going to cbRun
INFO  Mon 2024-06-17 21:41:17 SetupBase::initialize: Resolved VTD_ROOT </root/VTD.2.2>
INFO  Mon 2024-06-17 21:41:17 SetupBase::initialize: -- Default setting --
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: ---- Settings info ----
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: Config name = Standard
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: Idle rate = 20
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: Work rate = 33
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: log dir = /tmp
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: log name = taskRec_SimServer.txt
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: notify level = INFO
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: username = root
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: vtdRoot = /root/VTD.2.2
INFO  Mon 2024-06-17 21:41:17 vtd::SocketTcpServerChannel::open: open: success open port 32513 on channel desktop-3ecv44j.
INFO  Mon 2024-06-17 21:41:17 Master::cbInit:     Starting a slave <desktop-3ecv44j> by command '${VTD_ROOT}/Runtime/Core/SimServer/startSlave.sh desktop-3ecv44j 32512 /root/VTD.2.2 desktop-3ecv44j root /tmp/taskRec_SimServerSlave.txt'
Master host = desktop-3ecv44j
Master port = 32512
Slave host = desktop-3ecv44j
Slave user = root
Slave VTD_ROOT = /root/VTD.2.2
Slave log name = /tmp/taskRec_SimServerSlave.txt
INFO  Mon 2024-06-17 21:41:17 Master::cbInit:     system(): 0
teeLimit: limiting size of output file </tmp/taskRec_SimServerSlave.txt> to 5000000 bytes.

============================================================
             [
            [
           [
          [
 [       [  [  [[[[[   [[[[[   [[[
  [     [  [  [    [  [      [
   [   [  [  [[[[[   [[[[    [[[
    [ [  [  [  [    [          [
     [  [  [   [   [[[[[   [[[

 Copyright (C) VIRES Simulationstechnologie GmbH
============================================================

 

 Version 1.3.1  -  17:50:49 Jul 20 2017

 Author:   VIRES

 Revision: 143
============================================================


INFO  Mon 2024-06-17 21:41:17 processCmdLine:     Run as a Slave
INFO  Mon 2024-06-17 21:41:17 SetupBase::initialize: Resolved VTD_ROOT </root/VTD.2.2>
INFO  Mon 2024-06-17 21:41:17 SetupBase::initialize: -- Default setting --
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: ---- Settings info ----
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: Config name = Standard
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: Idle rate = 20
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: Work rate = 33
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: log dir = /tmp
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: log name = taskRec_SimServer.txt
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: notify level = INFO
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: username = root
INFO  Mon 2024-06-17 21:41:17 SetupBase::showInfo: vtdRoot = /root/VTD.2.2
INFO  Mon 2024-06-17 21:41:17 Slave::initialize:  Change working dir to /root/VTD.2.2
INFO  Mon 2024-06-17 21:41:17 Slave::initialize:  Run as a Slave host <desktop-3ecv44j>, [master host:port = localhost:32512]
INFO  Mon 2024-06-17 21:41:17 vtd::SocketTcpClientChannel::open: open: channel <SSDP> sucess [port = 32512, addr = 127.0.0.1]
INFO  Mon 2024-06-17 21:41:17 Slave::initialize:  Connected to channel <SSDP> [host:port = localhost:32512].
NOTICE (PortTCPServer): "PortTCPServer::checkForClient: client connected on port 32512, desc 6 from address (127.0.0.1)"
INFO  Mon 2024-06-17 21:41:17 Slave::cbInit:      claim slave <desktop-3ecv44j> to the Master
INFO  Mon 2024-06-17 21:41:17 Master::operator:   welcome <desktop-3ecv44j> [port = 32513]
INFO  Mon 2024-06-17 21:41:17 Slave::cbInit:      claim slave <desktop-3ecv44j> to the Master
INFO  Mon 2024-06-17 21:41:17 Master::operator:   welcome <desktop-3ecv44j> [port = 32513]
INFO  Mon 2024-06-17 21:41:17 Slave::operator:    Master opens private port <32513> [master host = localhost]
INFO  Mon 2024-06-17 21:41:17 Slave::operator:    close channel <SSDP> [localhost:32512]
INFO  Mon 2024-06-17 21:41:17 vtd::SocketTcpClientChannel::open: open: channel <desktop-3ecv44j> sucess [port = 32513, addr = 127.0.0.1]
INFO  Mon 2024-06-17 21:41:17 Slave::operator:    go to stage <Service>
WARN  Mon 2024-06-17 21:41:17 vtd::SocketChannelBase::writeChannel: writeChannel: no connection on channel <SSDP> yet.
INFO  Mon 2024-06-17 21:41:17 Slave::cbInit:      claim slave <desktop-3ecv44j> to the Master
NOTICE (PortTCPServer): "PortTCPServer::checkForClient: client connected on port 32513, desc 7 from address (127.0.0.1)"
WARNING (PortTCPServer): "PortTCP::read: connection <6> lost on port #32512. "
NOTICE (PortTCPServer): "PortTCPServer::disconnect: disconnecting parent socket 6."
INFO  Mon 2024-06-17 21:41:17 SlaveStub::operator: return from <desktop-3ecv44j> calling method <configure> [pass = true] 
INFO  Mon 2024-06-17 21:41:17 SlaveStub::operator: host <desktop-3ecv44j> success [isConfigured = true]
INFO  Mon 2024-06-17 21:41:17 Master::transit:    <Config> ==> <Ready>
INFO  Mon 2024-06-17 21:41:17 SlaveBase::startExplicitTask: <ParamServer>. [Go]
INFO  Mon 2024-06-17 21:41:17 vtdev::Process::ProcessImpl::start: Process: ParamServer          [0] starting to run ... 
INFO  Mon 2024-06-17 21:41:17 vtdev::ProcessManager::start: thread for monitoring child processes is running ...
INFO  Mon 2024-06-17 21:41:17 vtdev::Process::ProcessImpl::startProcess: Process: ParamServer          [0] is at STARTING state, NOTRUNNING => STARTING
INFO  Mon 2024-06-17 21:41:17 vtdev::ProcessManager::run: waiting for children to die
INFO  Mon 2024-06-17 21:41:17 vtdev::Process::ProcessImpl::execChild: Process: Calling exec() ...
INFO  Mon 2024-06-17 21:41:17 vtdev::Process::ProcessImpl::waitForStarted: Process: ParamServer          [15547] is running ... STATING => RUNNING
INFO  Mon 2024-06-17 21:41:17 VtdLocalTask::startWithTerminal: ParamServer [15547] is started
INFO  Mon 2024-06-17 21:41:17 SlaveStub::operator: return from <desktop-3ecv44j> calling method <load> [pass = true] 
INFO  Mon 2024-06-17 21:41:17 SlaveBase::startExplicitTask: <ParamServer>. [Go]
INFO  Mon 2024-06-17 21:41:17 SlaveStub::operator: task <ParamServer> success [task running = true]
INFO  Mon 2024-06-17 21:41:18 SlaveBase::startExplicitTask: <TaskControl>. [Go]
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::start: Process: TaskControl          [0] starting to run ... 
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::startProcess: Process: TaskControl          [0] is at STARTING state, NOTRUNNING => STARTING
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::execChild: Process: Calling exec() ...
INFO  Mon 2024-06-17 21:41:18 vtdev::ProcessManager::run: waiting for children to die
INFO  Mon 2024-06-17 21:41:18 SlaveStub::operator: return from <desktop-3ecv44j> calling method <load> [pass = false] 
INFO  Mon 2024-06-17 21:41:18 SlaveStub::operator: failed calling method <load> [host = desktop-3ecv44j]
INFO  Mon 2024-06-17 21:41:18 SlaveBase::startExplicitTask: <VtGui>. [Go]
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::start: Process: VtGui                [0] starting to run ... 
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::startProcess: Process: VtGui                [0] is at STARTING state, NOTRUNNING => STARTING
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::start: Process: viTee                [0] starting to run ... 
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::startProcess: Process: viTee                [0] is at STARTING state, NOTRUNNING => STARTING
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::execChild: Priority must be 0 in normal schedule policy
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::execChild: Process: Calling exec() ...
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::waitForStarted: Process: VtGui                [15552] is running ... STATING => RUNNING
INFO  Mon 2024-06-17 21:41:18 VtdLocalTask::startWithoutTerminal: Vtgui is started
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::waitForStarted: Process: viTee                [15553] is running ... STATING => RUNNING
INFO  Mon 2024-06-17 21:41:18 VtdLocalTask::startWithoutTerminal: tee is started
teeLimit: limiting size of output file </tmp/taskRec_VtGui.txt> to 50000000 bytes.
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::execChild: Priority must be 0 in normal schedule policy
INFO  Mon 2024-06-17 21:41:18 vtdev::Process::ProcessImpl::execChild: Process: Calling exec() ...

=============================================
             [
            [
           [
          [
 [       [  [  [[[[[   [[[[[   [[[
  [     [  [  [    [  [      [
   [   [  [  [[[[[   [[[[    [[[
    [ [  [  [  [    [          [
     [  [  [   [   [[[[[   [[[

 (c) VIRES GmbH         2010-2014
=============================================
 VtGui IOS - Version 2.2.0

 created: Dec 20 2018, 13:28:22
=============================================

INFO  Mon 2024-06-17 21:41:18 vtdev::ProcessManager::run: waiting for children to die
INFO  Mon 2024-06-17 21:41:18 vtdev::ProcessManager::run: waiting for children to die
INFO  Mon 2024-06-17 21:41:18 SlaveStub::operator: return from <desktop-3ecv44j> calling method <load> [pass = true] 
INFO  Mon 2024-06-17 21:41:18 SlaveBase::startExplicitTask: <VtGui>. [Go]
INFO  Mon 2024-06-17 21:41:18 SlaveStub::operator: task <VtGui> success [task running = true]
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 48179 to <localhost>"
调试信息:SimServer已启动
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 48179 to <localhost>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 54345 to <PARAM_SCP_CHNL>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 48179 to <localhost>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 54345 to <PARAM_SCP_CHNL>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 48179 to <localhost>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 54345 to <PARAM_SCP_CHNL>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 48179 to <localhost>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 54345 to <PARAM_SCP_CHNL>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 48179 to <localhost>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 54345 to <PARAM_SCP_CHNL>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 48179 to <localhost>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 54345 to <PARAM_SCP_CHNL>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 48179 to <localhost>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 54345 to <PARAM_SCP_CHNL>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 48179 to <localhost>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 54345 to <PARAM_SCP_CHNL>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 48179 to <localhost>"
WARNING (ParamGuiWidget): "ComHandler::createClientPort: could not open client port 54345 to <PARAM_SCP_CHNL>"

希望有真正研究过安装 vtd 的答者给出解决方案,目前通过研究解决了一部分问题,但是还是有部分进程无法启动。不需要 ai,我自己有 gpt4。

  • 写回答

3条回答 默认 最新

  • 专家-赤兔[在线] 全栈领域优质创作者 2024-06-17 23:11
    关注

    引自免费微信小程序:皆我百晓生

    面对在WSL2环境下配置VTD(车辆工具开发)仿真环境遇到的问题,特别是关于端口冲突的情况,可以采取以下步骤进行排查和解决:

    步骤1:确认端口是否被占用

    首先,确保目标端口(比如默认的VTD端口)没有被其他进程占用。在WSL2中,可以通过以下命令检查端口状态:

    sudo lsof -i :<port>
    

    例如,如果你要检查8080端口是否被占用:

    sudo lsof -i :8080
    

    如果发现端口被占用,可以尝试找出具体是哪个进程并结束它:

    sudo fuser -k <port>/tcp
    

    例如:

    sudo fuser -k 8080/tcp
    

    步骤2:检查防火墙设置

    即使端口未被占用,防火墙也可能阻止VTD访问该端口。在WSL2中,防火墙规则通常由宿主机(即Windows系统)管理。可以通过以下命令查看Windows防火墙规则:

    Get-NetFirewallRule | Where-Object { $_.DisplayName -like "*VTD*" }
    

    如果发现有相关规则阻止VTD的端口,可以尝试修改或删除这些规则。这通常需要管理员权限。

    步骤3:配置WSL2网络

    确保WSL2的网络设置允许VTD正确地监听和绑定端口。WSL2默认使用虚拟网络适配器与宿主机通信,可能需要在Windows的网络设置中检查或调整此适配器的属性。

    步骤4:修改VTD配置文件

    如果上述步骤未能解决问题,考虑修改VTD的配置文件,指定一个不同的、未被占用的端口。VTD的配置文件通常位于安装目录下的config.xml文件中。找到<port>标签,并将其更改为未使用的端口号。

    例如:

    <port>9090</port>
    

    步骤5:重启VTD服务

    更改配置后,务必重启VTD服务,确保新的端口设置生效。

    进阶步骤:跨平台调试

    如果VTD需要与宿主机上的应用程序交互,确保WSL2和Windows之间的网络通信正常。可以通过在VTD中使用宿主机的IP地址(通常是192.168.1.1172.20.10.1等,取决于你的网络设置)来测试这一点。

    如果以上步骤都无法解决问题,可能需要深入检查WSL2的网络栈或VTD软件本身是否存在已知的兼容性问题。

    希望这些步骤能帮助你成功在WSL2环境下配置VTD仿真环境。如果还有其他技术障碍,进一步的细节或错误信息将有助于更精确的诊断和解决策略。

    评论 编辑记录

报告相同问题?

问题事件

  • 修改了问题 6月19日
  • 修改了问题 6月18日
  • 创建了问题 6月17日

悬赏问题

  • ¥15 静电纺丝煅烧后如何得到柔性纤维
  • ¥15 (标签-react native|关键词-镜像源)
  • ¥100 照片生成3D人脸视频
  • ¥15 伪装视频时长问题修改MP4的时长问题,
  • ¥15 JETSON NANO
  • ¥15 VS开发qt时如何在paintgl函数中用pushbutton控制切换纹理
  • ¥20 关于 openpyxl 处理excel文件地问题
  • ¥15 MS中不知道高分子的构型怎么构建模型
  • ¥60 QQOP数据,什么是op数据号,怎么提取op数据!能不能大量提取(语言-c语言)
  • ¥15 matlab代码 关于微分方程和嵌套的分段函数。