-
Notifications
You must be signed in to change notification settings - Fork 39
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
agant cannot connect to sysdb #25
Comments
This most probably means there is no "mount profile" for the HelloWorld application in /usr/lib/SysdbMountProfiles. Here is a copy/paste way to produce that profile on the bash prompt of the EOS switch: bin=/usr/bin/myApp # <<<=== adapt this line The mount profile will be /usr/lib/SysdbMountProfiles/myApp You will need to re-install that file to /usr/libSysdbMountProfiles after a reboot. This can be done via a "on-boot" script, or by packaging that profile into an RPM and configure EOS to boot with it (that's the best route if your application is already installed via an RPM). The on-boot script route looks like this: switch(config)# event-handler where /mnt/flash/.sh is a script that copies (installs) the profile from /mnt/flash to /usr/lib/SysdbMountProfiles. The RPM route looks like this (after scp-ing the RPM to /tmp on the switch): switch(config)# copy file:/tmp/myApp.i686.rpm extension: The second line installs the RPM, the third one makes sure it will get re-installed after a reboot. |
It works. Thank you for the quick response. |
slight correction, the stars did not survive the copy/paste into this wiki, added them as STAR below: cat N.B. this would work too, but would not detect any errors in case the template file is not as expected: cat |
@ruferp It seems not work on my VM(vEOS-lab-4.18.1F.vmdk).Is there anything missing? The mount profile:/mnt/flash/HelloWorld
The on-boot script:/mnt/flash/HelloWorld-install.sh
|
don't use extensions like .py, just call you binary HelloWorld. And the .py is quite irrelevant: binaries usually don't have extensions, although I do see a few in linux, but that's really an exception:
|
Ah~~~! It isn't a binary file. A python file copy from EosSdk/examples/HelloWorld.py! |
binary or py makes no difference, as far as mount profile is concerned. |
The log file: |
This:
is not supposed to be the mount profile itself, but how to create it! |
Still not word, maybe the Sysdb not running!
Email: [email protected] |
I did not see any EOS switch window there |
I tested it on the VMware Workstation named Fedora 4_18(baseed on vEOS-lab-4.18.1F.vmdk). |
It looks like it is working now. |
@ruferp Thank you for the quick response and the remote assistance. Run the HelloWorld.py on VM
A litter problem comes out after I reboot the VM.
|
Yes, that's a known problem with the on-boot triggers: indeed, your agent may get started before the on-boot script runs. After 10 minutes the agent will give up looking for sysdb and restart, at which point it will find a mount-profile and thus can talk to sysdb. |
You can use an rc script that gets run after the EOS.swi image was extracted and before the agents run (instead of the on-boot script that runs too late to create a mount-profile for your agent that is configured in the startup-config). Here is an example/illustration (where you see how to call the script, namely rc.eos):
|
by the way, to set the root password (so you can ssh into the vm as root), don't use the "username secret " command, use this command instead:
That will give you a bash shell inside the VM when you ssh; to get a Cli, just run "Cli -A" from bash.
If somebody uses VMware fusion: this is how to have the vm get an ip address: |
veos-log.txt
in veos, example helloWorld can not connect to sysdb, catting log shows:
waiting for connection to Sysdb .............................................................
The text was updated successfully, but these errors were encountered: