{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/py-evm/issues/950","repository_url":"https://api.github.com/repos/ethereum/py-evm","labels_url":"https://api.github.com/repos/ethereum/py-evm/issues/950/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/py-evm/issues/950/comments","events_url":"https://api.github.com/repos/ethereum/py-evm/issues/950/events","html_url":"https://github.com/ethereum/py-evm/issues/950","id":335103582,"node_id":"MDU6SXNzdWUzMzUxMDM1ODI=","number":950,"title":"Trinity Attach Not Working (root vs user?)","user":{"login":"MysticRyuujin","id":8877131,"node_id":"MDQ6VXNlcjg4NzcxMzE=","avatar_url":"https://avatars0.githubusercontent.com/u/8877131?v=4","gravatar_id":"","url":"https://api.github.com/users/MysticRyuujin","html_url":"https://github.com/MysticRyuujin","followers_url":"https://api.github.com/users/MysticRyuujin/followers","following_url":"https://api.github.com/users/MysticRyuujin/following{/other_user}","gists_url":"https://api.github.com/users/MysticRyuujin/gists{/gist_id}","starred_url":"https://api.github.com/users/MysticRyuujin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MysticRyuujin/subscriptions","organizations_url":"https://api.github.com/users/MysticRyuujin/orgs","repos_url":"https://api.github.com/users/MysticRyuujin/repos","events_url":"https://api.github.com/users/MysticRyuujin/events{/privacy}","received_events_url":"https://api.github.com/users/MysticRyuujin/received_events","type":"User","site_admin":false},"labels":[{"id":815420353,"node_id":"MDU6TGFiZWw4MTU0MjAzNTM=","url":"https://api.github.com/repos/ethereum/py-evm/labels/Trinity","name":"Trinity","color":"d1087d","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-23T14:10:42Z","updated_at":"2018-06-23T15:55:54Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"* py-evm Version: 0.1.0a11\r\n* OS: Ubuntu 17.04\r\n* Python Version (python --version): Python 3.6.3\r\n* Environment (output of `pip freeze`):\r\n```\r\naiohttp==2.3.10\r\nasn1crypto==0.24.0\r\nasync-lru==0.1.0\r\nasync-timeout==3.0.0\r\nattrdict==2.0.0\r\nbackcall==0.1.0\r\nbumpversion==0.5.3\r\ncertifi==2018.4.16\r\ncffi==1.11.5\r\nchardet==3.0.4\r\ncoincurve==7.1.0\r\ncommand-not-found==0.3\r\ncryptography==2.2.2\r\ncytoolz==0.9.0.1\r\ndecorator==4.3.0\r\ndistro-info==0.17\r\neth-abi==1.1.1\r\neth-account==0.2.3\r\neth-bloom==1.0.0\r\neth-hash==0.1.4\r\neth-keyfile==0.5.1\r\neth-keys==0.2.0b3\r\neth-pm==0.1.0a17\r\neth-rlp==0.1.2\r\neth-tester==0.1.0b26\r\neth-utils==1.0.3\r\nhexbytes==0.1.0\r\nidna==2.7\r\nidna-ssl==1.0.1\r\nipython==6.4.0\r\nipython-genutils==0.2.0\r\njedi==0.12.0\r\njsonschema==2.6.0\r\nkeyring==10.4.0\r\nkeyrings.alt==2.2\r\nlanguage-selector==0.1\r\nlru-dict==1.1.6\r\nlxml==4.2.1\r\nmultidict==4.3.1\r\nnetdisco==1.5.0\r\nnetifaces==0.10.7\r\nparsimonious==0.8.0\r\nparso==0.2.1\r\npexpect==4.6.0\r\npickleshare==0.7.4\r\npkginfo==1.4.2\r\nplyvel==1.0.4\r\nprompt-toolkit==1.0.15\r\nptyprocess==0.6.0\r\npy-ecc==1.4.2\r\npy-evm==0.2.0a26\r\npy-solc==2.2.0\r\npycparser==2.18\r\npycrypto==2.6.1\r\npycryptodome==3.6.3\r\npyethash==0.1.27\r\nPygments==2.2.0\r\npygobject==3.24.1\r\npysha3==1.0.2\r\npython-apt==1.4.0b3\r\npython-dateutil==2.7.3\r\npyxdg==0.25\r\nPyYAML==3.12\r\nrequests==2.19.1\r\nrequests-toolbelt==0.8.0\r\nrlp==1.0.1\r\nSecretStorage==2.3.1\r\nsemantic-version==2.6.0\r\nsimplegeneric==0.8.1\r\nsix==1.11.0\r\nssh-import-id==5.7\r\ntoolz==0.9.0\r\ntqdm==4.23.4\r\ntraitlets==4.3.2\r\ntrie==1.3.7\r\ntrinity==0.1.0a11\r\ntwine==1.11.0\r\nufw==0.35\r\nunattended-upgrades==0.1\r\nuPnPClient==0.0.8\r\nurllib3==1.23\r\nwcwidth==0.1.7\r\nweb3==4.4.0\r\nwebsockets==5.0.1\r\nyarl==1.2.6\r\nzeroconf==0.20.0\r\n```\r\n\r\n### What is wrong?\r\n\r\nI'm running Trinity as root via Supervisor. I'm using `sudo -i` to elevate to root with root environment. I then run `trinity attach` and the first thing that I notice is that it starts logging to my user account home directory `/home/chase/.local/` instead of `/root/.local/` and none of the commands seem to work.\r\n\r\nIs this due to how I'm running Trinity and trying to attach with `sudo -i`? or something else?\r\n\r\n```\r\nroot@trinity01:~# trinity attach\r\n    INFO  06-23 09:01:40     logging  Trinity DEBUG log file is created at /home/chase/.local/share/trinity/mainnet/logs/trinity.log\r\nTrinity Console\r\n---------------\r\nAn instance of Web3 connected to the running chain is available as the `w3` variable\r\n\r\nIn [1]: w3.admin\r\nOut[1]: <web3.admin.Admin at 0x7f0ab3f66be0>\r\n\r\nIn [2]: w3.admin.nodeInfo\r\n---------------------------------------------------------------------------\r\nFileNotFoundError                         Traceback (most recent call last)\r\n<ipython-input-2-06ccd98facbe> in <module>()\r\n----> 1 w3.admin.nodeInfo\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/admin.py in nodeInfo(self)\r\n     16     @property\r\n     17     def nodeInfo(self):\r\n---> 18         return self.web3.manager.request_blocking(\"admin_nodeInfo\", [])\r\n     19 \r\n     20     @property\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/manager.py in request_blocking(self, method, params)\r\n    105         Make a synchronous request using the provider\r\n    106         \"\"\"\r\n--> 107         response = self._make_request(method, params)\r\n    108 \r\n    109         if \"error\" in response:\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/manager.py in _make_request(self, method, params)\r\n     88             self.logger.debug(\"Making request. Method: %s\", method)\r\n     89             try:\r\n---> 90                 return request_func(method, params)\r\n     91             except CannotHandleRequest:\r\n     92                 continue\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/middleware/gas_price_strategy.py in middleware(method, params)\r\n     16                     transaction = assoc(transaction, 'gasPrice', generated_gas_price)\r\n     17                     return make_request(method, [transaction])\r\n---> 18         return make_request(method, params)\r\n     19     return middleware\r\n\r\n/usr/local/lib/python3.6/dist-packages/cytoolz/functoolz.pyx in cytoolz.functoolz.curry.__call__()\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/middleware/formatting.py in apply_formatters(method, params, make_request, request_formatters, result_formatters, error_formatters)\r\n     48         response = make_request(method, formatted_params)\r\n     49     else:\r\n---> 50         response = make_request(method, params)\r\n     51 \r\n     52     if 'result' in response and method in result_formatters:\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/middleware/attrdict.py in middleware(method, params)\r\n     16     \"\"\"\r\n     17     def middleware(method, params):\r\n---> 18         response = make_request(method, params)\r\n     19 \r\n     20         if 'result' in response:\r\n\r\n/usr/local/lib/python3.6/dist-packages/cytoolz/functoolz.pyx in cytoolz.functoolz.curry.__call__()\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/middleware/formatting.py in apply_formatters(method, params, make_request, request_formatters, result_formatters, error_formatters)\r\n     48         response = make_request(method, formatted_params)\r\n     49     else:\r\n---> 50         response = make_request(method, params)\r\n     51 \r\n     52     if 'result' in response and method in result_formatters:\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/middleware/normalize_errors.py in middleware(method, params)\r\n      7 def normalize_errors_middleware(make_request, web3):\r\n      8     def middleware(method, params):\r\n----> 9         result = make_request(method, params)\r\n     10 \r\n     11         # As of v1.8, Geth returns errors when you request a\r\n\r\n/usr/local/lib/python3.6/dist-packages/cytoolz/functoolz.pyx in cytoolz.functoolz.curry.__call__()\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/middleware/formatting.py in apply_formatters(method, params, make_request, request_formatters, result_formatters, error_formatters)\r\n     48         response = make_request(method, formatted_params)\r\n     49     else:\r\n---> 50         response = make_request(method, params)\r\n     51 \r\n     52     if 'result' in response and method in result_formatters:\r\n\r\n/usr/local/lib/python3.6/dist-packages/cytoolz/functoolz.pyx in cytoolz.functoolz.curry.__call__()\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/middleware/formatting.py in apply_formatters(method, params, make_request, request_formatters, result_formatters, error_formatters)\r\n     48         response = make_request(method, formatted_params)\r\n     49     else:\r\n---> 50         response = make_request(method, params)\r\n     51 \r\n     52     if 'result' in response and method in result_formatters:\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/providers/ipc.py in make_request(self, method, params)\r\n    201         request = self.encode_rpc_request(method, params)\r\n    202 \r\n--> 203         with self._lock, self._socket as sock:\r\n    204             try:\r\n    205                 sock.sendall(request)\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/providers/ipc.py in __enter__(self)\r\n     43 \r\n     44         if not self.sock:\r\n---> 45             self.sock = self._open()\r\n     46         return self.sock\r\n     47 \r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/providers/ipc.py in _open(self)\r\n     56 \r\n     57     def _open(self):\r\n---> 58         return get_ipc_socket(self.ipc_path)\r\n     59 \r\n     60     def reset(self):\r\n\r\n/usr/local/lib/python3.6/dist-packages/web3/providers/ipc.py in get_ipc_socket(ipc_path, timeout)\r\n     27     else:\r\n     28         sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)\r\n---> 29         sock.connect(ipc_path)\r\n     30         sock.settimeout(timeout)\r\n     31         return sock\r\n\r\nFileNotFoundError: [Errno 2] No such file or directory\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ethereum/py-evm/issues/comments/399688561","html_url":"https://github.com/ethereum/py-evm/issues/950#issuecomment-399688561","issue_url":"https://api.github.com/repos/ethereum/py-evm/issues/950","id":399688561,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTY4ODU2MQ==","user":{"login":"cburgdorf","id":521109,"node_id":"MDQ6VXNlcjUyMTEwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/521109?v=4","gravatar_id":"","url":"https://api.github.com/users/cburgdorf","html_url":"https://github.com/cburgdorf","followers_url":"https://api.github.com/users/cburgdorf/followers","following_url":"https://api.github.com/users/cburgdorf/following{/other_user}","gists_url":"https://api.github.com/users/cburgdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/cburgdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cburgdorf/subscriptions","organizations_url":"https://api.github.com/users/cburgdorf/orgs","repos_url":"https://api.github.com/users/cburgdorf/repos","events_url":"https://api.github.com/users/cburgdorf/events{/privacy}","received_events_url":"https://api.github.com/users/cburgdorf/received_events","type":"User","site_admin":false},"created_at":"2018-06-23T15:55:54Z","updated_at":"2018-06-23T15:55:54Z","author_association":"CONTRIBUTOR","body":"Cool! Happy it's working now. However, I think this issue actually brings up a good point: Maybe `trinity attach` should directly print out a warning if it doesn't find the ipc pipes (instead of acting as if everything is ok and then blowing up on `w3` usage).\r\n\r\n@pipermerriam @carver @gsalgado what do you think? Leaving this issue open to clarify that first."}}
{"actor":{"display_login":"cburgdorf"}}