Skip to content

Operation timed out during startup #11

Closed
@anstosa

Description

@anstosa

I'm running this container and the linuxserver/docker-mariadb container in my Kubernetes cluster. The container starts the service inside fails quickly. Full log below:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing... 

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \ 
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1000
User gid:    1000
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing... 
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing... 
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 50-config: executing... 
Advanced Mode Enabled - Syncing .env from /config to /var/www/html - if you're doing this you better read the BookStack documentation. Restart container after making changes to .env

                                                                               
  [Illuminate\Database\QueryException]                                         
  SQLSTATE[HY000] [2002] Operation timed out (SQL: select * from information_  
  schema.tables where table_schema = bookstackapp and table_name = migrations  
  )                                                                            
                                                                               

                                              
  [Doctrine\DBAL\Driver\PDOException]         
  SQLSTATE[HY000] [2002] Operation timed out  
                                              

                                              
  [PDOException]                              
  SQLSTATE[HY000] [2002] Operation timed out  
                                              

[cont-init.d] 50-config: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

I turned query logging on and confirmed that query is never reaching the mariadb instance.

Lots of files are written to the mounted /config directory so it seems like permissions are correct except there is no /config/logs/laravel.log so whatever failure is happening seems to be extremely early in the startup process

K8s master and nodes all running Ubuntu 18.04 VM in ESXI.

bootstack.yaml

apiVersion: v1                                                                   
kind: Namespace                                                                  
metadata:                                                                        
  name: bookstack                                                                
---                                                                              
apiVersion: v1                                                                   
kind: Service                                                                    
metadata:                                                                           
  labels:                                                                                                                                                                                                                                           
    app: bookstack                                                                  
  name: bookstack                                                                   
  namespace: bookstack                                                              
spec:                                                                               
  ports:                                                                            
  - name: web                                                                       
    port: 80                                                                        
    nodePort: 31015                                                                 
  selector:                                                                         
    app: bookstack                                                                  
  type: NodePort                                                                    
---                                                                                 
apiVersion: apps/v1                                                                 
kind: Deployment                                                                    
metadata:                                                                           
  name: bookstack                                                                   
  namespace: bookstack                                                              
spec:                                                                               
  selector:                                                                         
    matchLabels:                                                                    
      app: bookstack                                                                
  template:                                                                         
    metadata:                                                                       
      labels:                                                                       
        app: bookstack                                                              
      namespace: bookstack                                                       
    spec:                                                                           
      containers:                                                                   
      - env:                                                                        
        - name: ADVANCED_MODE                                                       
          value: "1"                                                                
        - name: PGID                                                                
          value: "1000"                                                             
        - name: PUID                                                                
          value: "1000"                                                             
        image: linuxserver/bookstack                                                
        name: bookstack                                                             
        ports:                                                                      
        - containerPort: 80                                                         
          name: web                                                                 
        volumeMounts:                                                               
        - mountPath: /config                                                        
          name: config                                                              
          subPath: bookstack                                                        
      terminationGracePeriodSeconds: 10                                             
      volumes:                                                                      
      - name: config                                                                
        nfs:                                                                        
          path: /storage                                                            
          server: nfs

mariadb.yaml

apiVersion: v1                                                                      
kind: Namespace                                                                     
metadata:                                                                           
  name: mariadb                                                                     
---                                                                                 
apiVersion: v1                                                                      
kind: Service                                                                       
metadata:                                                                           
  labels:                                                                           
    app: mariadb                                                                    
  name: mariadb                                                                     
  namespace: mariadb                                                                
spec:                                                                               
  ports:                                                                            
  - name: db                                                                        
    port: 3306                                                                      
    nodePort: 31014                                                                 
  selector:                                                                                                                                                                                                                                         
    app: mariadb                                                                    
  type: NodePort                                                                    
---                                                                                 
apiVersion: apps/v1                                                                 
kind: Deployment                                                                    
metadata:                                                                           
  name: mariadb                                                                     
  namespace: mariadb                                                                
spec:                                                                               
  selector:                                                                         
    matchLabels:                                                                    
      app: mariadb                                                                  
  template:                                                                         
    metadata:                                                                       
      labels:                                                                       
        app: mariadb                                                                
      namespace: mariadb                                                            
    spec:                                                                           
      containers:                                                                   
      - env:                                                                        
        - name: MYSQL_ROOT_PASSWORD                                                 
          value: "wtac,ACTB0818SQL"                                                 
        - name: PGID                                                                
          value: "1000"                                                             
        - name: PUID                                                                
          value: "1000"                                                             
        - name: TZ                                                                  
          value: "America/Los_Angeles"                                              
        image: linuxserver/mariadb                                                  
        name: mariadb                                                               
        ports:                                                                      
        - containerPort: 3306                                                       
          name: db                                                                  
        volumeMounts:                                                               
        - mountPath: /config                                                        
          name: config                                                              
          subPath: mariadb                                                          
      terminationGracePeriodSeconds: 10                                             
      volumes:                                                                      
      - name: config                                                                
        nfs:                                                                        
          path: /storage                                                            
          server: nfs                   

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions