Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
HHVM/Proxygen seems to be running inside my pods just fine, but cannot be accessed, even from inside the pods??
Post Body

I have a docker container running my app just fine. When I run the container locally, I'm able to connect to the container and run curl localhost which gives me my expected output.

When I deploy the container to Kubernetes, all seems to go well, but my app isn't accessible. I've been playing with services and ingress trying to figure out why I can't access my application. . . but I think something's wrong a little closer to the center as it were.

When I connect to one of my pods with kubectl exec -it <my pod> /bin/bash and run curl localhost it just hangs. HOWEVER when I run lsof -i :80 on my pod, it finds HHVM listening, just as it should.

hhvm      1 root   27u  IPv6 152606      0t0  TCP *:http (LISTEN)

I thought it might have to do with IPv6, but that turns out to be expected Kubernetes behavior. And when I run kubectl logs <mypod> it spits out all this happy HHVM output just like it should. The last three lines for example. . .

Putting JIT ProfData on Treadmill
Deleting JIT ProfData
Freeing code.prof

. . . imply HHVM is happily doing exactly what it should be doing.

I wondered if something might be wrong with my HHVM/Proxygen configs, but they're super simple. Here they are just in case someone sees something I don't:

/etc/hhvm/server.conf:

; php options

pid = /var/run/hhvm/pid

; hhvm specific 

hhvm.server.port = 80
hhvm.server.type = proxygen 
hhvm.server.allow_run_as_root = true
hhvm.server.default_document = index.php
hhvm.server.error_document404 = index.php
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc
hhvm.server.source_root=/var/www/public
hhvm.profile_hw_enable=false

; default log location is stdout/err, which is good for docker
hhvm.log.use_log_file = true

HHVM is the stock Docker image from Facebook, with my app copied into /var/www at build time.

My Kubernetes yaml follows:

apiVersion: v1
kind: Service
metadata:
  name: myprojectservice
spec:
  ports:
  - port: 80
    targetPort: 80
  selector:
    app: hhvm 
---
 apiVersion: apps/v1
 kind: Deployment 
 metadata:
   name: myproject
   labels:
     app: hhvm
 spec:
  replicas: 2 
  selector:
    matchLabels:
      app: hhvm 
  template:
    metadata:
      labels:
        app: hhvm
    spec:
      containers:
        - name: myproject
          image: meatdockerhub/myproject
          imagePullPolicy: Always
          ports:
            - containerPort: 80

Author
Account Strength
100%
Account Age
15 years
Verified Email
Yes
Verified Flair
No
Total Karma
70,349
Link Karma
11,188
Comment Karma
58,740
Profile updated: 8 hours ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago