[ 
https://issues.apache.org/jira/browse/MESOS-6409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15585922#comment-15585922
 ] 

haosdent commented on MESOS-6409:
---------------------------------

[~ronald.petty] Thank you for reporting this. It caused by `mesos-resolve` 
didn't trim output (the last {{\n}}).

I think could fix it by this way

{code}
diff --git a/src/python/cli/src/mesos/cli.py b/src/python/cli/src/mesos/cli.py
index f342992..4a9b558 100644
--- a/src/python/cli/src/mesos/cli.py
+++ b/src/python/cli/src/mesos/cli.py
@@ -51,7 +51,7 @@ def resolve(master):
         raise Exception('Failed to execute \'mesos-resolve %s\':\n%s'
                         % (master, process.stderr.read()))

-    result = process.stdout.read()
+    result = process.stdout.read().strip()
     process.stdout.close()
     process.stderr.close()
     return result
{code}

> mesos-ps - Invalid header value
> -------------------------------
>
>                 Key: MESOS-6409
>                 URL: https://issues.apache.org/jira/browse/MESOS-6409
>             Project: Mesos
>          Issue Type: Bug
>          Components: master
>    Affects Versions: 1.0.1
>         Environment: Linux
>            Reporter: Ronald Petty
>
> Fresh install on Ubuntu 16.04.  Follow posix instructions then install libz.
> user@nodea:~$ mesos-ps --master=127.0.0.1:5050
> Failed to get the master state: Invalid header value '127.0.0.1:5050\n'
> Master log shows:
> I1017 21:08:28.685926 70112 http.cpp:381] HTTP GET for /master/state from 
> 127.0.0.1:50526 with User-Agent='Mozilla/5.0 (X11; Ubuntu; Linux x86_64; 
> rv:49.0) Gecko/20100101 Firefox/49.0'
> If you use 'curl' it works:
> curl localhost:5050/state.json
> I also tried 127.0.0.1 and http, also errors out.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to