skip to Main Content

I’ve got problem with completing pgadmin4 installation thru sudo /usr/pgadmin4/bin/setup-web.sh command.
During this process instalator does not recognizing that Apache is running and asks me if I want to start it:

The Apache web server is not running. We can enable and start the web server for you to finish pgAdmin 4 installation. Continue (y/n)? y

Then it just spits some errors:

Too few arguments.
Error enabling . Please check the systemd logs
Too few arguments.
Error starting . Please check the systemd logs

So far I havn’t found where the logs are stored.

About my apache, I am quite sure that my server is running, because I can connect to it through browser, phpmyadmin is working properly, and service apache2 status returns * apache2 is running. By my understanding apache2 is just fancy word for httpd service, and there is no other service called simply apache.

PostgreSQL seems to work properly from command line, haven’t tested if I can connect to it yet, but this shouldn’t be the case right?

I am using

**PostgreSQL:** 12.5 (Ubuntu 12.5-0ubuntu0.20.04.1)
**Ubuntu:** Ubuntu 20.04 LTS
**Server:** Apache/2.4.41 (Ubuntu)

2

Answers


  1. I had the same issue for Debian 10 and Ubuntu 20. The /usr/pgadmin4/bin/setup-web.sh script is using ‘uname -a’ which doesn’t contain "Debian" identifier in the return string. Updating this to read /proc/version will allow APACHE to be specified as the Debian variant of apache2.

    Change:
    UNAME=$(uname -a)

    To:
    UNAME=$(cat /proc/version)

    Login or Signup to reply.
  2. I had a similar problem with Ubuntu running inside WSL 2. Managed to resolve it by modifying the /usr/pgadmin4/bin/setup-web.sh script. I moved these lines outside of the conditional:

    IS_DEBIAN=1
    APACHE=apache2
    

    This allowed the installation to progress beyond the Too few arguments. error. There was still an error however:

    System has not been booted with systemd as init system (PID 1). Can't operate.
    Error restarting apache2. Please check the systemd logs
    

    I resolved this by running:

    sudo service apache2 restart
    

    After this I tried bringing up the admin page by visiting http://127.0.0.1/pgadmin4 from the Windows host. This still didn’t work, and had to connect using the Ubuntu machine’s ip address (you can find it out via ifconfig) which finally allowed me to see the login page.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search