FlowFuse / docker-compose

Docker Compose file to run FlowForge
Apache License 2.0
15 stars 19 forks source link

Nodered Project not starting (shows as installing) #68

Closed blueoceans2002 closed 1 year ago

blueoceans2002 commented 1 year ago

Hi, I have setup the app on aws EC2 and domain . Interestingly when I create a project it shows as starting or installing. I even bumped the server to large instance but no luck

I have attached the screenshot, any help in how to get this working will be highly appreciated

805CBF07-ADCE-4002-B4E4-3E0566BF954C

6B79B706-5B70-44B7-AF55-8BA680739B9B

thanks Satish

hardillb commented 1 year ago

How lond did you leave the project when in "installing" state and what was shown on the logs tab?

blueoceans2002 commented 1 year ago

Hi @hardillb This is what I see on each Projects log tab. The projects were created 5 hrs ago image

image

hardillb commented 1 year ago

Please show you stack settings

blueoceans2002 commented 1 year ago

@hardillb please find attached 3B5517F3-A319-4692-B771-B915047A4AA3

awan1995 commented 1 year ago

@hardillb

Screenshot 2022-12-18 at 14 06 47

our app is being stuck at installing in i have check the logs in depth in there i got this error when i start or restart the project

hardillb commented 1 year ago

@awan1995 is this the same instance as @blueoceans2002 is talking about?

awan1995 commented 1 year ago

@blueoceans2002 Yes we both are working together

hardillb commented 1 year ago

I need details of your DNS setup and any entries you have put in the host machines /etc/hosts file

Nothing should be mapped to the 127.0.0.1 address

hardillb commented 1 year ago

I also still need to know what versions of FlowForge you are running

awan1995 commented 1 year ago

@hardillb okay sure let me send you

awan1995 commented 1 year ago
Screenshot 2022-12-18 at 14 16 40
awan1995 commented 1 year ago

@hardillb i have attached screenshot

hardillb commented 1 year ago

And the rest of the DNS information for stellardock.com. Have you set up the wildcard domain mapping as required in the documentation?

awan1995 commented 1 year ago

@hardillb yes i have added A Name Record for app subdomain and also generated a wildcard *.domain.com and added it to certs with default.crt and default.key as well

hardillb commented 1 year ago

Are you sure?

app.stellardock.com resolves to 3.26.34.182

But

long-citril-finch-9469.stellardock.com does not resolve to anything, it should resolve to the same IP address as the the front end.

awan1995 commented 1 year ago

@hardillb yes for the one i have added it in the DNS https://amused-lanceolated-warbler-9081.stellardock.com/

hardillb commented 1 year ago

You should not be manually adding entries to the DNS.

If you've set the wild card up properly it should match anything before the stellardock.com e.g. foo.stellardock.com

awan1995 commented 1 year ago

@hardillb Okay sure i can add that wildcard

awan1995 commented 1 year ago

@hardillb but i think atleast it should be working on https://amused-lanceolated-warbler-9081.stellardock.com/ em i right?

hardillb commented 1 year ago

Also Please answer the versions question I've asked multiple times now

awan1995 commented 1 year ago

@hardillb oh sorry for that i didn't see above version comment it v1.1.2 screenshot is also attached. Thanks

Screenshot 2022-12-18 at 14 30 35
hardillb commented 1 year ago

OK, I've just tried a fresh clean 1.1.2 install here and I'm not having a problem.

Please supply all of the following:

Also did you use the build-containers.sh or pull the pre-built images from docker hub?

awan1995 commented 1 year ago

@hardillb docker-compose.yml https://drive.google.com/file/d/1TDdAYNMWE7c0B_1SXTC1r0vCncNgKdkC/view?usp=sharing

flowforge.yml https://drive.google.com/file/d/1dXATRUy8mjzv6MAbano5ozMPikoDmNvb/view?usp=sharing

8GB RAM AWS t3.large vCPUs 2 8gb HDD from 30% is free

i think some problem is with this api_url :// forge:3000 when i change the value of forge it's not working now it is being installed but one more error it is giving which below one

Screenshot 2022-12-18 at 16 38 10 Screenshot 2022-12-18 at 16 38 30
hardillb commented 1 year ago

Please include the files in the update, not link to external sites, it makes reading them much harder than it needs to be.

You should never have changed the api_url (no where in the documentation does it say to change that value). If you have changed it, change it back to http://forge:3000 and restart the whole docker-compose deployment.

awan1995 commented 1 year ago

docker-compose.yml.txt flowforge.yml.txt

@hardillb i have attached it as a .txt because github isnot allowing me to attach .yml file

hardillb commented 1 year ago

I meant to inline them in code blocks. but leave it for now.

If you are getting to the point where you are trying to log in then it appears the installing/starting problem has passed?

Having the wrong api_url entry will stop the containers from starting because the launcher in the project container will not be able to find the forge app to download it's settings and the project will not be able to authenticate or store flows.

awan1995 commented 1 year ago

@hardillb okay problem has been passed but we we need to use forge.stellardock.com like with forge on the start or we can use any subdomain as the base_url like app.stellardock.com

