Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRR server is broken #572

Closed
Timmy0Turner opened this issue Mar 13, 2018 · 9 comments
Closed

GRR server is broken #572

Timmy0Turner opened this issue Mar 13, 2018 · 9 comments

Comments

@Timmy0Turner
Copy link

I installed the latest version of grr-server in ubuntu 17 and it seems to have some python problems :

root@timmyx/etc/grr# grr_server
Traceback (most recent call last):
  File "/usr/local/bin/grr_server", line 7, in <module>
    from grr.server.distro_entry import GrrServer
  File "/usr/local/lib/python2.7/dist-packages/grr/__init__.py", line 25, in <module>
    from urllib.request import urlopen
ImportError: No module named request

my configuration is :

root@timmyx:/etc/grr# 
root@timmyx:/etc/grr# uname -a
Linux timmyx 4.13.0-21-generic #24-Ubuntu SMP Mon Dec 18 17:29:16 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
root@timmyx:/etc/grr# 
root@timmyx:/etc/grr# python -V
Python 2.7.14
root@timmyx:/etc/grr# 
root@timmyx:/etc/grr# 

the problem is my end or this is a bug in the grr-server ?

@ogarod
Copy link
Contributor

ogarod commented Mar 13, 2018

How did you install GRR? I'm unable to reproduce this on a fresh Ubuntu artful VM - I can install the latest server deb and run a new worker process:

grr_server --component worker3 --verbose

@ogarod
Copy link
Contributor

ogarod commented Mar 13, 2018

If installing from pip, I'd advise installing to a virtualenv (from the stack trace, it does not look like GRR is installed in a virtualenv).

@Timmy0Turner
Copy link
Author

I used the multiple ways mentioned in the Docs, all of them output the same errors

wget https://storage.googleapis.com/releases.grr-response.com/grr-server_3.2.0-1_amd64.deb
sudo apt install -y ./grr-server_3.2.0-1_amd64.deb

grr_config_updater  #errors 
grr_console #errors 
grr_server #errors 

Can you give me please the chain of commands you used along with your python default version ?

@ogarod
Copy link
Contributor

ogarod commented Mar 13, 2018

3.2.0.1 is an old release. Try using the 3.2.2.0 server deb (link in previous comment).

When following the instructions in http://grr-doc.readthedocs.io/en/latest/installing-grr-server/from-released-pip.html , could you paste the stack trace you get when you try to run grr_config_updater initialize from inside the GRR_ENV virtualenv?

@Timmy0Turner
Copy link
Author

Timmy0Turner commented Mar 13, 2018

I tried with 3.2.2.0 using both methods and got the same error

Running grr_config_updater initialize
To avoid this prompting, set DEBIAN_FRONTEND=noninteractive
#################################################################
Traceback (most recent call last):
  File "/usr/local/bin/grr_config_updater", line 7, in <module>
    from grr.server.distro_entry import ConfigUpdater
  File "/usr/local/lib/python2.7/dist-packages/grr/__init__.py", line 25, in <module>
    from urllib.request import urlopen
ImportError: No module named request
dpkg: error processing package grr-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.26-0ubuntu2.1) ...
Errors were encountered while processing:
 grr-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

just want to make sure grr is written in which version of python exactly ?

@ogarod
Copy link
Contributor

ogarod commented Mar 13, 2018

The 'grr_config_updater' being run (/usr/local/bin/grr_config_updater) is not that of a virtualenv. Exit the GRR_ENV virtualenv and uninstall all GRR packages from '/usr/local/lib/python2.7/dist-packages/' (pip uninstall grr-response-server ...).

Assuming you are installing GRR from pip, if you created the virtualenv in, for instance, your home directory, the path to the right script would be: $HOME/GRR_ENV/bin/grr_config_updater.

@grrrrrrrrr
Copy link
Contributor

I think the main issue is that you have "grr" installed. I think it's trying to run the code at https://github.com/legoktm/grr/blob/master/grr/__init__.py#L25

This seems to be a system wide package and conflicts with our imports. Can you verify that uninstalling that package fixes things?

@Broctets-and-Bytes
Copy link

Broctets-and-Bytes commented Mar 13, 2018 via email

@Timmy0Turner
Copy link
Author

Fixed, thank's all

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

No branches or pull requests

4 participants