Internal server error on IP address delete request #3013

Closed
opened 2025-12-29 18:24:45 +01:00 by adam · 3 comments
Owner

Originally created by @ajknv on GitHub (Nov 13, 2019).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.6.6

Steps to Reproduce

  1. Start with a device that currently has IP addresses configured on one or more interfaces.
  2. Update the device to be at a different site: PATCH request with a different site id.
  3. Attempt to delete one of the IP addresses associated to an interface on the device.

(The exact sequence of actions when this error was observed also included "de-racking" the device, but that is not suspected to be germane to the issue.)

Expected Behavior

The IP address should be deleted.

Observed Behavior

<html lang="en">
<head>
   <title>Server Error</title>
   <link rel="stylesheet" href="/static/bootstrap-3.4.1-dist/css/bootstrap.min.css">
   <link rel="stylesheet" href="/static/font-awesome-4.7.0/css/font-awesome.min.css">
   <meta charset="UTF-8">
</head>
<body>
   <div class="container-fluid">
       <div class="row">
           <div class="col-md-6 col-md-offset-3">
               <div class="panel panel-danger" style="margin-top: 200px">
                   <div class="panel-heading">
                       <strong>
                           <i class="fa fa-warning"></i>
                           Server Error
                       </strong>
                   </div>
                   <div class="panel-body">
                           <p>
                               There was a problem with your request. Please contact an administrator.
                           </p>
                       <hr />
                       <p>
                           The complete exception is provided below:
                       </p>
<pre><strong>&lt;class &#39;ValueError&#39;&gt;</strong><br />
Cannot assign &quot;&lt;SimpleLazyObject: &lt;django.contrib.auth.models.AnonymousUser object at 0x7f4e93d57050&gt;&gt;&quot;: &quot;ObjectChange.user&quot; must be a &quot;User&quot; instance.</pre>
                       <p>
                           If further assistance is required, please post to the <a href="https://groups.google.com/forum/#!forum/netbox-discuss">NetBox mailing list</a>.
                       </p>
                       <div class="text-right">
                           <a href="/" class="btn btn-primary">Home Page</a>
                       </div>
                   </div>
               </div>
</div>
       </div>
   </div>
</body>
</html>```
Originally created by @ajknv on GitHub (Nov 13, 2019). ### Environment * Python version: 3.6.8 * NetBox version: 2.6.6 ### Steps to Reproduce 1. Start with a device that currently has IP addresses configured on one or more interfaces. 2. Update the device to be at a different site: PATCH request with a different site id. 3. Attempt to delete one of the IP addresses associated to an interface on the device. (The exact sequence of actions when this error was observed also included "de-racking" the device, but that is not suspected to be germane to the issue.) ### Expected Behavior The IP address should be deleted. ### Observed Behavior ```<!DOCTYPE html> <html lang="en"> <head> <title>Server Error</title> <link rel="stylesheet" href="/static/bootstrap-3.4.1-dist/css/bootstrap.min.css"> <link rel="stylesheet" href="/static/font-awesome-4.7.0/css/font-awesome.min.css"> <meta charset="UTF-8"> </head> <body> <div class="container-fluid"> <div class="row"> <div class="col-md-6 col-md-offset-3"> <div class="panel panel-danger" style="margin-top: 200px"> <div class="panel-heading"> <strong> <i class="fa fa-warning"></i> Server Error </strong> </div> <div class="panel-body"> <p> There was a problem with your request. Please contact an administrator. </p> <hr /> <p> The complete exception is provided below: </p> <pre><strong>&lt;class &#39;ValueError&#39;&gt;</strong><br /> Cannot assign &quot;&lt;SimpleLazyObject: &lt;django.contrib.auth.models.AnonymousUser object at 0x7f4e93d57050&gt;&gt;&quot;: &quot;ObjectChange.user&quot; must be a &quot;User&quot; instance.</pre> <p> If further assistance is required, please post to the <a href="https://groups.google.com/forum/#!forum/netbox-discuss">NetBox mailing list</a>. </p> <div class="text-right"> <a href="/" class="btn btn-primary">Home Page</a> </div> </div> </div> </div> </div> </div> </body> </html>```
adam added the status: duplicate label 2025-12-29 18:24:45 +01:00
adam closed this issue 2025-12-29 18:24:45 +01:00
Author
Owner

@DanSheps commented on GitHub (Nov 14, 2019):

Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided here. For general discussion, questions, or assistance with installation issues, please post to our mailing list instead.

@DanSheps commented on GitHub (Nov 14, 2019): Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using one of the templates provided [here](https://github.com/digitalocean/netbox/issues/new/choose). For general discussion, questions, or assistance with installation issues, please post to our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss) instead.
Author
Owner

@ajknv commented on GitHub (Nov 14, 2019):

What? I'm reporting a reproducible sequence of actions that causes Netbox to return an HTTP 500 response to a reasonable API request. Barring additional rationale it shouldn't even be an error response, but if that is the contention then surely it should at least be returning a gracefully handled error response?

@ajknv commented on GitHub (Nov 14, 2019): What? I'm reporting a reproducible sequence of actions that causes Netbox to return an HTTP 500 response to a reasonable API request. Barring additional rationale it shouldn't even be an error response, but if that is the contention then surely it should at least be returning a gracefully handled error response?
Author
Owner

@DanSheps commented on GitHub (Nov 14, 2019):

Duplicate #3622

@DanSheps commented on GitHub (Nov 14, 2019): Duplicate #3622
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3013