Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] tdma error in docker container #731

Closed
ISO497 opened this issue Dec 24, 2022 · 9 comments
Closed

[BUG] tdma error in docker container #731

ISO497 opened this issue Dec 24, 2022 · 9 comments
Assignees
Labels

Comments

@ISO497
Copy link

ISO497 commented Dec 24, 2022

Describe the bug
Recently, I installed core 9.0.1 and emane 1.4.1 with Dockerfile. It worked well with other models but the TDMA model went wrong with Alter as 'exception occurred when running RUNTIME_STATE state hook: <bound method Session.runtime_state_hook of <core.emulator.session.Session object at 0x7f23e0358790>>'

I did not change any configuration and all arguments were set as default values.

To Reproduce
Steps to reproduce the behavior:

  1. follow the steps in http://coreemu.github.io/core/install.html to install core with dockerfile
  2. create two MDR nodes
  3. create one EMANE node
  4. link two MDR nodes to EMANE node respectively
  5. click 'start session'
  6. see alters(1) as 'exception occurred when running RUNTIME_STATE state hook: <bound method Session.runtime_state_hook of <core.emulator.session.Session object at 0x7f23e0358790>>'

Expected behavior
The TDMA models can work.

Screenshots
image

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • CORE Version 9.0.1
  • EMANE Version 1.4.1

Additional context
By the way, could you teach me how to get the output of core-daemon if I run it in docker container? thanks

@ISO497 ISO497 added the bug label Dec 24, 2022
@bharnden
Copy link
Contributor

bharnden commented Jan 9, 2023

Hard to say without seeing the exact error. You could open a shell in the Docker container, kill the core-daemon process.

pkill -f core-daemon or whatever you like.

Then run the daemon manually in your shell and see the output for the specific error.

@bharnden bharnden changed the title [BUG] [BUG] tdma error in docker container Jan 19, 2023
@bharnden
Copy link
Contributor

bharnden commented Feb 4, 2023

turns out it is an environment issue related to the emane tdma script.

You can resolve it by doing the following in the container and running the daemon with the virtualenv activated.

. /opt/core/venv/bin/activate
core-daemon

@bharnden bharnden self-assigned this Feb 4, 2023
@jhonzy0928
Copy link

If not, I had a thought that docker or other VM systems would probably be unable to use the emane TDMA model due to insufficient resources.

@bharnden
Copy link
Contributor

If not, I had a thought that docker or other VM systems would probably be unable to use the emane TDMA model due to insufficient resources.

Nope, docker containers and VMs would be limited by the resources they have access to, which could be all resources of the host.

@jhonzy0928
Copy link

On my server, I also experience this problem when the number of TDMA nodes is large (hundreds level), and core-daemon is reporting an error as shown below. When I tried the solution you gave, I found that there was no core directory in the opt directory. I think core was installed in a virtual environment, which is fundamentally different from the container. And core can run at least 64 nodes, so what are the environmental problems with this emane TDMA script? In an engineering environment I might not understand this bug right now.
微信图片_20230420164116
微信图片_20230420164128

@bharnden
Copy link
Contributor

Please only post errors from the core-daemon the GUI side does not help. In this case it sounds like you are using a Docker container. Before running the daemon you should try formally activating the virtual environment.

source /opt/core/venv/bin/activate

@jhonzy0928
Copy link

微信图片_20230420164128
I am very sorry that I forgot to emphasize that this picture is the screenshot of the error reported by core-dameon. I only captured the part of the error reported. From the picture, the error is the same as the GUI. Of course, if you can't locate the error correctly, I may give you further details.
Secondly, I am not running directly on doker, but directly on linux system on the server, I think it doesn't seem to make much difference, or I didn't understand exactly what you meant, next I will follow your instructions and give you feedback. Thank you for your reply.

@bharnden
Copy link
Contributor

bharnden commented Apr 20, 2023

That is not a picture of the core-daemon output, but the core-gui output. There are only 2 CORE pieces running, so you need to look at the other one.

You want the output from core-daemon, not core-gui.

@jhonzy0928
Copy link

Maybe I made a very stupid mistake, thank you very much for reminding me.
When I ran the gui for the first time, I had the error shown in Figure 1, and I chose to ignore it and continue running it, as this error occurs from time to time and does not affect subsequent tests. The second time I ran the gui, I ran sudo core-daemon & in the background, or I ran core-daemon ahead of time, and the error was shown in Figure 2 below.
From a core-daemon point of view, no matter what my gui was running, the errors were constant. This seems to introduce a different error than core-gui.
In addition, my system is not in the file/opt/core/venv/bin/activate, because my version of the system core (8.2.0) different?
微信图片_20230421104607
微信图片_20230421104559

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants