<div dir="ltr">Hi All,<div><br></div><div>I am Unable to run barbican CURL commands after starting/restarting barbican using the service file.</div><div><br></div><div>Used below command to run barbican service file : </div><div>(wheel)[root@controller-01 service]# systemctl restart barbican-api.service</div><div><br></div><div>When I tried executing the command to create the secret , I did not get any response from the server .</div><div><br></div><div><div>(wheel)[root@controller-01 service]# ps -ef | grep barbican</div><div>barbican 1104 1 0 22:56 ? 00:00:00 /opt/barbican/bin/uwsgi --master --emperor /etc/barbican/vassals</div><div>barbican 1105 1104 0 22:56 ? 00:00:00 /opt/barbican/bin/uwsgi --master --emperor /etc/barbican/vassals</div><div>barbican 1106 1105 0 22:56 ? 00:00:00 /opt/barbican/bin/uwsgi --ini barbican-api.ini</div><div>root 3195 28132 0 23:03 pts/0 00:00:00 grep --color=auto barbican</div><div><br></div><div>Checked the status of the barbican-api.service file and got the following response :</div><div><br></div><div><div>(wheel)[root@controller-01 service]# systemctl status barbican-api.service -l</div><div>barbican-api.service - Barbican Key Management API server</div><div> Loaded: loaded (/usr/lib/systemd/system/barbican-api.service; enabled)</div><div> Active: active (running) since Tue 2015-09-15 22:56:12 UTC; 2min 17s ago</div><div> Main PID: 1104 (uwsgi)</div><div> Status: "The Emperor is governing 1 vassals"</div><div> CGroup: /system.slice/barbican-api.service</div><div> ├─1104 /opt/barbican/bin/uwsgi --master --emperor /etc/barbican/vassals</div><div> ├─1105 /opt/barbican/bin/uwsgi --master --emperor /etc/barbican/vassals</div><div> └─1106 /opt/barbican/bin/uwsgi --ini barbican-api.ini</div><div><br></div><div><b>Sep 15 22:58:30 controller-01 uwsgi[1104]: APP, pipeline[-1], global_conf)</b></div><div><b>Sep 15 22:58:30 controller-01 uwsgi[1104]: File "/opt/barbican/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 458, in get_context</b></div><div><b>Sep 15 22:58:30 controller-01 uwsgi[1104]: section)</b></div><div><b>Sep 15 22:58:30 controller-01 uwsgi[1104]: File "/opt/barbican/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 517, in _context_from_explicit</b></div><div><b>Sep 15 22:58:30 controller-01 uwsgi[1104]: value = import_string(found_expr)</b></div><div><b>Sep 15 22:58:30 controller-01 uwsgi[1104]: File "/opt/barbican/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 22, in import_string</b></div><div><b>Sep 15 22:58:30 controller-01 uwsgi[1104]: return pkg_resources.EntryPoint.parse("x=" + s).load(False)</b></div><div><b>Sep 15 22:58:30 controller-01 uwsgi[1104]: File "/opt/barbican/lib/python2.7/site-packages/pkg_resources.py", line 2265, in load</b></div><div><b>Sep 15 22:58:30 controller-01 uwsgi[1104]: raise ImportError("%r has no %r attribute" % (entry,attr))</b></div><div><b>Sep 15 22:58:30 controller-01 uwsgi[1104]: ImportError: <module 'barbican.api.app' from '/opt/barbican/lib/python2.7/site-packages/barbican/api/app.pyc'> has no 'create_main_app_v1' attribute</b></div></div><div><br></div><div><br></div><div>Please find contents of barbican-api. service file :<br></div><div><br></div><div><div>[Unit]</div><div>Description=Barbican Key Management API server</div><div>After=syslog.target network.target</div><div><br></div><div>[Service]</div><div>Type=simple</div><div>NotifyAccess=all</div><div>User=barbican</div><div>KillSignal=SIGINT</div><div>ExecStart={{ barbican_virtualenv_path }}/bin/uwsgi --master --emperor /etc/barbican/vassals</div><div>PrivateTmp=true</div><div><br></div><div>[Install]</div><div>WantedBy=multi-user.target</div></div><div><b><br></b></div><div><div>Even though barbican is running successfully , we are unable to run the CURL command . Would like to know if the "I<b>mportError: <module 'barbican.api.app' from '/opt/barbican/lib/python2.7/site-packages/barbican/api/app.pyc'> has no 'create_main_app_v1' attribute" </b>is the cause for not being able to execute the CURL commands.</div><div><b><br></b></div><div>How do we debug<b> </b>I<b>mportError: <module 'barbican.api.app' from '/opt/barbican/lib/python2.7/site-packages/barbican/api/app.pyc'> has no 'create_main_app_v1' attribute"</b></div><div>And also I think that barbican restart is not successful.<br></div></div><div><br></div><div>Any help would highly be appreciated .</div><div><br></div><div>But I am able tor run the command "/bin/uwsgi --master --emperor /etc/barbican/vassals" manually and was able to run the CURL commands .</div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div><em>Thanks and Regards,</em></div>
<div><em>Asha Seshagiri</em></div></div>
</div></div>