Proxy DHCP Reservation: 500 Internal Server Error

  1. 11 months ago
    Edited 11 months ago by chen

    In my C/D v1.3.0 installation (upgraded from v1.2.1) on Ubuntu 16..04, when I got to Computers > View a computer at the URL:
    http://${CLONEDEPLOY_HOST}/clonedeploy/views/computers/proxy.aspx?computerid=6

    When I clock the Proxy DHCP Reservation I get a 500 Internal Server Error

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

    More information about this error may be available in the server error log.
    Apache/2.4.18 (Ubuntu) Server at ${CLONEDEPLOY_HOST} Port 80

    My error.log file is attached

    So for some reason the frontend on Mono doesn't like when the api responds with null, even though it is correctly accounted for. In this case the computer doesn't have an existing proxy entry, so the api returns null. I have no idea why this crashes mono but works fine on Windows. I changed the api to return a new object instead of null which should fix the issue, but I'm worried how many others are being affected by this. Here is the fix.
    http://docs.clonedeploy.org/files/1302/CloneDeploy-App.dll

    Overwrite the existing file in your api/bin folder

  2. clonedeploy

    24 Oct 2017 Administrator

    Does this happen for all computers or only one's that were there before the upgrade?

    Can you upgrade mono to the latest version? It looks like you are on 4.something, the latest is 5.

  3. I am using the stock mono that comes with Ubuntu 16.04

    $ mono --version
    Mono JIT compiler version 5.4.0.201 (tarball Fri Oct 13 21:51:45 UTC 2017)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
            TLS:           __thread
            SIGSEGV:       altstack
            Notifications: epoll
            Architecture:  amd64
            Disabled:      none
            Misc:          softdebug 
            LLVM:          supported, not enabled.
            GC:            sgen (concurrent by default)

    All my hosts were defined in v1.2.1 (and I ported the database over to v1.3.0)
    I also have the old v1.2.1 running (the new host is a clone of the old one, upgraded) and in the old one I don't see this error.

    Should I delete my old computer entry and re-create it (with the same data)?

  4. clonedeploy

    24 Oct 2017 Administrator

    Just create a fake computer with fake mac for now and see if it works.

  5. Yes it crashes also with the fake computer entry.

  6. clonedeploy

    24 Oct 2017 Administrator

    Is there anything in the clonedeploy logs, application or frontend?

    Try clearing the mono cache.
    Stop apache
    remove all files in /tmp
    Restart apache

  7. clonedeploy

    24 Oct 2017 Administrator

    I was able to replicate this. It's an issue with mono. Works fine on Windows. I'll see what I can find out.

  8. Just for posterity: I tried to stop apache2, clear /tmp and restart apache2 -- got the same results.

    I didn't know what logs should I look at, but if you need any other information I will do my best to post it here.

    Thanks.

  9. clonedeploy

    25 Oct 2017 Administrator Answer

    So for some reason the frontend on Mono doesn't like when the api responds with null, even though it is correctly accounted for. In this case the computer doesn't have an existing proxy entry, so the api returns null. I have no idea why this crashes mono but works fine on Windows. I changed the api to return a new object instead of null which should fix the issue, but I'm worried how many others are being affected by this. Here is the fix.
    http://docs.clonedeploy.org/files/1302/CloneDeploy-App.dll

    Overwrite the existing file in your api/bin folder

  10. That fixed it. Thanks.

    Will post in this thread in case I will find similar behavior elsewhere.

 

or Sign Up to reply!