awan1995 commented 1 year ago

@hardillb Thanks for the help i have created a clean project but still i'm getting access token failed error don't know what to change nothing this time in it only change example with stelllardock but access token failed is coming if you know any thing about please let me know thanks

hardillb commented 1 year ago

base_url points to the forge app, it does not need to be on the same domain as the projects which will be hosted on the value of domain. But both hostname in base_url and the wildcard DNS entry for domain must both resolve to the same IP address which is the box the docker instance is running on as they both need to be proxied by the same nginx instance.

e.g. base_name can be https://forge.example.com and domain could be projects.example.com or projects.com. Just as long as they all resolve to the same address.

api_url should always be http://forge:3000 on the docker-compose based systems.

If you have changed any of the api_url, base_url or domain you should do the following steps:

  1. delete all the projects
  2. stop the system (docker-compose -p flowforge down)
  3. delete the db directory (probably need sudo to do this as the files will be owned by the postgres user)
  4. restart the system (docker-compose -p flowforge up -d)

Before trying to do anything else.

If you still have authentication failures you need to look at both the project logs and the browser logs.

hardillb commented 1 year ago

One other thing I've just noticed (sorry it was in the opening screen shot and I missed it), you created a project with the same name as you used for the base_name e.g. "app". If you are using the same domain for both the base_name and projects they will clash and break things.

awan1995 commented 1 year ago

@hardillb yes that i just do for testing purpose same domain path have clash in them anyhow that project is now installing sucessfully but when i open the code editor for a project it says failed to get access token. i tried your all above mention ways even created a project from scratch but that access error is not going

Screenshot 2022-12-18 at 22 59 55 Screenshot 2022-12-18 at 23 01 07
awan1995 commented 1 year ago

@hardillb app is unable to get the access the access token.

hardillb commented 1 year ago

Show the logs from the project at the same time

And your current flowforge.yml file

awan1995 commented 1 year ago

@hardillb how i can see the projects logs?

hardillb commented 1 year ago

From the forge app

awan1995 commented 1 year ago
port: 3000
host: 0.0.0.0
domain: stellardock.com
base_url: http://forge.stellardock.com
api_url: http://forge:3000

#################################################
# Database Configuration                        #
#################################################

db:
  logging: false
  ## The database type: sqlite|postgres
  type: postgres
  ### SQLite options

  ## The database filename. Relative to $FLOWFORGE_HOME/var/
  ## Set to ':memory:' for a database that is wiped on restart
  # storage: forge.db

  ### Postgres options

  host: postgres
  user: root
  password: secret

#################################################
# Project Driver Configuration                  #
#################################################

driver:
  ## The type of backend driver to use
  ##  Can be: localfs/docker/stub/k8s
  type: docker

  options:
    ## Options to be passed to the driver

    ### LocalFS options

    ## The first port number to assign to projects
    # start_port: 7880

    ## Path to find node executable if not on the default path
    # node_path: /usr/bin/node

    ### Docker options

    ## Docker socket path
    socket: /tmp/docker.sock
    # registry: hub.flowforge.com

    ### K8S options

    ## Kubectl conf file to contact the cluster
    # config_file: /opt/share/projects/flowforge/test/config
    # regsitry: hub.flowforge.com

#################################################
# Email Configuration                           #
#################################################

email:
  enabled: false
  debug: false
  smtp:
    host: localhost
    port: 587
    secure: false
    #auth:
    #    user: username
    #    pass: password
awan1995 commented 1 year ago

@hardillb flowforge.yml is attached above

awan1995 commented 1 year ago

@hardillb Logs of the flowforge

Screenshot 2022-12-18 at 23 37 28
hardillb commented 1 year ago

No, the logs tab for the project, in the web app

awan1995 commented 1 year ago

@hardillb I think some problem with the credentials

Screenshot 2022-12-18 at 23 54 24
awan1995 commented 1 year ago

@hardillb if encrypted credentials is the issue i have all the pem files in the certs folder

awan1995 commented 1 year ago
Screenshot 2022-12-18 at 23 57 10
hardillb commented 1 year ago

Delete the project, then change

base_url: http://forge.stellardock.com

To

base_url: https://forge.stellardock.com

And restart

awan1995 commented 1 year ago

@hardillb Okay

awan1995 commented 1 year ago

@hardillb i have done that but now it is stuck in starting

Screenshot 2022-12-19 at 00 03 24 Screenshot 2022-12-19 at 00 04 02
awan1995 commented 1 year ago

@hardillb it is running now but now new error is showing

Screenshot 2022-12-19 at 00 06 26
hardillb commented 1 year ago

You need to use the fullchain.pem for the stelardock.com.crt not the cert.pem

awan1995 commented 1 year ago

@hardillb Okay

awan1995 commented 1 year ago

@hardillb Thanks alot my app is working now <3

blueoceans2002 commented 1 year ago

Hi @hardillb Big thanks for all the help.

Interestingly I have a waning in Manage Palette image

@awan1995 fyi