@jflory7 and @jonatoni I had Keenly followed the documentation https://fedora-happiness- packets.readthedocs.io/setup/authentication/ about setting up the authentication but still some things are not clear because i had end up getting errors saying bad request with 302 status code
Also my docker compose is failing and also if try( pip install -r dev.txt) i keep getting error saying ( SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Setuptools version ",version,"or greater has been installed."? ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-mrwlv3bj/wsgire )
Kindly Help
Metadata Update from @jflory7: - Issue priority set to: needs review (was: awaiting triage) - Issue tagged with: bug, needs info, type - backend
Metadata Update from @jflory7: - Issue untagged with: bug
@feisal This looks like a configuration error. Are you using the Docker image to start the testing version of the site?
Also my docker compose is failing
Please share the lines with error messages when you run docker-compose up.
docker-compose up
Metadata Update from @jflory7: - Issue untagged with: type - backend - Issue assigned to jflory7 - Issue priority set to: waiting on assignee (was: needs review) - Issue tagged with: type - summer coding
@jflory7 when i try to run the docker-compose up command. I get this type of error. i have researched it but it still not solving my problems
@feisal the error says that the ports are already in use. Try restarting your docker.
@jflory7 @phoenixabhishek I tried restarting several times but i kept getting error in the last process of building the app redis server
For the Redis Server
@feisal Okk, so try this... Go to Docker settings, search for Network settings... In there you should find 'DNS Server' settings... It will be automatic by default, change it to fixed... Then change last two parts of the IP address, ex. change 8.8.8.8 to 8.8.7.7 Then restart and check if it works :smile:
@phoenixabhishek bro, is this configuration for windows or ubuntu? I am using ubuntu
@feisal I am on Windows, you can try the similar steps for Ubuntu and see if this works
@feisal Something on your system is already running on the port Redis uses. Per the instructions here, see if something is already running on that port with this command:
sudo netstat -tulpn | grep 6379
My guess is a redis-server instance is already running when you run docker-compose up.
Hi @jflory7 i followed your suggestions and upon checking the (sudo netstat -tulpn | grep 6379), i found that indeed redis was automatically running in the background and that is why the app broke down, I then followed the link you sent me, thou they were unclear, they gave me new ideas and i could be able to stop the redis from running in the background by following this link https://stackoverflow.com/questions/6910378/how-can-i-stop-redis-server. i had successfully stopped it and i ran docker again and now my app is showing me something, thou not sure about it. IS THIS THE CORRECT RUNNING PROCEDURE??
@feisal Hi! Congratulations you finally got it working! You can go to your localhost to access the project. :)
@jflory7 I think it will be wise to add to the Setup Documentation that we expose the port 8000 for our project setup and include steps to configure it to another port should the user choose to do so. This will make the docs self sufficient and avoid such problems while setting up. Should I add this with reference to #100 instead of making a new ticket?
@shraddhaag thank you bro, the app is working and displaying the index page but then the login and send happiness button is still returning BAD request(invalid url)
CLICK THE LINK BELOW TO VIEW THE SCREENSHOT OF THE ERROR
https://pagure.io/fedora-commops/fedora-happiness-packets/issue/raw/files/f4d6d7aa3ff2944ed51f43081b9a8cb41e1e57a6e3e88fefaadb8c76a7f9dcb6-send_button.png
WHAT I DID Is I DID NOT CANCEL MY TERMINAL, I LEFT DOCKER TO RUN (both docker-up and docker-up --build). CAN THIS BROUGHT THE ERROR?? OR IS THERE ANYTHING I LEFT WITH THAT HAS BEEN MENTIONED IN https://fedora-happiness-packets.readthedocs.io/setup/development/
@feisal Can you please share the lines of error message that are logged in the terminal when you try to navigate to login and send happiness packets?
If you have only cloned the project and you are trying to get the project run for the first time, then the command you need to run us docker-compose up. (Which I think is your case.)
If you have made changes to the source code and would like to see that reflected in your local development server, you need to run docker-compose up --build. As i believe, this isn't your case, you don't need to run this command as of now.
docker-compose up --build
Also, have you run ./generate_client_secrets.sh as mentioned in the setup documentation before you setup your docker container?
./generate_client_secrets.sh
@shraddhaag here is the error message.. try to check the status code it sent when various request were sent like faq page(they sent 200:OK) but when i try to check login or send happiness buttons i receive error code status of 302
AND FOR THE SCREENSHOT OF THE ERROR I GOT IN THE PAGE IS
AND ALSO THIS IS A SCREENSHOT OF MY DOCKER AND DOCKER COMPOSE VERSION
@feisal The issue you're facing is probably because OIDC Client ID and Secret are not configured. Please make sure you have a client_secrets.json generated. If not, shut down your docker container (run docker-compose down in a different terminal or CTRL + C in the same terminal) and generate client_secrets.json by running ./generate_client_secrets.sh. Now build the container again and try logging in. Although this should remedy your problem, if you get the error still, please enable Intercept redirects in the debug toolbar and give lines of the error code here.
client_secrets.json
docker-compose down
CTRL + C
Intercept redirects
@feisal Make sure that the Redis server is running and listening on port 6379. Or you can do is first run the command 'redis-cli' on a terminal and check the url and port redis is using and change the 'CELERY_BROKER_URL' respectively.
@shraddhaag wrote: @jflory7 I think it will be wise to add to the Setup Documentation that we expose the port 8000 for our project setup and include steps to configure it to another port should the user choose to do so. This will make the docs self sufficient and avoid such problems while setting up. Should I add this with reference to #100 instead of making a new ticket?
Agreed @shraddhaag. :thumbsup: A new ticket isn't necessary for this. Feel free to submit a PR for it!
@feisal Did you follow this step?
@shraddhaag I already created the client_secrets.jsonby following the set doc strictly but still getting the 400 invalid redirect url.. WHAT DO YOU MEAN BY Intercept redirects in the debug toolbar?? could you kindly rephrase more. Thank you
@shivamgoyal i i have checked the url the redis is running on and its
what will i change in CELERY_BROKER_URL??
this is my base.py and dev.py respectively
@jflory7 yeah i followed the https://fedora-happiness-packets.readthedocs.io/setup/development/ strictly
@feisal Do you see this button to open the debug toolbar at the right? [Attached snapshot below]
Click that and the toolbar will open.[A snapshot of the same is attached below] Enable the Intercept redirects (by default it is disabled.) and then go to the login page and please tell which redirect failed for you and paste the error code here.
@shraddhaag I HAVE DONE IT. KINDLY CHECK THE THE SCREENSHOT I RECORDED
https://youtu.be/VMKGUJGKbbU
@shraddhaag ALSO CHECK THE STATUS RECEIVED FROM THE TERMINAL UPON CLICKING THE BUTTONS
@feisal Given that Docker is now working for you and you have a different error now, we should discuss this elsewhere instead of in a ticket. If you are still having difficulties running fedora-happiness-packets, please get in touch with the CommOps team, either on IRC, Telegram, or Discourse.
For now, I am closing this ticket since the original problem seems to be solved.
Metadata Update from @jflory7: - Issue close_status updated to: insufficient data - Issue status updated to: Closed (was: Open)