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

gnmi example is not working #1632

Closed
ihrasko opened this issue Nov 8, 2023 · 1 comment
Closed

gnmi example is not working #1632

ihrasko opened this issue Nov 8, 2023 · 1 comment
Assignees

Comments

@ihrasko
Copy link
Collaborator

ihrasko commented Nov 8, 2023

Bug Description:

The issue is traced back to a misconfiguration in the provided simulator_config.json file, specifically involving the incorrect version of iana-if-type. This causes the lighty-gnmi-simulator to fail during the initialization process.

Affected Branches:

  • lighty.io 19.0.0
  • Main branch

Steps to Reproduce:

  1. Clone the repository:
git clone git@github.com:PANTHEONtech/lighty.git 
cd lighty 
  1. Build the project:
mvn clean install
  1. Navigate to the relevant example:
cd lighty-examples/lighty-gnmi-community-restconf-app
  1. Unzip the simulator binary:
unzip ../../lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/target/lighty-gnmi-device-simulator-20.0.0-SNAPSHOT-bin.zip
  1. Run the simulator:
java -jar lighty-gnmi-device-simulator-20.0.0-SNAPSHOT/lighty-gnmi-device-simulator-20.0.0-SNAPSHOT.jar -c simulator/simulator_config.json

Error Encountered:

The execution will terminate with the following error:

ERROR [main] (GnmiSimulatorApp.java:54) - Lighty gNMI application - failed during creating schema context:
io.lighty.modules.gnmi.simulatordevice.utils.EffectiveModelContextBuilder$EffectiveModelContextBuilderException: Provided list of YangModuleInfo  is empty
at io.lighty.modules.gnmi.simulatordevice.utils.EffectiveModelContextBuilder.addYangModulesInfo(EffectiveModelContextBuilder.java:68) ~[lighty-gnmi-device-simulator-20.0.0-SNAPSHOT.jar:?]
at io.lighty.modules.gnmi.simulatordevice.impl.SimulatedGnmiDevice.start(SimulatedGnmiDevice.java:129) ~[lighty-gnmi-device-simulator-20.0.0-SNAPSHOT.jar:?]
at io.lighty.modules.gnmi.simulatordevice.main.GnmiSimulatorApp.start(GnmiSimulatorApp.java:51) [lighty-gnmi-device-simulator-20.0.0-SNAPSHOT.jar:?]
at io.lighty.modules.gnmi.simulatordevice.main.GnmiSimulatorApp.main(GnmiSimulatorApp.java:30) [lighty-gnmi-device-simulator-20.0.0-SNAPSHOT.jar:?]
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "io.grpc.Server.isShutdown()" because "this.server" is null
at io.lighty.modules.gnmi.simulatordevice.impl.SimulatedGnmiDevice.stop(SimulatedGnmiDevice.java:163)
at io.lighty.modules.gnmi.simulatordevice.main.GnmiSimulatorApp.shutdown(GnmiSimulatorApp.java:67)
at io.lighty.modules.gnmi.simulatordevice.main.GnmiSimulatorApp.start(GnmiSimulatorApp.java:55)
at io.lighty.modules.gnmi.simulatordevice.main.GnmiSimulatorApp.main(GnmiSimulatorApp.java:30)

Environment:

  • OS: Ubuntu 22.04.2
  • Java Version 20.0.1
  • Maven version 3.9.2

Additional Notes:

It is crucial update the configuration file (simulator_config.json) to ensure the correct version of iana-if-type is specified, resolving the issue during startup.

@ihrasko
Copy link
Collaborator Author

ihrasko commented Nov 8, 2023

Fixed in #1625 (main) and #1631 (19.x). The fix will be available in lighty.io 19.1.0.

@ihrasko ihrasko closed this as completed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants