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

404 - Not Found <Host Name> does not exist #711

Closed
1ubuntuuser opened this issue Mar 18, 2022 · 17 comments
Closed

404 - Not Found <Host Name> does not exist #711

1ubuntuuser opened this issue Mar 18, 2022 · 17 comments
Labels

Comments

@1ubuntuuser
Copy link

1ubuntuuser commented Mar 18, 2022

Description of the issue

I've been following the instructions to setup a production docker env. For some reason, no matter what overrides I use, noproxy, proxy, HTTP whenever I connect to the server I get a 404. I checked out the default.conf for nginx and couldn't see anything out of the ordinary. Any ideas?
https://github.com/frappe/frappe_docker/blob/main/docs/images-and-compose-files.md

$ curl localhost:80
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>localhost does not exist</p>
$ curl app.hidden.org
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>app.hidden.org does not exist</p>

Context information (for bug reports)

Latest version of docker and docker-compose running on ubunu.

Steps to reproduce the issue

  1. Download repo with git
    2.docker-compose -f compose.yaml -f overrides/compose.erpnext.yaml -f overrides/compose.mariadb.yaml -f overrides/compose.redis.yaml -f overrides/compose.proxy.yaml config > ~/app/erpnext/docker-compose.yml
  2. docker-compose --project-name xx -f ~/app/erpnext/docker-compose.yml up
  3. Remove extra double $$ Error in nginx config with Docker #701

Stacktrace / full error message if available

