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

Error messages after installation #204

Closed
zappe opened this issue Nov 4, 2014 · 12 comments
Closed

Error messages after installation #204

zappe opened this issue Nov 4, 2014 · 12 comments

Comments

@zappe
Copy link

zappe commented Nov 4, 2014

We noticed some error messages when installing on Ubuntu 14.10.
Is there some compatability issues for that version?
Since it seems to work fine in 12.04

/opt/BFR# tail -n 30 /root/.pip/pip.log 

    return _do_download(version, download_base, to_dir, download_delay)

  File "distribute_setup.py", line 132, in _do_download

    _build_egg(egg, tarball, to_dir)

  File "distribute_setup.py", line 123, in _build_egg

    raise IOError('Could not build the egg.')

IOError: Could not build the egg.

Cleaning up...
Removing temporary dir /tmp/pip_build_root...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/glastopf
Exception information:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1229, in prepare_files
    req_to_install.run_egg_info()
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 325, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 697, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/glastopf
@glaslos
Copy link
Member

glaslos commented Nov 4, 2014

Can you try updating 'updatetools': #200

@zappe
Copy link
Author

zappe commented Nov 4, 2014

It seems to already be up to date

Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/dist-packages
Cleaning up...

@glaslos
Copy link
Member

glaslos commented Nov 4, 2014

Have you check the other solutions recommended in #200 ? Re-installing distribute?

@zappe
Copy link
Author

zappe commented Nov 10, 2014

No it got stuck on this instead

Downloading/unpacking hpfeeds (from glastopf)
Could not find any downloads that satisfy the requirement hpfeeds (from glastopf)
Some externally hosted files were ignored (use --allow-external hpfeeds to allow).
Cleaning up...
No distributions at all found for hpfeeds (from glastopf)
Storing debug log for failure in /root/.pip/pip.log

@glaslos
Copy link
Member

glaslos commented Nov 10, 2014

Have you tried installing it manually?

@zappe
Copy link
Author

zappe commented Nov 10, 2014

No, we used MHN to deploy it.

You mean like https://github.com/glastopf/glastopf/blob/master/docs/source/installation/installation_ubuntu.rst this?

@glaslos
Copy link
Member

glaslos commented Nov 10, 2014

Get the zip from here: https://github.com/rep/hpfeeds and run the setup.py

@glaslos
Copy link
Member

glaslos commented Nov 10, 2014

NHM has a ./install_hpfeeds.sh script

@zappe zappe closed this as completed Nov 23, 2014
@zappe
Copy link
Author

zappe commented Nov 23, 2014

I closed this by mistake, the installation went fine. Though I get some errors in .out log file

Traceback (most recent call last):
  File "/usr/local/bin/glastopf-runner", line 80, in <module>
    honeypot = GlastopfHoneypot(work_dir=args.workdir)
  File "/usr/local/lib/python2.7/dist-packages/glastopf/glastopf.py", line 78, in __init__
    self.dork_generator = self.setup_dork_generator(conf_parser, self.work_dir)
  File "/usr/local/lib/python2.7/dist-packages/glastopf/glastopf.py", line 145, in setup_dork_generator
    mnem_service_instance=mnemosyne_service)
  File "/usr/local/lib/python2.7/dist-packages/glastopf/modules/handlers/emulators/dork_list/dork_page_generator.py", line 60, in __init__
    self.bootstrap_dorkdb()
  File "/usr/local/lib/python2.7/dist-packages/glastopf/modules/handlers/emulators/dork_list/dork_page_generator.py", line 155, in bootstrap_dorkdb
    dorks = self.mnem_service.get_dorks()
  File "/usr/local/lib/python2.7/dist-packages/glastopf/modules/handlers/emulators/dork_list/mnem_service.py", line 35, in get_dorks
    response = sess.post(base_url + '/login', payload, timeout=timeout, verify=False)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 498, in post
    return self.request('POST', url, data=data, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 456, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 559, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 327, in send
    timeout=timeout
  File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 496, in urlopen
    body=body, headers=headers)
  File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 298, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python2.7/httplib.py", line 1001, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.7/httplib.py", line 1035, in _send_request
    self.endheaders(body)
  File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python2.7/httplib.py", line 850, in _send_output
    self.send(msg)
  File "/usr/lib/python2.7/httplib.py", line 812, in send
    self.connect()
  File "/usr/lib/python2.7/dist-packages/urllib3/connection.py", line 218, in connect
    ssl_version=resolved_ssl_version)
  File "/usr/lib/python2.7/dist-packages/urllib3/util/ssl_.py", line 124, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python2.7/ssl.py", line 350, in wrap_socket
    _context=self)
TypeError: __init__() got an unexpected keyword argument 'server_hostname'

Might be related to urllib3/urllib3#482 ?

@zappe zappe reopened this Nov 23, 2014
@glaslos
Copy link
Member

glaslos commented Nov 26, 2014

hm, might be related. Can you try to upgrade gevent and urllib3 first? pip install -U gevent urllib3

@zappe
Copy link
Author

zappe commented Nov 28, 2014

urllib3 was already up to date, but gevent was updated to the latest version.
Unfortunately it didn't solve the problem

@glaslos
Copy link
Member

glaslos commented Jan 11, 2015

It seems to be that your python ssl library and urllib3 are not compatible. Do you need the urllib3 module installed? requests ships it's own version of it. Remove ssl, urllib3 and requests. Then install requests. Make sure the files are properly removed. After uninstalling make sure that importing causes an import error. After installation, try:

import requests
r = requests.get('https://google.com')

@glaslos glaslos closed this as completed Apr 3, 2017
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

2 participants