Error 404
HassanMSh opened this issue · 3 comments
HassanMSh commented
Hello!
I was testing your container on Kuberenets and encountered the following error:
{
"duration": 0.000152593,
"level": "error",
"logger": "http.log.access.log0",
"msg": "handled request",
"request": {
"headers": {
"Accept": [
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
],
"Accept-Encoding": [
"gzip, deflate, br"
],
"Accept-Language": [
"en-US,en;q=0.9"
],
"Cache-Control": [
"no-cache"
],
"Pragma": [
"no-cache"
],
"Sec-Ch-Ua": [
"\"Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"115\", \"Chromium\";v=\"115\""
],
"Sec-Ch-Ua-Mobile": [
"?0"
],
"Sec-Ch-Ua-Platform": [
"\"Windows\""
],
"Sec-Fetch-Dest": [
"document"
],
"Sec-Fetch-Mode": [
"navigate"
],
"Sec-Fetch-Site": [
"none"
],
"Sec-Fetch-User": [
"?1"
],
"Upgrade-Insecure-Requests": [
"1"
],
"User-Agent": [
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
],
"X-Forwarded-For": [
"10.2.1.1"
],
"X-Forwarded-Host": [
"hoppscotch.example.com"
],
"X-Forwarded-Port": [
"443"
],
"X-Forwarded-Proto": [
"https"
],
"X-Forwarded-Scheme": [
"https"
],
"X-Real-Ip": [
"10.2.1.1"
],
"X-Request-Id": [
"656595119e7e69ecd2261829b3add29e"
],
"X-Scheme": [
"https"
]
},
"host": "hoppscotch.example.com",
"method": "GET",
"proto": "HTTP/1.1",
"remote_ip": "10.2.3.204",
"remote_port": "56808",
"uri": "/"
},
"resp_headers": {
"Server": [
"Caddy"
]
},
"size": 0,
"status": 404,
"ts": 1692188348.7542448,
"user_id": ""
}
My env variables are the following:
MODE: team
ENABLE_ADMIN: true
DOMAIN: hoppscotch.example.com
SCHEMA: https
EXTENSIONS_ENABLED: true
SMTP_PROTOCOL: smtps
SMTP_DOMAIN: example.com
SMTP_PORT: 587
SMTP_USER: example@example.com
SMTP_PASSWORD: *********
POSTGRES_HOST: db.x
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
POSTGRES_PASSWORD: xxxx
DATABASE_URL: postgresql://postgres:xxxx@db.x:5432/hoppscotch
JWT_SECRET: xxxxx
SESSION_SECRET: xxxxxxx
WHITELISTED_ORIGINS: *
GOOGLE_CLIENT_ID: xxxxx.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET: xxxxx
MAILER_ADDRESS_FROM: '"xxxx" <example@example.com>'
MAILER_SMTP_URL: smtps://exampl@v.com:xxxxxxxxx@smtp.domain.com
My ingress have the following config:
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hoppscotch
namespace: x
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-staging
nginx.ingress.kubernetes.io/large_client_header_buffers: "200m"
nginx.ingress.kubernetes.io/proxy-body-size: "200m"
nginx.ingress.kubernetes.io/enable-cors: "true"
# disable httponly cookie
nginx.ingress.kubernetes.io/http-only-cookies: "false"
nginx.ingress.kubernetes.io/http-secure: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
labels:
app: hopps-app
traffic-type: external
cert-manager.io/cluster-issuer: letsencrypt-staging
kubernetes.io/ingress.class: nginx
spec:
tls:
- hosts:
- hoppscotch.example.com
secretName: hoppscotch-tls
rules:
- host: hoppscotch.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: hopps-app
port:
number: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hopps-app
namespace: x
labels:
app: hopps-app
spec:
replicas: 1
selector:
matchLabels:
app: hopps-app
template:
metadata:
labels:
app: hopps-app
spec:
containers:
- name: hopps-app
image: webysther/hoppscotch:latest
imagePullPolicy: Always
ports:
- containerPort: 80
hostPort: 80
protocol: TCP
envFrom:
- configMapRef:
name: hopps-configmap
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "500m"
---
# Admin Service
apiVersion: v1
kind: Service
metadata:
labels:
app: hopps-app
name: hopps-app
namespace: x
spec:
ports:
- name: app
port: 80
protocol: TCP
targetPort: 80
selector:
app: hopps-app
type: ClusterIP
Do you have any idea of what might be the cause to this issue?
Thank you in advance!
webysther commented
I don't used my image on k8s but will be helpfull if you include the output log, any chance to add? First of all try the image with the minimal configuration and tell if works.
MiV1N commented
webysther commented
@HassanMSh with a better look in the chart, looks like you need to adjust memory to 4GB at least, the project works with less than <512MB but for build needs at least 4GB, try change this and put the logs too.