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
Percy9mo ago
Project ID: a15d6fa5-744f-422a-998a-349807951c51
Rahul Rathour
Rahul Rathour9mo ago
yes Can you help me ?
Brody
Brody9mo ago
share your repo please
Rahul Rathour
Rahul Rathour9mo ago
GitHub
GitHub - datamind321/chat-application
Contribute to datamind321/chat-application development by creating an account on GitHub.
Rahul Rathour
Rahul Rathour9mo ago
@Brody I have send repo @Brody Can You Check My repo ?
Fragly
Fragly9mo ago
#🛂|readme #5
malik
malik9mo ago
My also same error app crashed
Rahul Rathour
Rahul Rathour9mo ago
App deployed successfully , but websocket connection failed Hi everyone Anyone here If yes , say hi 🤚
Brody
Brody9mo ago
this is community support, please be patient
Rahul Rathour
Rahul Rathour9mo ago
Hi brody
Rahul Rathour
Rahul Rathour9mo 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
Brody9mo ago
you need to use wss://
Rahul Rathour
Rahul Rathour9mo ago
I have been already uses wss://
Rahul Rathour
Rahul Rathour9mo ago
No description
Brody
Brody9mo ago
your error message says that you are using ws://
Rahul Rathour
Rahul Rathour9mo ago
How to use sslserver I don't use sslserver on installed app ?
Brody
Brody9mo ago
you need to use wss:// for your websocket app, railway handles certs so you don't have to
Rahul Rathour
Rahul Rathour9mo ago
Do that 's compulsory or not ?
Rahul Rathour
Rahul Rathour9mo ago
No description
Rahul Rathour
Rahul Rathour9mo ago
I am used now wss:// But error not resolved 😐
Brody
Brody9mo ago
let's see the error now please
Rahul Rathour
Rahul Rathour9mo ago
No description
Brody
Brody9mo ago
you are still using ws://
Rahul Rathour
Rahul Rathour9mo ago
thus is my js file i have already updated it , see here
Brody
Brody9mo ago
please have a look at your error message, it states you are still using ws:// you need to use wss://
Rahul Rathour
Rahul Rathour9mo ago
Actually , I know that I have changes on my github repo code but changes not applies on server js file
No description
Brody
Brody9mo ago
do a hard refresh
Rahul Rathour
Rahul Rathour9mo ago
I am trying many times , but it's has not changed
Brody
Brody9mo ago
ctrl + f5
Rahul Rathour
Rahul Rathour9mo ago
Hard Refresh already tried , but not benefit '
Brody
Brody9mo ago
are you pushing the code to the same branch railway is set to pull from?
Rahul Rathour
Rahul Rathour9mo ago
in railway site how pull ?
Brody
Brody9mo ago
check the railway service settings to see what branch you have the repo set to
Rahul Rathour
Rahul Rathour9mo ago
main branch set
Brody
Brody9mo ago
what branch are you pushing your code to?
Rahul Rathour
Rahul Rathour9mo ago
main branch
Brody
Brody9mo ago
have you pushed the updates you've made?
Rahul Rathour
Rahul Rathour9mo 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 Rathour9mo ago
No description
Rahul Rathour
Rahul Rathour9mo ago
redis database exception found ... can you tell me what i do in raiway production django channel
Brody
Brody9mo 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 Rathour9mo 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
Brody9mo ago
you need to deploy a redis database into your project and fill in the given credentials in the config
Rahul Rathour
Rahul Rathour9mo ago
how to do this can you tell me ? I have no idea how to config this
Brody
Brody9mo ago
+ New button at the top right of your project
Rahul Rathour
Rahul Rathour9mo ago
After click database and Add Redis right ?
Brody
Brody9mo ago
correct
Rahul Rathour
Rahul Rathour9mo ago
and what next
Brody
Brody9mo ago
read the second half of my message please
Rahul Rathour
Rahul Rathour9mo ago
No description
Rahul Rathour
Rahul Rathour9mo ago
I have added it
Brody
Brody9mo ago
fill in the given credentials in the config in settings.py
Rahul Rathour
Rahul Rathour9mo ago
which param all compulasary like hosts ?
Brody
Brody9mo ago
host, port, username, password
Rahul Rathour
Rahul Rathour9mo ago
now correct ? wait i am tried it ?
Rahul Rathour
Rahul Rathour9mo ago
After Add Redis Database
No description
No description
Brody
Brody9mo ago
check if your config is correct according to its documentation
Rahul Rathour
Rahul Rathour9mo ago
Thank you so much brody for my help , my issue was resolve Thanks Again !!!
Brody
Brody9mo ago
no problem!
Want results from more Discord servers?
Add your server