b_1             | 2022-03-17 23:45:51+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.7+maria~focal started.
db_1             | 2022-03-17 23:45:51+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_1             | 2022-03-17 23:45:51+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.7+maria~focal started.
db_1             | 2022-03-17 23:45:51+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
db_1             | 2022-03-17 23:45:51 0 [Note] mariadbd (server 10.6.7-MariaDB-1:10.6.7+maria~focal) starting as process 1 ...
db_1             | 2022-03-17 23:45:51 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db_1             | 2022-03-17 23:45:51 0 [Note] InnoDB: Number of pools: 1
db_1             | 2022-03-17 23:45:51 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
db_1             | 2022-03-17 23:45:51 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
db_1             | 2022-03-17 23:45:51 0 [Note] InnoDB: Using Linux native AIO
db_1             | 2022-03-17 23:45:51 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
db_1             | 2022-03-17 23:45:51 0 [Note] InnoDB: Completed initialization of buffer pool
db_1             | 2022-03-17 23:45:52 0 [Note] InnoDB: 128 rollback segments are active.
db_1             | 2022-03-17 23:45:52 0 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1             | 2022-03-17 23:45:52 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
db_1             | 2022-03-17 23:45:52 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
db_1             | 2022-03-17 23:45:52 0 [Note] InnoDB: 10.6.7 started; log sequence number 42791; transaction id 14
db_1             | 2022-03-17 23:45:52 0 [Note] Plugin 'FEEDBACK' is disabled.
db_1             | 2022-03-17 23:45:52 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db_1             | 2022-03-17 23:45:52 0 [Warning] You need to use --log-bin to make --expire-logs-days or --binlog-expire-logs-seconds work.
db_1             | 2022-03-17 23:45:52 0 [Note] Server socket created on IP: '0.0.0.0'.
db_1             | 2022-03-17 23:45:52 0 [Note] Server socket created on IP: '::'.
db_1             | 2022-03-17 23:45:52 0 [Note] InnoDB: Buffer pool(s) load completed at 220317 23:45:52
db_1             | 2022-03-17 23:45:52 0 [Note] mariadbd: ready for connections.
db_1             | Version: '10.6.7-MariaDB-1:10.6.7+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
frontend_1       | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
frontend_1       | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
frontend_1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/frappe-entrypoint.sh
frontend_1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
frontend_1       | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
proxy_1          | time="2022-03-17T23:45:51Z" level=info msg="Configuration loaded from flags."
redis_1          | 1:C 17 Mar 2022 23:45:51.307 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1          | 1:C 17 Mar 2022 23:45:51.307 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1          | 1:C 17 Mar 2022 23:45:51.307 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis_1          | 1:M 17 Mar 2022 23:45:51.308 * monotonic clock: POSIX clock_gettime
redis_1          | 1:M 17 Mar 2022 23:45:51.310 * Running mode=standalone, port=6379.
redis_1          | 1:M 17 Mar 2022 23:45:51.310 # Server initialized
redis_1          | 1:M 17 Mar 2022 23:45:51.310 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1          | 1:M 17 Mar 2022 23:45:51.311 * Loading RDB produced by version 6.2.6
redis_1          | 1:M 17 Mar 2022 23:45:51.311 * RDB age 59 seconds
redis_1          | 1:M 17 Mar 2022 23:45:51.311 * RDB memory usage when created 0.92 Mb
redis_1          | 1:M 17 Mar 2022 23:45:51.311 # Done loading RDB, keys loaded: 10, keys expired: 1.
redis_1          | 1:M 17 Mar 2022 23:45:51.311 * DB loaded from disk: 0.000 seconds
redis_1          | 1:M 17 Mar 2022 23:45:51.311 * Ready to accept connections
xx_configurator_1 exited with code 0
frontend_1       | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
frontend_1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
frontend_1       | 20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
frontend_1       | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
frontend_1       | /docker-entrypoint.sh: Configuration complete; ready for start up
frontend_1       | 2022/03/17 23:45:57 [notice] 1#1: using the "epoll" event method
frontend_1       | 2022/03/17 23:45:57 [notice] 1#1: nginx/1.21.6
frontend_1       | 2022/03/17 23:45:57 [notice] 1#1: built by gcc 10.3.1 20211027 (Alpine 10.3.1_git20211027) 
frontend_1       | 2022/03/17 23:45:57 [notice] 1#1: OS: Linux 5.4.0-1030-aws
frontend_1       | 2022/03/17 23:45:57 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
frontend_1       | 2022/03/17 23:45:57 [notice] 1#1: start worker processes
frontend_1       | 2022/03/17 23:45:57 [notice] 1#1: start worker process 38
frontend_1       | 2022/03/17 23:45:57 [notice] 1#1: start worker process 39
websocket_1      | listening on *: 9000
queue-short_1    | 23:46:00 Worker rq:worker:2c492b04cca9432a9fc56bc1944d6821.35e174fae001.7.short: started, version 1.8.1
queue-short_1    | 23:46:00 Subscribing to channel rq:pubsub:2c492b04cca9432a9fc56bc1944d6821.35e174fae001.7.short
queue-short_1    | 23:46:00 *** Listening on short...
backend_1        | [2022-03-17 23:46:00 +0000] [1] [INFO] Starting gunicorn 20.1.0
backend_1        | [2022-03-17 23:46:00 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
backend_1        | [2022-03-17 23:46:00 +0000] [1] [INFO] Using worker: sync
backend_1        | [2022-03-17 23:46:00 +0000] [7] [INFO] Booting worker with pid: 7
queue-default_1  | 23:46:02 Worker rq:worker:03a848bcde8d44cfafd2e8a8c441a791.ab6b900663fc.7.default: started, version 1.8.1
queue-default_1  | 23:46:02 Subscribing to channel rq:pubsub:03a848bcde8d44cfafd2e8a8c441a791.ab6b900663fc.7.default
queue-default_1  | 23:46:02 *** Listening on default...
queue-long_1     | 23:46:02 Worker rq:worker:c09e55402fe64cb68d454e3efea0a51b.228bc85952e9.7.long: started, version 1.8.1
queue-long_1     | 23:46:02 Subscribing to channel rq:pubsub:c09e55402fe64cb68d454e3efea0a51b.228bc85952e9.7.long
queue-long_1     | 23:46:02 *** Listening on long...
frontend_1       | 172.22.0.4 - - [17/Mar/2022:23:46:05 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "172.31.4.137"
frontend_1       | 172.22.0.4 - - [17/Mar/2022:23:46:08 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "172.31.37.28"
frontend_1       | 172.22.0.4 - - [17/Mar/2022:23:46:14 +0000] "GET / HTTP/1.1" 404 136 "-" "curl/7.68.0" "172.22.0.1"
frontend_1       | 172.22.0.4 - - [17/Mar/2022:23:46:19 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "172.31.17.115"
frontend_1       | 172.22.0.4 - - [17/Mar/2022:23:46:21 +0000] "GET / HTTP/1.1" 404 144 "-" "curl/7.68.0" "172.22.0.1"
frontend_1       | 172.22.0.4 - - [17/Mar/2022:23:46:35 +0000] "GET / HTTP/1.1" 404 139 "-" "ELB-HealthChecker/2.0" "172.31.4.137"

@1ubuntuuser
Copy link
Author

I have found the same result on a fresh install of debain 11. I carefully followed instructions here too.
https://github.com/frappe/frappe_docker/blob/main/docs/setup-options.md

@defnotjonas
Copy link
Contributor

defnotjonas commented Mar 18, 2022

Hi, just checking if we are facing the same issues (again). What exactly are you trying to do? I was trying to setup ERPNext inside the docker container.

I was also getting errors when trying to access the site. I had to manually exec a command in the backend container. Try this doc. The db-password can be found in the docker-compose.yaml.

For me I had to run the following two commands to setup ERPNext (I still have some issues, so take this with a grain of salt)
❗️<site-name> has to match the url you are trying to access.

docker-compose exec backend bench new-site <site-name> --mariadb-root-password <db-password> --admin-password <admin-password>
docker-compose exec backend bench --site <site-name> install-app erpnext

@pptyasar
Copy link

pptyasar commented Mar 19, 2022

@defnotjonas

Tried
docker-compose exec backend bench new-site <site-name> --mariadb-root-password <db-password> --admin-password <admin-password> docker-compose exec backend bench --site <site-name> install-app erpnext

and

docker-compose -f compose.yaml \ -f overrides/compose.erpnext.yaml \ -f overrides/compose.mariadb.yaml \ -f overrides/compose.redis.yaml \ -f overrides/compose.https.yaml \ config > ~/gitops/docker-compose.yml

still 404 , nginx is running, I am trying to access from ip address ,
also when trying from server itself with wget localhost, wget mysite.localhost same 404

@defnotjonas
Copy link
Contributor

defnotjonas commented Mar 19, 2022

Hi, I can’t replicate your setup right now, tomorrow I can give more exact feedback. Just to try my most common mistake: What are you using for site-name? It should be localhost or mysite.localhost for you.

Of course localhost and mysite.localhost have to resolve to the correct IP (nslookup mysite.localhost)

@pptyasar
Copy link

pptyasar commented Mar 19, 2022

Tried with both

With IP

docker-compose exec backend bench new-site ipaddress --mariadb-root-password 123 --admin-password 123
docker-compose exec backend bench --site ipaddress install-app erpnext

With localhost

docker-compose exec backend bench new-site localhost --mariadb-root-password 123 --admin-password 123
docker-compose exec backend bench --site localhost install-app erpnext

getting 404 only

@defnotjonas
Copy link
Contributor

defnotjonas commented Mar 19, 2022

Sorry, I just went over your comment and I missed something.

docker-compose -f compose.yaml \ -f overrides/compose.erpnext.yaml \ -f overrides/compose.mariadb.yaml \ -f overrides/compose.redis.yaml \ -f overrides/compose.https.yaml \ config > ~/gitops/docker-compose.yml

I believe you are missing an override for proxy or no proxy. I was assuming your 404 resulted from frappe when instead it probably results from the Traefik proxy infront.

Please provide the contents of your docker-compose.yaml (censor passwords and urls).

@defnotjonas
Copy link
Contributor

Also maybe read #715. It includes instructions partly suitable for your setup.

@1ubuntuuser
Copy link
Author

@defnotjonas, I did try with proxy and noproxy. Same result.

@defnotjonas
Copy link
Contributor

defnotjonas commented Mar 19, 2022

@1ubuntuuser @pptyasar After some downtime, I think we are facing two different issues between the two of you. If this is the case it would probably be best to create a new issue for @pptyasar. I am fairly certain that both issues are not bugs, but rather configuration issues resulting from lacking documentation. The lack of documentation is possibly fixed by the future pull request #715.

@1ubuntuuser Your problem does not stem from a docker-compose.yaml related issue, as you can reach the container. I think your issue stems from a missing site inside your container. Have you tried setting up a site in your backend container? #711 (comment)

If @pptyasar docker-compose.yaml points to Traefik as the problem, we should move their part of the discussion to a new issue. Excuse the resulting confusion. I probably miscategorized the issue when referring @pptyasar here.

@revant
Copy link
Collaborator

revant commented Mar 19, 2022

does not exist

if the 404 mentions site .... does not exist.

then it is displayed by Frappe framework when the site url you're trying to reach does not exist in sites directory. Create the site first.

I'll add screenshot of traefik 404 and frappe 404 in troubleshoot documention.

@1ubuntuuser
Copy link
Author

My goal has been to get a single erpNext domain online. @defnotjonas I think you may be right. As a new commer, I had to fish around a bit to try find the right documentation to use. I thought it was https://github.com/frappe/frappe_docker/blob/main/docs/setup-options.md. Based on what you are saying the steps in that documentation are not enough. I didn't realise I had to also run the docker exec commands. I'll give it a try.

FYI this is the path I took to find the documentation.
https://erpnext.com > Get Started > Install Open Source > https://github.com/frappe/erpnext > https://github.com/frappe/frappe_docker > Read the Docs/setup options > wrong docs apparently

I spent 8 hours so far and haven't been able to get an admin panel, I know it's open-source, so I'm not complaining but I feel launching a docker-compose stack should take far less effort.

It might be good to make it easier, something like:
https://erpnext.com > Get Started > [Install with Docker]|[Install with Bench] > Easy tutorial with all steps.

@revant
Copy link
Collaborator

revant commented Mar 19, 2022

404 from traefik: This means traefik can't reach internal service
traefik-404

404 from frappe: This means site needs to be created (bench new-site ...)
frappe-404

https://erpnext.com/ > Get Started > Install Open Source > https://github.com/frappe/erpnext > https://github.com/frappe/frappe_docker > Read the Docs/setup options > wrong docs apparently

We recently refactored It will take a quarter to stablize I think.

frappe_docker is all community work ONLY so if you wish you can contribute updating the documentation or wait for others to put it up.

If you want old setup which was as easy as docker-compose up -d check the compat branch of this repo https://github.com/frappe/frappe_docker/tree/compat.

I approved refactor because it is optimized and better. I'm okay with refactoring other things and updating documentation that is what I felt progress is.

With respect to your path to land here, we can observe that ANY installation procedure is neglected and you're on your own anyway. There are forum posts like "22 easy steps to install ERPNext" popping up every time. Even now if you visit forum one of the first ten post will be related to installation.

Many "bash" veterans will tell you manual install works and it is easy. Same way "container" veterans will say same about containerized setup.

@pptyasar
Copy link

tried everything , its been more than 10 days , feeling tired :(

@revant
Copy link
Collaborator

revant commented Mar 23, 2022

I won't be merging #715 unless 100% of community can use the documentation mentioned in it. All the installation problems I'm directing there.

I can make it work, it takes me less than 5 min. Contributors can make it work. People who don't talk here can make it work. but community can't.

even if you @pptyasar can't use it, I'll not merge it.

I've blocked the merge for now because wizard failed for one user after installation. I'll also block that merge unless all unique people from the community can't successfully install frappe docker. Any related or unrelated error needs to be fixed.

move discussion to PR.

@revant revant closed this as completed Mar 23, 2022
@a157147899
Copy link

I won't be merging #715 unless 100% of community can use the documentation mentioned in it. All the installation problems I'm directing there.

I can make it work, it takes me less than 5 min. Contributors can make it work. People who don't talk here can make it work. but community can't.

even if you @pptyasar can't use it, I'll not merge it.

I've blocked the merge for now because wizard failed for one user after installation. I'll also block that merge unless all unique people from the community can't successfully install frappe docker. Any related or unrelated error needs to be fixed.

move discussion to PR.

@revant To be honest, I feel it's hard to follow the new setup instructions even I did successfully set up a production site in 10 minutes before the refactor.

The new docs really need to be re-organized.

@micksatana
Copy link

If any one landed here, you might have missed the 💡 You should setup --project-name option in docker-compose commands if you have non-standard project name. part in the https://github.com/frappe/frappe_docker/blob/main/docs/site-operations.md document. So when you create new site for a non-standard project name, you need to run with

docker compose --project-name something exec backend bench new-site something.localhost --mariadb-root-password the-password --admin-password the-password

@philippludwig
Copy link

If any one landed here,

I landed here because I used the easy install script.

With respect to your path to land here, we can observe that ANY installation procedure is neglected

I would really like to follow an installation procedure, but I can’t find any.

  • The main page links under "manual install" to https://github.com/frappe/bench, which is more a list of things you can do with bench, but no step-by-step installation instructions.
  • Under docker installation, it links to https://github.com/frappe/frappe_docker which just tells be to clone the repository – then it links a bunch of documents, but none of them state what you actually need to do.

Also, I could not find any system requirements. How much RAM do I need? CPU? Disk space?

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

No branches or pull requests

7 participants