Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Setup never finishes, stuck at waiting for server to come up #694

Open
alsiPanda opened this issue Apr 3, 2020 · 21 comments
Open

Setup never finishes, stuck at waiting for server to come up #694

alsiPanda opened this issue Apr 3, 2020 · 21 comments

Comments

@alsiPanda
Copy link

alsiPanda commented Apr 3, 2020

I am trying to setup okuna-api on a gcp cloud compute engine. My python --version shows 3.6.10 and docker & docker-compose are both up to date. When i run pip install -r requirements-cli-only.txt it works fine. But when i run pip install -r requirements.txt I get an error as follows :

ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-f914uvzb/mysqlclient/setup.py'"'"'; file='"'"'/tmp/pip-install-f914uvzb/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-f914uvzb/mysqlclient/pip-egg-info
cwd: /tmp/pip-install-f914uvzb/mysqlclient/
Complete output (12 lines):
/bin/sh: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-f914uvzb/mysqlclient/setup.py", line 16, in
metadata, options = get_config()
File "/tmp/pip-install-f914uvzb/mysqlclient/setup_posix.py", line 61, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-f914uvzb/mysqlclient/setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (_mysql_config_path,))
OSError: mysql_config not found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Next is when i run python okuna-cli.py up-full the process continues infinitely at Waiting for server to reply.... The loader keeps spinning, but even after an hour, its still the same. How do I find what is wrong ? Cuz if I do a ctrl+C and check docker, there are no images and no containers.

PS: I have omitted sudo here, but when actually running anything I do add sudo before everything.

@alsiPanda
Copy link
Author

alsiPanda commented Apr 4, 2020

@lifenautjoe , Is there any way to diagnose what is causing the problem, any particular log I can check ?

@alsiPanda
Copy link
Author

@lifenautjoe, I tried doing a clean install twice. Deleted the server, did all the prerequisites. The installer runs for at least half an hour before my ssh window times out. Without the api getting installed I am unable to check out the app as well, since it gets stuck at the splash screen.

@lifenautjoe
Copy link
Member

The mysql_config not found issue is a common one on servers.. Although mysql is not required to be on the same instance, the mysql adaptor library in python requires certain mysql files in the system in order to run.

Here's something you can do about that. https://stackoverflow.com/questions/7475223/mysql-config-not-found-when-installing-mysqldb-python-interface

@lifenautjoe
Copy link
Member

The server should come up within seconds, not minutes. For debugging purposes I would try to use the native docker compose commands to show all logs.

docker-compose -f docker-compose-full.yml up

@alsiPanda
Copy link
Author

@lifenautjoe , thanks for the reply. I tried the solution on stack, that fixed the error part.
But, here is the thing with the never ending full install. I tried the direct command you suggested. Apart from a couple of warnings and some red lines related to git clone -q , there are no errors, took a few minutes to download all the images, but that's understandable. At the end after starting all the containers, I kept getting the messages from okuna scheduler and worker. I assume that can be fixed by adding -d in the docker-compose command.
As such currently, the problem with the python okuna-cli.py up-full still remains. It's stuck at waiting for server to come up.

@alsiPanda
Copy link
Author

alsiPanda commented Apr 6, 2020

@lifenautjoe I tried the following : first docker-compose -f docker-compose-full.yml up -d to install and run the docker containers followed by python3 okuna-cli.py up-full, this time there was a message Bootstrapping okuna with some data and then after a bunch of lines, ending at Okuna is live at http://127.0.0.1:80. Attaching to okuna-api Once again its stuck there.

Is that the normal behaviour at the end of install or is it like really stuck ?

@alsiPanda
Copy link
Author

@lifenautjoe I tried accessing the server via browser and it seems to work. Showing the django page. Just one small query, when i go to /admin, what is the default username & password ?

@hungtooc
Copy link

hungtooc commented May 18, 2020

i got the same your issue stuck at waiting for server to come up.
i tried to run command "docker-compose -f docker-compose-full.yml up" then i found an error below:

