400 Bad Request Request Header Or Cookie Too Large nginx/1.6.2

  • Hi,


    Today my OMV stopped working with a unknown reason.
    This error message is showed on the OMW management page:
    400 Bad RequestRequest Header Or Cookie Too Large
    nginx/1.6.2


    So I tried to remove NGINX and reinstall OpenMediaVault with the hope this was getting solved, but it didn't
    - apt-get remove nginx
    - apt-get autoremove
    - apt-get install openmediavault


    A restart of the system also didn't solve the issue.


    Can someone give me some advice to bring it back up as before? It doesn't matter if I have to do some reconfigurations or reinstall plugins, as long as I didn't lose any data of my RAID drive (Directory: /media/...... )


    Thanks!

    • Offizieller Beitrag

    Clear your browser cache. I have seen this problem quite a few times with Chrome but hardly ever with Firefox.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I tried some browsers, Internet Explorer, Opera and Firefox.
    The result in those is difference between the "normal" mode and the private mode:

    • Normal mode:
      400 Bad Request
      Request Header Or Cookie Too Large
    • Private mode:
      Welcome to nginx!
      If you see this page, the nginx web server is successfully installed and
      working. Further configuration is required.
      For online documentation and support please refer to nginx.org.
      Commercial support is available at nginx.com.
      Thank you for using nginx.


    Also tried a Ctrl + F5 to clear the browser cache, this still remain in the error scenarios above.

    • Offizieller Beitrag

    The private mode message is your answer. The OMV nginx config has not been written.


    omv-mkconf nginx
    omv-mkconf php5fpm
    service apache2 stop
    service php5-fpm restart
    update-rc.d -f apache2 remove
    service nginx restart

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    omv-firstaid won't write the config files though.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thanks for your fast answer.


    Code
    root@openmediavault:~# omv-mkconf nginx
    root@openmediavault:~# omv-mkconf php5fpm
    root@openmediavault:~# service apache2 stop
    Stopping web server: apache2.
    root@openmediavault:~# service php5-fpm restart
    Restarting PHP5 FastCGI Process Manager: php5-fpm.
    root@openmediavault:~# update-rc.d -f apache2 remove
    update-rc.d: using dependency based boot sequencing
    root@openmediavault:~# service nginx restart
    Restarting nginx: nginx.


    Returned still in the same error message. I removed all the local cache in Firefox manually but didn't help. Also tried a reboot of OMV.
    apt-get -f install - didn't find anything to install.


    Update:
    omv-firstaid - didn't help.

  • root@openmediavault:~# ls -la /etc/nginx/sites-enabled
    totaal 12
    drwxr-xr-x 2 root root 4096 sep 19 19:35 .
    drwxr-xr-x 6 root root 4096 okt 20 16:46 ..
    -rw-r--r-- 1 root root 2382 sep 19 19:35 openmediavault-owncloud
    lrwxrwxrwx 1 root root 40 sep 16 21:49 openmediavault-webgui -> ../sites-available/openmediavault-webgui


    root@openmediavault:~# ls -la /etc/nginx/sites-available
    totaal 16
    drwxr-xr-x 2 root root 4096 sep 20 11:15 .
    drwxr-xr-x 6 root root 4096 okt 20 16:46 ..
    -rw-r--r-- 1 root root 2765 nov 20 2013 default
    -rw-r--r-- 1 root root 879 okt 20 17:37 openmediavault-webgui

    • Offizieller Beitrag

    Did you reboot?

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Yes, I did a reboot.


    The "normal" firefox tab displayed now also the Welcome to NGINX message so the cookie clearing seems to be performed.
    I also tried to open the OMV webpage at my mobile phone, which also resulted in the Welcome to NGINX message.


    Can I provide you some additional log files?

    • Offizieller Beitrag

    If you have omv-extras installed, omv-mkconf omvextrasorg sendsupport and tell me the ID.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • omv-extras wasn't installed anymore due the reinstall of openmediavault. I just tried to reinstall it with apt-get install openmediavault-omvextrasorg. This went fine.


    root@openmediavault:/var/log/apache2# omv-mkconf omvextrasorg sendsupport ATTENTION - Your system info will be provided to the OpenMediaVault forum moderators - forums.openmediavault.org.
    your log ID is: lIEGaSfh, please refer to this log ID in your posts.


    If you would like to get SSH acces to the machine, please let me know. I have a VM where you can logon and connect with SSH to the OMV server.

    • Offizieller Beitrag

    Try and remove owncloud apt-get purge openmediavault-owncloud. If the file for owncloud in sites-enabled folder doesn't go away after purge, then delete it manually.


    edit1: I forgot and then restart nginx service nginx restart
    edit2: Your nginx version seems odd (1.6.2). Do you recall anything regarding that?

    • Offizieller Beitrag

    rm /etc/apt/sources.list.d/nginx.list
    rm /etc/apt/sources.list.d/openmediavault-millers.list
    rm /etc/apt/sources.list.d/plexmediaserver.list
    omv-update

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Try and remove owncloud apt-get purge openmediavault-owncloud. If the file for owncloud in sites-enabled folder doesn't go away after purge, then delete it manually.


    edit1: I forgot and then restart nginx service nginx restart
    edit2: Your nginx version seems odd (1.6.2). Do you recall anything regarding that?


    The owncloud site is succesfully removed in sites-enabled. I just remember me something about a issue with nginx some weeks ago which was caused by an upgrade. This issue was solved by the apt-get install -f option. Maybe it's related to this issue. Is this the wrong version number or what's wrong with the 1.6.2 version?



    rm /etc/apt/sources.list.d/nginx.list
    rm /etc/apt/sources.list.d/openmediavault-millers.list
    rm /etc/apt/sources.list.d/plexmediaserver.list
    omv-update


    I tried this and performend a reboot afterwards. But didn't get any results....


    Just thinking:
    If there 's something wrong with the OS itself, can I just reinstall the complete OS but keep my RAID en media settings? Or perform a configuration export (like the Samba shares) to import in the new OS.

  • The downgrade went fine (in my opinion):

    Code
    dpkg: warning: downgrading nginx from 1.6.2-1~wheezy to 1.2.1-2.2+wheezy3
    (Database inlezen ... 53895 files and directories currently installed.)
    Voorbereiden om nginx 1.6.2-1~wheezy te vervangen (door .../nginx_1.2.1-2.2+wheezy3_all.deb) ...
    Uitpakken van vervangende nginx ...
    dpkg: warning: unable to delete old directory '/var/log/nginx': Map is niet leeg
    dpkg: warning: unable to delete old directory '/var/cache/nginx': Map is niet leeg
    Instellen van nginx (1.2.1-2.2+wheezy3) ...
    Creating index of upgradeable packages ...
    Creating index of OpenMediaVault plugins ...


    Map is niet leeg = Directory is not empty



    After the installation I entered the configuration command, as delivered by ryecoaaron:

    omv-mkconf nginx
    omv-mkconf php5fpm
    service apache2 stop
    service php5-fpm restart
    update-rc.d -f apache2 remove
    service nginx restart


    The Welcome to NGINX message disappeared, but now I received the This webpage couldn't be found message of the browser itself. Tried to delete cache as well the cookies, but didn't result in the OMV webpage. So I tried a reboot.
    After the reboot, I still get the This webpage couldn't be found message, so I tried the other command.


    omv-firstaid the second option to reconfigure the webUI


    This resulted in a error message, so hopefully this give some input in the error cause:

    Code
    root@openmediavault:/usr/bin# omv-firstaid
    Updating web administration settings. Please wait ...
    {"response":null,"error":{"code":4000,"message":"Failed to execute command 'nginx -t 2>&1': sh: 1: nginx: not found","trace":"exception 'OMVException' with message 'Failed to execute command 'nginx -t 2>&1': sh: 1: nginx: not found' in \/usr\/share\/openmediavault\/engined\/module\/webserver.inc:41\nStack trace:\n#0 \/usr\/share\/openmediavault\/engined\/rpc\/config.inc(180): OMVModuleNginxAbstract->applyConfig()\n#1 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)\n#2 \/usr\/share\/php\/openmediavault\/rpcservice.inc(125): call_user_func_array(Array, Array)\n#3 \/usr\/share\/php\/openmediavault\/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)\n#4 \/usr\/sbin\/omv-engined(501): OMVRpc::exec('Config', 'applyChanges', Array, Array, 1)\n#5 {main}"}}
    Failed to execute RPC (service=Config, method=applyChanges)


    The nginx: not found is probably the cause of my issue. Can I try a apt-get remove nginx and then reinstall nginx with apt-get install nginx/wheezy?
    apt-get remove nginx depends on the following packages:


    Not needed anymore:
    avahi-daemon beep bind9-host collectd collectd-core cron-apt gdisk ifenslave-2.6 iptables libavahi-core7 libcap-ng0 libdaemon0 libjs-extjs4 libjson-perl liblocale-po-perl libnfnetlink0 libnss-mdns libossp-uuid16 libsensors4 libsnmp-base libsnmp15 libtalloc2 libwbclient0 lvm2 monit ntfs-3g php-json-schema php5-cgi php5-pam php5-proctitle quotatool rrdtool samba samba-common samba-common-bin sdparm smartmontools snmpd socat tftpd-hpa uuid xmlstarlet


    Will be removed:
    nginx openmediavault openmediavault-omvextrasorg



    The nginx service status and nginx -v also don't output the correct information:

    Code
    root@openmediavault:/usr/bin# service nginx status
    root@openmediavault:/usr/bin# nginx -v
    -bash: nginx: opdracht niet gevonden


    opdracht niet gevonden = command not found

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!