Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Roman Prykhodchenko
@romcheg
ralph uses whitenoise to serve static files
Erik Smedinga
@ErikSmedinga
How can I change the password of a user?
Roman Prykhodchenko
@romcheg
@vladsol and I suppose it's not going to be a heavily loaded by external users, so whitenoise will work from the box
so go directly to gunicorn and check if you get static files
Arkadiusz Adamski
@ar4s
Vladislav Solovei
@vladsol
@romcheg Unfortunately, no :(
@romcheg for all of "/static/" i getting 404
Arkadiusz Adamski
@ar4s
@vladsol please run ralph collectstatic --noinput
Vladislav Solovei
@vladsol
2620 static files copied to '/opt/ralph/ralph/src/ralph/var/static'
Roman Prykhodchenko
@romcheg
looks good
@ar4s ^
Arkadiusz Adamski
@ar4s
+1
Vladislav Solovei
@vladsol
@romcheg But... Nothing changeds.
Arkadiusz Adamski
@ar4s
@vladsol you run gunicorn behind nginx?
Vladislav Solovei
@vladsol
No. only gunicorn. nginx is stopped.
Maybe, i need to specify static files location for unicorn?
Somehow...)
Roman Prykhodchenko
@romcheg
@vladsol well, we have examined the code with @ar4s... and looks like we aparently forgot to merge whitenoise... somehow...
Vladislav Solovei
@vladsol
Oops :)
Roman Prykhodchenko
@romcheg
so you can take the configuration file for nginx from contrib/ and adapt it for your needs
Vladislav Solovei
@vladsol
So, at this moment, i can use nginx )
Roman Prykhodchenko
@romcheg
right
sorry for the confusion
Erik Smedinga
@ErikSmedinga
Great, every time I try to logon with a newly created user I get a Server Error (500). Before I can logon again I have to clear my cookies for Ralph.
Roman Prykhodchenko
@romcheg
@ErikSmedinga could you please enable debug and post some logs when you have this error?
Erik Smedinga
@ErikSmedinga
It's the online environment.
Vladislav Solovei
@vladsol
Exception Value:
(1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='")
When i trying to add DC
Roman Prykhodchenko
@romcheg
@vladsol what charset and collation is set for your DB?
Vladislav Solovei
@vladsol
@romcheg My fault) looks like latin1 is set by default.
Roman Prykhodchenko
@romcheg
Well, then it's easy to fix :)
@ErikSmedinga then the logs should be in your log file
Arkadiusz Adamski
@ar4s
by default Ralph store log in /tmp/ralph.log
Erik Smedinga
@ErikSmedinga
Is there still a Windows Client Agent for Ralph 3? How can I scan in Ralph 3?
✪ vi4m Marcin Kliks
@vi4m
not tested on Windows, but for Linux here’s http://ralph-cli.readthedocs.io/en/latest/
requires some modifications to work on Windows
damian1976
@damian1976
Hi, Every couple of days I have problems with ralph (django+nginx) showing 502 Bad Gateway. Do you have any quick solution for this?
Roman Prykhodchenko
@romcheg
@damian1976 do you have any logs?
there's nothing on the top of my head
damian1976
@damian1976
@romcheg It look like there's nothing special. When I grep for 502 inside /var/log/nginx the only thing I get is access.log.2:IP - - [10/Feb/2018:17:20:57 +0000] "GET /favicon.ico HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0"
✪ vi4m Marcin Kliks
@vi4m
@damian1976 ralph 3 ?
damian1976
@damian1976
yes
damian1976
@damian1976
the only thing the nginx actually does is that it's a proxy for django (it redirects from 8000 to 443). That's all.
damian1976
@damian1976
2018/03/01 09:49:24 [error] 30971#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: IP_ADDRESS, server: SERVER_NAME, request: "GET / HTTP/1.1", upstream: "SERVER_NAME:8000/", host: "SERVER_NAME"

It look like django dies after some time. ralph is visible under 'ps' command

ralph    31001     1  0 08:20 ?        00:00:01 /home/ralph/ralph_ng/bin/python /home/ralph/ralph_ng/bin/ralph runserver 0.0.0.0:8000

But when I'm trying to telnet localhost on the port 8000 I fail .
Then I have to kill ralph process and start it again (virtualenv has to be activated):

DJANGO_SETTINGS_MODULE=ralph.settings.local ralph runserver 0.0.0.0:8000 &
Arkadiusz Adamski
@ar4s
@damian1976 you use proxy_pass in nginx?
server {
    listen 80;
    client_max_body_size 200M;
    server_name ralph.localhost;
    proxy_set_header Host ralph.localhost;

    location / {
      proxy_pass http://127.0.0.1:8003;
    }
}
I have something like above configuration to start Ralph on my local machine (through nginx ofc)
damian1976
@damian1976
Yes , I use proxy_pass. I noticed I used dns name instead of IP. I read somewhere that I should try with IP and/or switch ipv6 off on the machine. I gave it a try already and currently waiting . Let's wait 1, 2 days to see what will happen. Are client_max_body_size 200M; and proxy_set_header Host ... necessary?
Arkadiusz Adamski
@ar4s
Yes if you have DEBUG=False and then Host header must correspond to ALLOWED_HOSTS but
you have another problem
ShyamalaViswanathan
@ShyamalaViswanathan
HI, I was able to successfully integrate CAS with Ralph using remote authentication of Django. Thanks to the Django link and suggestion. I now need to use email for authentication instead of username. Any suggestion on how to go about it?