Jump to content

w_m0zart

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by w_m0zart

  1. I am sorry I did not read the first post. After searching via google, I stumbled directly upon the earlier post from user pingmanping as I found exactly the same problem. However, I solved the problem in the meantime:  The IP-address for the web interface was wrong: instead of https://127.0.0.1:8843 it should have been https://127.0.0.1:8443

     

    After changing that URL the Unifi Controller webpage was served correctly. Then, in order to configure the access points, I had to configure at the left bottom, at SETTINGS -> Controller -> CONTROLLER SETTINGS -> Controller Hostname/IP, the IP address of the Host and Enable the "Override inform host with controller hostname/IP". After that all worked smoothly.

  2. @pingmanping

     

    I get exactly the same message in my browser, when trying to open: https://127.0.0.1:8843

    UniFi Controller is starting up...
    
    Please wait a moment

    When refreshing the webpage, or trying further times, it is getting worse:

    HTTP Status 400 - Bad Request

    I am running the linuxserver/unifi-controller:LTS in docker, tried it both on a Ubuntu 16.04 LTS as a 18.04 LTS. Both have the same result. This is my installation history to this:

    ## steps to install docker and linuxserver-unifi-controller on ubuntu 16.04 LTS / 18.04 LTS
    
    # installing docker
    sudo apt-get update
    sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
    sudo apt-key fingerprint 0EBFCD88
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt-get update
    sudo apt-get install docker-ce docker-ce-cli containerd.io
    
    # fix "permission denied while trying to connect to the Docker daemon socket at unixL///var/run/docker.sock ..."
    sudo usermod -a -G docker $USER
    
    
    # installing docker-compose for processing .yml files
    # for ubuntu 16.04 LTS
    sudo curl -L "https://github.com/docker/compose/releases/download/1.18.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    # for ubuntu 18.04 LTS
    sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    
    # set permission for docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    
    # docker-compose bash completion
    sudo curl -L https://raw.githubusercontent.com/docker/compose/1.24.0/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
    
    
    # create a data volume for unifi
    cd $HOME/Backup/docker/unifi/
    mkdir data
    
    # create in the same directory a docker-compose.yml file with following contents:
    
    version: "2"
    services:
      unifi-controller:
        image: linuxserver/unifi-controller:LTS
        container_name: unifi-controller
        environment:
          - PUID=1000
          - PGID=1000
        volumes:
          - $HOME/Backup/docker/unifi/data:/config
        ports:
          - 3478:3478/udp
          - 10001:10001/udp
          - 8080:8080
          - 8081:8081
          - 8443:8443
          - 8843:8843
          - 8880:8880
          - 6789:6789
        restart: unless-stopped
    
    
    # and start the docker with command:
    docker-compose up
    
    
    
    # ergo: HTTP Status 400 - Bad Request
    # ???

     

    The next steps were originally in this post and were an assumption to partly fix web access issues, but did not help after all and can be completely left out:

     

    # fix further issues in the shell (there as user root):
    docker exec -it unifi-controller bash
    
    # while in the docker shell do apt update etc.
    apt update
    apt upgrade
    
    # install vi:
    apt install vim
    
    # make sure mongod is not confused with wrong commands. Modify /usr/bin/mongod:
    # see: https://community.ui.com/questions/Unifi-controller-on-Ubuntu-18-04/93b00b88-7542-40ba-bb0b-a80a84415e1d
    cd /usr/bin
    mv mongod mongod.bin
    
    # replace mongod with following three lines, using vi:
    
    #!/bin/bash
    cleaned_args=$(echo $* | sed -e 's/--nohttpinterface//')
    exec /usr/bin/mongod.bin ${cleaned_args}
    
    # then make executable:
    chmod +x mongod
    
    # now restart the docker (press ctrl+c in the other docker window, and repeat the last command)

     

    In the log files, I do not find a clue. in /usr/lib/unifi/logs/server.log it looks like it is running fine, since it is receiving an event from the access point:

    ...
    [2019-07-13 11:21:32,944] <discover> INFO  event  - [event] AP[fc:ec:da:68:68:ee] was discovered and waiting for adoption
    ...

    It looks like there is just something wrong configured with the web server. But so far I have no clue yet.

     

    I have spent already more than two days troubleshooting this, read almost everything I could find about unifi and a HTTP Status 400 - Bad Request error.

     

    Can someone help here?

     

    Addendum 1: Problem solved: click here > to find the solution. <

    Addendum 2: Moved the part above starting with: "fix further issues..." out of the main text, to clarify that these instructions have become obsolete.

     

     

    === sources ===

      * https://hub.docker.com/r/linuxserver/unifi-controller
      * https://stackoverflow.com/questions/48957195/how-to-fix-docker-got-permission-denied-issue

      * https://base64.co.za/unifi-db-server-info-db-dbserver-stopped-unifi-controller-solved/

      * https://community.ui.com/questions/Unifi-controller-on-Ubuntu-18-04/93b00b88-7542-40ba-bb0b-a80a84415e1d

×
×
  • Create New...