CESNET / netopeer2

NETCONF toolset
BSD 3-Clause "New" or "Revised" License
300 stars 189 forks source link

server is not running #1534

Open codebindeee opened 7 months ago

codebindeee commented 7 months ago

rpc subsrciption error failure like that how to solve it

codebindeee commented 7 months ago

root@22:~/NetConfServer/netopeer2/build# netopeer2-server -d -v3

[INF]: SR: Connection 77 created.

[INF]: SR: Session 391 (user "root", CID 77) created.

[ERR]: SR: RPC subscription for "/ietf-netconf:get-config" with priority 0 already exists.

[ERR]: NP: Subscribing for "/ietf-netconf:get-config" RPC failed (Invalid argument).

[ERR]: NP: Server RPC subscribe failed.

[INF]: NP: Server terminated.

michalvasko commented 7 months ago

It means the server is already running, most likely without -d so it is a daemon process only. Terminate it using any task manager (top/htop) first, there can only be a single instance of the server running.

codebindeee commented 7 months ago

root@22:~# systemctl status netopeer2.service

× netopeer2.service - server for implementing network configuration management

     Loaded: loaded (/lib/systemd/system/netopeer2.service; disabled; vendor pr>
     Active: failed (Result: exit-code) since Thu 2024-02-08 09:59:11 IST; 14mi>
   Main PID: 3643 (code=exited, status=1/FAILURE)
        CPU: 24ms

Feb 08 09:59:11 22 systemd[1]: netopeer2.service: Scheduled restart job, restar>
Feb 08 09:59:11 22 systemd[1]: Stopped server for implementing network configur>
Feb 08 09:59:11 22 systemd[1]: netopeer2.service: Start request repeated too qu>
Feb 08 09:59:11 22 systemd[1]: netopeer2.service: Failed with result 'exit-code>
Feb 08 09:59:11 22 systemd[1]: Failed to start server for implementing network >
root@22:~# netopeer2-server -v3

still it is showin like that what can i do please help me

michalvasko commented 7 months ago

The server may still be running outside systemd services so like I said, check that first using a task/process manager.

codebindeee commented 7 months ago

its not running in task manager could you please help me to clear the error

michalvasko commented 7 months ago

The systemd output is truncated and nothing relevant can be seen so I cannot help you with that. The first error is caused by another netopeer2-server instance either running or leaving leftover files after incorrect termination. The latter case should not be a problem with a reasonably recent sysrepo versions, what versions are you using? In any case, those files should be cleared on system restart so you can try that, too.