db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: Using Linux native AIO db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: Uses event mutexes db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: Number of pools: 1 db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: Using SSE2 crc32 instructions db_1 | 2020-05-18 3:14:38 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts) db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: Completed initialization of buffer pool db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: 128 out of 128 rollback segments are active. db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: Creating shared tablespace for temporary tables db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: 10.4.5 started; log sequence number 141065; transaction id 21 redis_1 | 03:14:37.22 redis_1 | 03:14:37.23 Welcome to the Bitnami redis container redis_1 | 03:14:37.23 Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-redis redis_1 | 03:14:37.23 Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-redis/issues redis_1 | 03:14:37.24 redis_1 | 03:14:37.24 INFO ==> ** Starting Redis setup ** redis_1 | 03:14:37.30 INFO ==> Initializing Redis... redis_1 | redis_1 | 03:14:37.50 INFO ==> ** Redis setup finished! ** redis_1 | 03:14:37.53 INFO ==> ** Starting Redis ** redis_1 | 1:C 18 May 2020 03:14:37.548 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo redis_1 | 1:C 18 May 2020 03:14:37.548 # Redis version=6.0.1, bits=64, commit=00000000, modified=0, pid=1, just started redis_1 | 1:C 18 May 2020 03:14:37.548 # Configuration loaded redis_1 | _._ redis_1 | _.-``__ ''-._ redis_1 | _.-`` . _. ''-._ Redis 6.0.1 (00000000/0) 64 bit redis_1 | .-`` .-```. ```\/ _.,_ ''-._ redis_1 | ( ' , .- | , ) Running in standalone mode redis_1 | |-.-...- __...-.``-.|'_.-'| Port: 6379 redis_1 | | -._ `._ / .-' | PID: 1
redis_1 | `-.
`-._ `-./ .-' .-'
redis_1 | |`-.
`-.
`-..-' .-'.-'|
redis_1 | | `-.`-. .-'.-' | http://redis.io
redis_1 | `-._ `-._`-.
.-'.-' .-'
redis_1 | |`-.
`-.
`-..-' .-'.-'|
redis_1 | | `-.`-. .-'.-' |
redis_1 | `-._ `-._`-.
.-'_.-' .-'
redis_1 | `-.
`-..-' .-'
redis_1 | `-.
_.-'
redis_1 | `-.
.-'
redis_1 |
redis_1 | 1:M 18 May 2020 03:14:37.551 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1 | 1:M 18 May 2020 03:14:37.551 # Server initialized
redis_1 | 1:M 18 May 2020 03:14:37.551 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /s
ys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis_1 | 1:M 18 May 2020 03:14:37.551 * Ready to accept connections
db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db_1 | 2020-05-18 3:14:38 0 [Note] Plugin 'FEEDBACK' is disabled.
db_1 | 2020-05-18 3:14:38 0 [Note] Server socket created on IP: '::'.
db_1 | 2020-05-18 3:14:38 0 [Note] InnoDB: Buffer pool(s) load completed at 200518 3:14:38
db_1 | 2020-05-18 3:14:38 0 [Warning] 'proxies_priv' entry '@% root@db.okuna' ignored in --skip-name-resolve mode.
db_1 | 2020-05-18 3:14:38 0 [Note] Reading of all Master_info entries succeded
db_1 | 2020-05-18 3:14:38 0 [Note] Added new Master_info '' to hash table
db_1 | 2020-05-18 3:14:38 0 [Note] mysqld: ready for connections.
db_1 | Version: '10.4.5-MariaDB-1:10.4.5+maria~bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
okuna-scheduler | /wait-for-it.sh: 75: /wait-for-it.sh: Syntax error: "(" unexpected (expecting ";;")
okuna-scheduler | /wait-for-it.sh: 75: /wait-for-it.sh: Syntax error: "(" unexpected (expecting ";;")
okuna-worker | /wait-for-it.sh: 75: /wait-for-it.sh: Syntax error: "(" unexpected (expecting ";;")
okuna-worker | /wait-for-it.sh: 75: /wait-for-it.sh: Syntax error: "(" unexpected (expecting ";;")
okuna-api exited with code 1
`

@Hansmic
Copy link

Hansmic commented Jun 23, 2020

@alsiPanda and @uiboy @lifenautjoe, am kinda stuck with the default username and password, any light would be helpful.
Thanks

@alsiPanda
Copy link
Author

@Hansmic in my case, I just bypassed the invitation part and registered directly. I did this by making changes in the api and app, edited out the invitation part, can't remember the details but I am sure it involved automatically adding the invite code generated on signup to the user registration, essentially skipping the email part.

@Hansmic
Copy link

Hansmic commented Jun 23, 2020

@alsiPanda how were you able to register directly, am having issue with the username and password, what to have access to django webserver.

@alsiPanda
Copy link
Author

alsiPanda commented Jun 23, 2020

@Hansmic assuming you are running locally, you would normally have to get an invitation code before you can complete registration on the app. I bypassed the invitation part in both the api and app code, try searching for 'invite' using notepad++, that's how I found the relevant files and made necessary changes to bypass the invitation. After the registration, you can use the registered username and password to access the admin, I think. My memory is fuzzy about these parts.

Another option is to look around in the api code for dummy account creation, that automatically creates an account. It should be under okuna-api GitHub readme, test accounts. You can also send youself the invites using manage.py send_invites , details of which are in the api readme.

@Hansmic
Copy link

Hansmic commented Jun 29, 2020

@alsiPanda am experiencing an issue, really don't if am l the only one having this problem, is simply the page that state "Please take a moment to read and accept our guidelines" am getting Bad Request, please do you have any idea why am experiencing the issue.
Simulator Screen Shot - iPhone 11 Pro Max - 2020-06-29 at 10 59 43

@alsiPanda
Copy link
Author

alsiPanda commented Jun 29, 2020

@Hansmic Most probably, this should be an issue with your connection to api. Have you properly setup the api address in your app ? Check your env file and any other locations mentioned in the setup.
More importantly, look at the logcat for further details of why you might be getting such errors.

@Hansmic
Copy link

Hansmic commented Jun 29, 2020

Yea for the api url, am using external IP address, which i have in env file. eg API_URL": "http://28.34.15.27/",

@Hansmic
Copy link

Hansmic commented Jul 1, 2020

@alsiPanda new backend api and frontend install still facing this issue. is there any way I can bypass this issue, really driving me crazy.

@alsiPanda
Copy link
Author

@Hansmic if you only need to bypass that particular page, you will need to change what the next button does in the page preceding the one in question. But then you will also need to manually pass the values to create account bloc . I would still suggest looking at the logcat and terminal. It will tell you what the problem is, if it is in flutter. Or if the problem is in backend, try docker logs okuna-api.

@Komposten
Copy link
Member

Probably best to move this Community Guidelines discussion to #724.

@Hansmic
Copy link

Hansmic commented Jul 1, 2020

@alsiPanda thanks for your remarkable efforts assisting me with this issue, if i may asked, was your backend api url on http or https?
Thanks.

@Hansmic
Copy link

Hansmic commented Jul 4, 2020

@alsiPanda Hello, please do you have any ideal how the Request an invite works?

@Hansmic
Copy link

Hansmic commented Jul 16, 2020

@alsiPanda Please am having an issue pertaining reporting a post or a community, the server isn't fetching any request, and keeping spinning with the message why are you reporting the post of the community. please i have encounter any issue of that kind or am i alone experiencing this issue.
Thanks.

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

No branches or pull requests

5 participants