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

Pod does not show logs for Nginx launch. #94

Open
chainhead opened this issue Sep 26, 2019 · 4 comments
Open

Pod does not show logs for Nginx launch. #94

chainhead opened this issue Sep 26, 2019 · 4 comments

Comments

@chainhead
Copy link

I have a simple nginx.conf at the root of my git repository. I want to launch Nginx in a pod with this command: oc new-app registry.access.redhat.com/rhscl/nginx-114-rhel7~https://github.com/user/repo.git

The build and deployment configuration seem to have gone fine. However, the pod does not show any log output at all! How do I verify if the launch is successful or not?

nginx.conf

events { }

http {
    log_format main '$time_iso8601 - $remote_addr - "$http_user_agent" - "$request" - $request_id '
    '- $status - $body_bytes_sent - $request_time ';

    upstream registry {
        least_conn;
        server localhost:3000;
    }

    server {
        location / {
            proxy_set_header X-Nginx-Header $request_id;
            proxy_pass http://registry/;
        }
    }
}
@notroj
Copy link
Contributor

notroj commented Sep 26, 2019

Hum, I think you should get access & error logging by default. Can you try adding something like the below to your nginx.conf? Does the build log show any errors?

error_log /var/log/nginx/error.log;

@Xendar
Copy link

Xendar commented Mar 10, 2021

I have the same issue, except that I do not have a special conf file, my image contains only an HTML page and some images:

FROM registry.access.redhat.com/rhel8/nginx-118:1

COPY build/docs/asciidoc/ ./

# Run script uses standard ways to run the application
CMD nginx -g "daemon off;"

And the pod logs in OpenShift stays empty

@josnin
Copy link

josnin commented Apr 3, 2022

Same here

@phracek
Copy link
Member

phracek commented Apr 18, 2024

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

No branches or pull requests

5 participants