Deploying Problem On Django channels

I am trying to deployed django channels productions on railway but i am getting deployed logs error : Project Id : a15d6fa5-744f-422a-998a-349807951c51
No description
No description
60 Replies
Percy
Percy10mo ago
Project ID: a15d6fa5-744f-422a-998a-349807951c51
Rahul Rathour
Rahul RathourOP10mo ago
yes Can you help me ?
Brody
Brody10mo ago
share your repo please
Rahul Rathour
Rahul RathourOP10mo ago
GitHub
GitHub - datamind321/chat-application
Contribute to datamind321/chat-application development by creating an account on GitHub.
Rahul Rathour
Rahul RathourOP10mo ago
@Brody I have send repo @Brody Can You Check My repo ?
Fragly
Fragly10mo ago
#🛂|readme #5
malik
malik10mo ago
My also same error app crashed
Rahul Rathour
Rahul RathourOP10mo ago
App deployed successfully , but websocket connection failed Hi everyone Anyone here If yes , say hi 🤚
Brody
Brody10mo ago
this is community support, please be patient
Rahul Rathour
Rahul RathourOP10mo ago
Hi brody
Rahul Rathour
Rahul RathourOP10mo ago
I want to deploy an django channels on production using railway deployment platform. I have successfully deployed application but websocket connection failed showing this log : " mixed content: the page at 'https://web-production-9959.up.railway.app/accounts/home/' was loaded over https, but attempted to connect to the insecure websocket endpoint 'ws://web-production-9959.up.railway.app/accounts/home/'. this request has been blocked; this endpoint must be available over wss." I have no idea how to connect websocket with https . How to solve this error : My GitHub Repo : https://github.com/datamind321/chat-application/tree/main Anyone help out me to connect websocket using https on deployment servers.
GitHub
GitHub - datamind321/chat-application
Contribute to datamind321/chat-application development by creating an account on GitHub.
Brody
Brody10mo ago
you need to use wss://
Rahul Rathour
Rahul RathourOP10mo ago
I have been already uses wss://
Rahul Rathour
Rahul RathourOP10mo ago
No description
Brody
Brody10mo ago
your error message says that you are using ws://
Rahul Rathour
Rahul RathourOP10mo ago
How to use sslserver I don't use sslserver on installed app ?
Brody
Brody10mo ago
you need to use wss:// for your websocket app, railway handles certs so you don't have to
Rahul Rathour
Rahul RathourOP10mo ago
Do that 's compulsory or not ?
Rahul Rathour
Rahul RathourOP10mo ago
No description
Rahul Rathour
Rahul RathourOP10mo ago
I am used now wss:// But error not resolved 😐
Brody
Brody10mo ago
let's see the error now please
Rahul Rathour
Rahul RathourOP10mo ago
No description
Brody
Brody10mo ago
you are still using ws://
Rahul Rathour
Rahul RathourOP10mo ago
thus is my js file i have already updated it , see here
Brody
Brody10mo ago
please have a look at your error message, it states you are still using ws:// you need to use wss://
Rahul Rathour
Rahul RathourOP10mo ago
Actually , I know that I have changes on my github repo code but changes not applies on server js file
No description
Brody
Brody10mo ago
do a hard refresh
Rahul Rathour
Rahul RathourOP10mo ago
I am trying many times , but it's has not changed
Brody
Brody10mo ago
ctrl + f5
Rahul Rathour
Rahul RathourOP10mo ago
Hard Refresh already tried , but not benefit '
Brody
Brody10mo ago
are you pushing the code to the same branch railway is set to pull from?
Rahul Rathour
Rahul RathourOP10mo ago
in railway site how pull ?
Brody
Brody10mo ago
check the railway service settings to see what branch you have the repo set to
Rahul Rathour
Rahul RathourOP10mo ago
main branch set
Brody
Brody10mo ago
what branch are you pushing your code to?
Rahul Rathour
Rahul RathourOP10mo ago
main branch
Brody
Brody10mo ago
have you pushed the updates you've made?
Rahul Rathour
Rahul RathourOP10mo ago
yes i have create new repo push again and redeploy again but same error thrown Stuck my mind now 😩 hi brody i have solved my issue but, now an short issue can you see it
Rahul Rathour
Rahul RathourOP10mo ago
No description
Rahul Rathour
Rahul RathourOP10mo ago
redis database exception found ... can you tell me what i do in raiway production django channel
Brody
Brody10mo ago
1. where is the redis database, I don't see it in your project 2. wherever the database is, it's not going to be at 127.0.0.1, please check to make sure your client configuration is correct
Rahul Rathour
Rahul RathourOP10mo ago
CHANNEL_LAYERS = { "default": { "BACKEND": "channels_redis.core.RedisChannelLayer", "CONFIG": { "hosts": [("127.0.0.1", 6379)], }, }, } i have added it this settings.py and i am using window on my pc so i am dowload memurai for reddis but this works on my local server , but what i am do for production
Brody
Brody10mo ago
you need to deploy a redis database into your project and fill in the given credentials in the config
Rahul Rathour
Rahul RathourOP10mo ago
how to do this can you tell me ? I have no idea how to config this
Brody
Brody10mo ago
+ New button at the top right of your project
Rahul Rathour
Rahul RathourOP10mo ago
After click database and Add Redis right ?
Brody
Brody10mo ago
correct
Rahul Rathour
Rahul RathourOP10mo ago
and what next
Brody
Brody10mo ago
read the second half of my message please
Rahul Rathour
Rahul RathourOP10mo ago
No description
Rahul Rathour
Rahul RathourOP10mo ago
I have added it
Brody
Brody10mo ago
fill in the given credentials in the config in settings.py
Rahul Rathour
Rahul RathourOP10mo ago
which param all compulasary like hosts ?
Brody
Brody10mo ago
host, port, username, password
Rahul Rathour
Rahul RathourOP10mo ago
now correct ? wait i am tried it ?
Rahul Rathour
Rahul RathourOP10mo ago
After Add Redis Database
No description
No description
Brody
Brody10mo ago
check if your config is correct according to its documentation
Rahul Rathour
Rahul RathourOP10mo ago
Thank you so much brody for my help , my issue was resolve Thanks Again !!!
Brody
Brody10mo ago
no problem!
Want results from more Discord servers?
Add your server