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

OCSResponseError 102 - OCS error: 102 #64

Open
ghost opened this issue May 19, 2016 · 4 comments
Open

OCSResponseError 102 - OCS error: 102 #64

ghost opened this issue May 19, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented May 19, 2016

Overwiev

Smashbox Test System

  • Ubuntu 16.04 LTS (GNU/Linux 4.4.0-22-generic x86_64)
  • Owncloudcmd version 2.1.1
  • Python 2.7.11+
  • Smashbox via Github
  • requirements.txt installed
  • Certificate imported from owncloud system
  • Network 1 (e.g. 192.168.1.2)
  • SSH key exported to owncloud system, ssh login possible without password
  • urllib3 and certifi installed
  • edited etc/smashbox.conf
oc_account_password <- random password
oc_server <- IP address
oc_root <- subfolder
oc_ssl_enabled <- SSL is used
oc_sync_cmd <- adjusted path to owncloudcmd
oc_admin_user <- admin user
oc_admin_password <- admin password (working)

Owncloud System

  • FreeBSD 10.3-RELEASE
  • Owncloud 9.0.2 (stable)
  • HTTPS configuration with official certificate
  • PHP 5.6.21
  • Apache/2.4.20
  • other network 2 (e.g. 192.167.2.54)

Problem

Used tests

  • bin/smash lib/test_basicSync.py

Expected behavior

  • Tests are working fine

Actual behavior

SUMMARY:smash.:runid: 160519-145854
SUMMARY:smash.:URL: https://smashbox:***@ [adress of owncloud server]/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 of owncloud server]
/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)
/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)
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): [adress of owncloud server]
/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)
/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 111, in reset_owncloud_account
    create_owncloud_account(config.oc_account_name, config.oc_account_password)
  File "/home/test/smashbox/python/smashbox/utilities/__init__.py", line 185, in create_owncloud_account
    oc_api.create_user(username, password)
  File "/home/test/smashbox/src/pyocclient/owncloud/owncloud.py", line 946, in create_user
    self.__check_ocs_status(tree, [100])
  File "/home/test/smashbox/src/pyocclient/owncloud/owncloud.py", line 1589, in __check_ocs_status
    raise OCSResponseError(r)
owncloud.owncloud.OCSResponseError: OCS error: 102
SUMMARY:smash.:Elapsed time: 2s (0:00:02.522678)
CRITICAL:smash.:Aborting run -- non-zero exit code (1)

Maybe somebody can give me a hint or know this problem? This will be great! Another question: Will smashbox work on FreeBSD? I got a working configuration with Ubuntu Owncloud server, but not with a FreeBSD server.

@nickvergessen
Copy link
Contributor

Mostlikely you didn't enable the provisioning api app.
I already created a PR to check for that a long time ago, but it's still waiting:
#52

@ghost
Copy link
Author

ghost commented Jun 1, 2016

@nickvergessen Found it - provisioning api app was and is enabled.

@nickvergessen
Copy link
Contributor

Okay had a look again 102 means User already exists.
Did you set oc_account_reset_procedure = "delete" in your smashbox.conf?

@ghost
Copy link
Author

ghost commented Jun 1, 2016

@nickvergessen Yes, I used the example config with several modifications.

# this is the top directory where all local working files are kept (test working direcotires, test logs, test data, temporary filesets, ..)
smashdir = "~/smashbox"

# name of the account used for testing
# if None then account name is chosen automatically (based on the test name)
oc_account_name="smashbox"
#oc_account_name=None

# default number of users for tests involving multiple users (user number is appended to the oc_account_name)
# this only applies to the tests involving multiple users
oc_number_test_users=20

# name of the group used for testing
oc_group_name=None

# default number of groups for tests involving multiple groups (group number is appended to the oc_group_name)
# this only applies to the tests involving multiple groups
oc_number_test_groups=5

# password for test accounts: all test account will have the same password
# if not set then it's an error
oc_account_password="demo"

# owncloud test server
# if left blank or "localhost" then the real hostname of the localhost will be set
oc_server = 'ip-adress of server'



# root of the owncloud installation as visible in the URL
oc_root = 'owncloud'

# webdav endpoint URI within the oc_server
import os.path
oc_webdav_endpoint = os.path.join(oc_root,'remote.php/webdav') # standard owncloud server

# target folder on the server (this may not be compatible with all tests)
oc_server_folder = ''

# should we use protocols with SSL (https, ownclouds)
oc_ssl_enabled = True

# 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"

# Data directory on the owncloud server.
#
oc_server_datadirectory = os.path.join('/usr/local/www/owncloud/data')

# a path to server side tools (create_user.php, ...)
#
# it may be specified as relative path "dir" and then resolves to
# <smashbox>/dir where <smashbox> is the top-level of of the tree
# containing THIS configuration file
#

oc_server_tools_path = "server-tools"

# a path to ocsync command with options
# this path should work for all client hosts
#
# it may be specified as relative path "dir" and then resolves to
# <smashbox>/dir where <smashbox> is the top-level of of the tree
# containing THIS configuration file
#
#oc_sync_cmd = "client/build/mirall/bin/owncloudcmd --trust"
oc_sync_cmd = "/usr/bin/owncloudcmd --trust" [note: path to the owncloudcmd]

# number of times to repeat ocsync run every time
oc_sync_repeat = 1

####################################

# unique identifier of your test run
# if None then the runid is chosen automatically (and stored in this variable)
runid = None

# if True then the local working directory path will have the runid added to it automatically
workdir_runid_enabled=False

# if True then the runid will be part of the oc_account_name automatically
oc_account_runid_enabled=False

####################################

# this defines the default account cleanup procedure
#   - "delete": delete account if exists and then create a new account with the same name
#   - "keep": don't delete existing account but create one if needed
#
# these are not implemeted yet:
#   - "sync_delete": delete all files via a sync run
#   - "webdav_delete": delete all files via webdav DELETE request
#   - "filesystem_delete": delete all files directly on the server's filesystem
oc_account_reset_procedure = "delete"

# this defined the default local run directory reset procedure
#   - "delete": delete everything in the local run directory prior to running the test
#   - "keep": keep all files (from the previous run)
rundir_reset_procedure = "delete"

#web_user = "www-data"
web_user = "www"

oc_admin_user = "admin_user"
oc_admin_password = "admin_password"

# cleanup imported namespaces
del os

# Verbosity of curl client.
# If none then verbosity is on when smashbox run in --debug mode.
# set it to True or False to override
#
pycurl_verbose = True

# scp port to be used in scp commands, used primarily when copying over the server log file
scp_port = 22

# user that can r+w the owncloud.log file (needs to be configured for passwordless login)
#oc_server_log_user = "www-data"
oc_server_log_user = "www" [note: www because of the www user in FreeBSD, www-data is used in ubuntu or linux)

# Reset the server log file and verify that no exceptions and other known errors have been logged
oc_check_server_log = False

Maybe this helps...

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

1 participant