Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

503 Service unavailable #1883

Open
rajeshwar1504 opened this issue Dec 14, 2023 · 7 comments
Open

503 Service unavailable #1883

rajeshwar1504 opened this issue Dec 14, 2023 · 7 comments

Comments

@rajeshwar1504
Copy link

I have followed the steps mentioned in CDASH documentation on Azure VM Ubunut 22.04 , But facing an issue while opening the URL in a browser.

Documentation URL - https://github.com/Kitware/CDash/blob/master/docs/install.md#php-modules

CDash Version - 3.1.0

Issue screenhot:
ErrorMesg

Configured below required software:

  1. Apach2 web server
  2. PostgreSQL version 14+238
  3. PHP 8.1.2 version and required modules
  4. npm version 8.19.4

Could you please share the suggestions/ detailed documentation to configure CDASH on ubuntu 22.04 machine?

Thanks,
Reddy

@williamjallen
Copy link
Collaborator

There are many reasons why this might be happening, and it's hard to know without having more information. Is there any information in the logs?

@rajeshwar1504
Copy link
Author

rajeshwar1504 commented Dec 18, 2023

Thank you for your response.

  1. I could see the below error message in the logs whenever i restart the Apache service.

[Mon Dec 18 00:00:23.515837 2023] [mpm_prefork:notice] [pid 500781] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.xxx.xxx.xxx. Set the 'ServerName' directive globally to suppress this message.

  1. I commented reponse.send() line in /public/index.php file , i could see below php information on web browser.

index.php file

<?php
define('LARAVEL_START', microtime(true));
require __DIR__.'/../vendor/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);
#$response->send();
phpinfo();
?>

I could see php info on browser.

ErrorMesg2

Please let me know if you need more information.

Thank you.

@williamjallen
Copy link
Collaborator

That all looks normal. Was there anything in the CDash logs (storage/logs/*)?

@rajeshwar1504
Copy link
Author

I found the below error in the storage/logs/cdash-2023-11-28.log-old file.

Database error:
[2023-11-28 15:44:49] production.ERROR: Database connection [postgres] not configured. {"exception":"[object] (InvalidArgumentException(code: 0): Database connection [postgres] not configured. at /CDash/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php:173)
[stacktrace]

I have configured the database in .env file like below , please check it once.

# database.php
DB_DATABASE=cdash_database
DB_CONNECTION=pgsql
DB_HOST=localhost
#DB_PORT=
DB_USERNAME=cdash
DB_PASSWORD=admin

Database query:

CREATE USER cdash WITH PASSWORD 'admin';
CREATE DATABASE cdash_database;
GRANT ALL PRIVILEGES ON DATABASE cdash_database TO cdash;

image

Please let me know your suggestions.

Thank you.

@williamjallen
Copy link
Collaborator

You have a configuration issue of some kind with your database. You could try setting the port: DB_PORT=5432

@rajeshwar1504
Copy link
Author

rajeshwar1504 commented Dec 20, 2023

Observed the same issue on the browser (503 service unavailable) after setting up the port DB_PORT=5432

Performed below steps to proceed further.

Step:1 Updated CDash/config/database.php file for database configuration

'default' => env('DB_CONNECTION', 'pgsql'),

'pgsql' => [
            'driver' => 'pgsql',
            'host' => env('DB_HOST', 'localhost'),
            'port' => env('DB_PORT', 5432),
            'database' => env('DB_DATABASE', 'cdash_database'),
            'username' => env('DB_USERNAME', 'cdash'),
            'password' => env('DB_PASSWORD', 'admin'),
            'charset' => 'utf8',
            'prefix' => '',
            'prefix_indexes' => true,
            'search_path' => 'public',
            'sslmode' => 'prefer',
        ],

Step-2: Updated /etc/postgresql/14/main/pg_hba.conf file with below line to accept database connections

image

restarted postgresql service - systemctl restart postgresql
restarted apache2 service - systemctl restart apache2.service

New log file is not getting generated under storage/logs/ folder to check other issues.
image

Please let me know your suggestions.

Thank you.

@rajeshwar1504
Copy link
Author

rajeshwar1504 commented Jan 8, 2024

Please suggest on the above issue?

Thanks,
Rajesh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants