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

HTTPS Problem #63

Closed
ghost opened this issue May 18, 2016 · 6 comments
Closed

HTTPS Problem #63

ghost opened this issue May 18, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented May 18, 2016

I've got the followig error message on my testserver with smashbox (Ubuntu LTS 16.04 and 14.04 LTS) running the command: bin/smash lib/test_basicSync.py. I've installed the requirements and the owncloud-cmd tool. I want to test a server with a [ADRESS] in another building runnig OC 9.0.2. SSH Access is possible.

SUMMARY:smash.:runid: 160518-170533
SUMMARY:smash.:URL: https://None:***@[ADRESS]/owncloud/remote.php/webdav/
SUMMARY:smash.:Running iteration 1
SUMMARY:smash.:running lib/test_basicSync.py in /home/test/smashbox/test_basicSync as test_basicSync default
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): [ADRESS]
/home/test/.local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:821: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
Traceback (most recent call last):
  File "python/smashbox/multiprocessing_engine.py", line 309, in <module>
    _smash_.run()
  File "python/smashbox/multiprocessing_engine.py", line 188, in run
    smashbox.utilities.setup_test()        
  File "/home/test/smashbox/python/smashbox/utilities/__init__.py", line 68, in setup_test
    reset_owncloud_account(num_test_users=config.oc_number_test_users)
  File "/home/test/smashbox/python/smashbox/utilities/__init__.py", line 110, in reset_owncloud_account
    delete_owncloud_account(config.oc_account_name)
  File "/home/test/smashbox/python/smashbox/utilities/__init__.py", line 214, in delete_owncloud_account
    oc_api.login(config.oc_admin_user, config.oc_admin_password)
  File "/home/test/smashbox/src/pyocclient/owncloud/owncloud.py", line 360, in login
    raise e
owncloud.owncloud.HTTPResponseError: HTTP error: 401
SUMMARY:smash.:Elapsed time: 2s (0:00:02.194303)
CRITICAL:smash.:Aborting run -- non-zero exit code (1)

Any ideas? The help website is not very helpful.

@labkode
Copy link
Member

labkode commented May 18, 2016

@Xilentura you are receiving a 401 (Unauthenticated). Inside your connection url https://None:***@[ADRESS]/owncloud/remote.php/webdav/ the username is empty (None), thus the 401. ownCloud Sync Protocol (hence Smashbox) only works over HTTP/HTTPS, not over SSH.

@ghost
Copy link
Author

ghost commented May 18, 2016

@labkode Thank you very much for your fast reply!! I've changed the username to a user exisiting at the owncloud server (user: smashbox). Same HTTP error.

SUMMARY:smash.:runid: 160518-181114
SUMMARY:smash.:URL: https://smashbox:***@[ADRESS]/owncloud/remote.php/webdav/
SUMMARY:smash.:Running iteration 1
SUMMARY:smash.:running lib/test_basicSync.py in /home/test/smashbox/test_basicSync as smashbox default
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): [ADRESS]
/home/test/.local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:821: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html
  InsecureRequestWarning)
Traceback (most recent call last):
  File "python/smashbox/multiprocessing_engine.py", line 309, in <module>
    _smash_.run()
  File "python/smashbox/multiprocessing_engine.py", line 188, in run
    smashbox.utilities.setup_test()        
  File "/home/test/smashbox/python/smashbox/utilities/__init__.py", line 68, in setup_test
    reset_owncloud_account(num_test_users=config.oc_number_test_users)
  File "/home/test/smashbox/python/smashbox/utilities/__init__.py", line 110, in reset_owncloud_account
    delete_owncloud_account(config.oc_account_name)
  File "/home/test/smashbox/python/smashbox/utilities/__init__.py", line 214, in delete_owncloud_account
    oc_api.login(config.oc_admin_user, config.oc_admin_password)
  File "/home/test/smashbox/src/pyocclient/owncloud/owncloud.py", line 360, in login
    raise e
owncloud.owncloud.HTTPResponseError: HTTP error: 401
SUMMARY:smash.:Elapsed time: 2s (0:00:02.249909)
CRITICAL:smash.:Aborting run -- non-zero exit code (1)

Thanks for the information about SSH and HTTPS, but I wanted to point out, that I have a working SSH connection, because I might need it for the command in the smashbox etc/smashbox.conf

# how to invoke shell commands on the server
# for localhost there is no problem - leave it blank
# for remote host it may be set like this: "ssh -t -l root $oc_server"
# note: configure ssh for passwordless login 
# note: -t option is to make it possible to run sudo
oc_server_shell_cmd = "ssh -t -l root $oc_server"

If you have any idea why, please let me know. I'm stuck. I've tried the name of the server [e.g. example.owncloud.com] and the ip adress as well [e.g. 192.168.2.2] in the config. I have also imported the owncloud server certificate at the smashbox server.

@moscicki
Copy link
Contributor

What about specifying to ignore certificate verification: https://github.com/owncloud/pyocclient/blob/master/owncloud/owncloud.py#L313

@PVince81, any other idea?

@ghost
Copy link
Author

ghost commented May 19, 2016

Well... I don't know what to say... I'm terribly sorry about the solution. Error was:

oc_api.login(config.oc_admin_user, config.oc_admin_password)
File "/home/test/smashbox/src/pyocclient/owncloud/owncloud.py", line 360, in login raise e

So I checked the password and had to assert that I have mixed a "l" with an "I", so the password was wrong. Sorry for this - I will use monospace fonts for the rest of my life. Thank you for your time - but wait... there is another error. New issue.

@ghost ghost closed this as completed May 19, 2016
@moscicki
Copy link
Contributor

No problem -- the problem solved! ;-)

BTW. Could you tell me briefly how you came about to using smashbox? What do you try to achieve?

@ghost
Copy link
Author

ghost commented May 19, 2016

@moscicki I need a "penetration" tool for my owncloud instance, so I will be able to simulate heavy load on the server and smashbox seems to be the perfect tool for this.

This issue was closed.
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