Jump to content

Help with Python on Linux Webserver

RustyGuts

Hello all, will try to keep this short. 

 

I am trying to mount a backblaze bucket into a linux file directory. S3, Google cloud, Open Stack, Backblaze and more use a piece of software called FUSE, this is available on Gihub

 

The instructions seem straightforward enough. I have installed b2 FUSE and have navigated into the directory. However when I try to apply my BackBlaze credentials, I get lots of errors. 

 

python b2fuse.py --account_id myaccountid --application_key appkey --bucket_id bucketid /mnt/bb

 

This snippet should authenticate with Backblaze and mount my bucket within /mnt/bb. However I recieve this error. 

python b2fuse.py /mnt/bb
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:334: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:132: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
Traceback (most recent call last):
  File "b2fuse.py", line 112, in <module>
    config["enableHashfiles"], config["tempFolder"], config["useDisk"]
  File "/home/brendan/backblaze/b2fuse_main.py", line 54, in __init__
    self.api.authorize_account('production', account_id, application_key)
  File "/usr/local/lib/python2.7/dist-packages/logfury/v0_1/trace_call.py", line 84, in wrapper
    return function(*wrapee_args, **wrapee_kwargs)
  File "build/bdist.linux-x86_64/egg/b2/api.py", line 124, in authorize_account
  File "build/bdist.linux-x86_64/egg/b2/raw_api.py", line 126, in authorize_account
  File "build/bdist.linux-x86_64/egg/b2/raw_api.py", line 122, in _post_json
  File "build/bdist.linux-x86_64/egg/b2/b2http.py", line 202, in post_json_return_json
  File "build/bdist.linux-x86_64/egg/b2/b2http.py", line 175, in post_content_return_json
  File "build/bdist.linux-x86_64/egg/b2/b2http.py", line 102, in _translate_and_retry
  File "build/bdist.linux-x86_64/egg/b2/b2http.py", line 51, in _translate_errors
b2.exception.InvalidAuthToken: Invalid authorization token. Server said: Invalid authorization token (bad_auth_token)

I'm not sure I understand Python enough to recognize where I am going wrong. Any help would be greatly appreciated

Link to comment
Share on other sites

Link to post
Share on other sites

Have you even read the warning? It literally tells you what to do. 

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×