Forum Discussion

sprusty's avatar
sprusty
Icon for Neophyte rankNeophyte
2 years ago

Groovy script failing for alinux server

We have a groovy script which is working fine for a data source. However when we are trying to run the same in debug mode, it’s failing. Can someone help on this.
  • Kirby_Narine's avatar
    2 years ago

    If it’s working via datasource test, but not in debug (!groovy), can you make sure the hostprops are being populated correctly via debug? Consider manually entering them in the script as you run it via !groovy:

    host = "HOSTNAME"

    user = "SSHUSERHERE"

    pass = "SSHPASSHERE"

    port = hostProps.get("ssh.port")?.toInteger() ?: 22

    cert = hostProps.get("ssh.cert") ?: '~/.ssh/id_rsa'

    Note: For hostname, make sure to use the same value under INFO tab of device for system.hostname.

    If still failing, definitely create a support ticket, as it can be tested more in-depth from LM support side.