Junos OS

 View Only

IMPORTANT MODERATION NOTICE

This community is currently under full moderation, meaning  all posts will be reviewed before appearing in the community. Please expect a brief delay—there is no need to post multiple times. If your post is rejected, you'll receive an email outlining the reason(s). We've implemented full moderation to control spam. Thank you for your patience and participation.



Junos REST API Failed to open session to execute RPC

  • 1.  Junos REST API Failed to open session to execute RPC

    Posted 05-23-2022 11:46
    I'm trying to start using Junos OS REST API on my SRX 300 but whenever I try to query the RPC endpoint I always get the following error even though I'm trying to log in using an admin account. I'm unable to enable logging for lighttpd because the file system it tries to write the log to is write only. Is there some configuration I need to do in order to authorize an user to the API or should it work by just enabling the API and using any account on the device to log in? I'm assuming that the error being 401 would mean that the user is unauthorized to use the API. The build version is "JUNOS 17.4R1.16 built 2017-12-19 19:58:10 UTC". I would truly appreciate if anyone could help me on this one because I can't find any documentation regarding this behaviour and I haven't been able to find other cases of people trying to solve a similar case. Thanks in advance for any help!

    Response Headers

    date: Mon, 23 May 2022 14:49:04 GMT server: lighttpd/1.4.32 status: 401 transfer-encoding: chunked

    Response Body

    Failed to open session to execute RPC


    ------------------------------
    Matias Hamalainen
    ------------------------------