Startup error - invalid return character

(Gowrish) #1

Hi Experts,

I just started setting stackstrom and I see below mag could you please help

Error Invalid return character or leading space in header : X-Auth-Token.

I checked enable is set to True still same problem

(Lindsay Hill) #2

My guess is that you have a proxy somewhere in your environment?

Make sure it is disabled for localhost & 127.0.0.1.

(Gowrish) #3

Thank you Lindsay for your help, I have removed proxy and I am seeing below error after removing proxy.

WARNING - Auth API server is not available, skipping authentication.
ERROR: HTTPConnectionPool(host=‘127.0.0.1’, port=9101): Max retries exceeded with url: /v1/actions?include_attributes=ref%2Cpack%2Cdescription (Caused by NewConnectionError(’<requests.packages.urllib3.connection.HTTPConnection object at 0x7fba0bb87ad0>: Failed to establish a new connection: [Errno 111] Connection refused’,))

(Gowrish) #4

I did reqork on st2.conf file and I am seeing below error -

WARNING - Auth API server is not available, skipping authentication.
ERROR: (‘Connection aborted.’, error(104, ‘Connection reset by peer’))

(Gowrish) #5

Error -

st2 action list
2019-04-09 11:47:25,284 WARNING - Auth API server is not available, skipping authentication.
ERROR: HTTPConnectionPool(host=‘127.0.0.1’, port=9101): Max retries exceeded with url: /v1/actions?include_attributes=ref%2Cpack%2Cdescription (Caused by NewConnectionError(’<requests.packages.urllib3.connection.HTTPConnection object at 0x7f4da985fad0>: Failed to establish a new connection: [Errno 111] Connection refused’,))

st2.conf file is as below - this is a docker set up -

# System-wide configuration

[api]
# Host and port to bind the API server.
host = 127.0.0.1
port = 9101
logging = /etc/st2/logging.api.conf
mask_secrets = True
# allow_origin is required for handling CORS in st2 web UI.
# allow_origin = http://myhost1.example.com:3000,http://myhost2.example.com:3000

[stream]
logging = /etc/st2/logging.stream.conf

[sensorcontainer]
logging = /etc/st2/logging.sensorcontainer.conf

[rulesengine]
logging = /etc/st2/logging.rulesengine.conf

[actionrunner]
logging = /etc/st2/logging.actionrunner.conf
virtualenv_opts = --always-copy

[resultstracker]
logging = /etc/st2/logging.resultstracker.conf

[notifier]
logging = /etc/st2/logging.notifier.conf

[exporter]
logging = /etc/st2/logging.exporter.conf

[garbagecollector]
logging = /etc/st2/logging.garbagecollector.conf

[timersengine]
logging = /etc/st2/logging.timersengine.conf

[auth]
host = 127.0.0.1
port = 9100
use_ssl = False
debug = False
enable = True
logging = /etc/st2/logging.auth.conf

mode = standalone

# Note: Settings below are only used in "standalone" mode
backend = flat_file
backend_kwargs = {"file_path": "/etc/st2/htpasswd"}

# Base URL to the API endpoint excluding the version (e.g. http://myhost.net:9101/)
api_url =http://127.0.0.1:9101

[system]
base_path = /opt/stackstorm

[webui]
# webui_base_url = https://mywebhost.domain

[syslog]
host = 127.0.0.1
port = 514
facility = local7
protocol = udp

[log]
excludes = requests,paramiko
redirect_stderr = False
mask_secrets = True

[system_user]
user = stanley
ssh_key_file = /home/stanley/.ssh/stanley_rsa

[messaging]
url = amqp://guest:guest@127.0.0.1:5671/
ssl = True

[ssh_runner]
remote_dir = /tmp

[workflow_engine]
logging = /etc/st2/logging.workflowengine.conf

[scheduler]
logging = /etc/st2/logging.scheduler.conf



[keyvalue]
encryption_key_path = /etc/st2/keys/datastore_key.json


[mistral]
api_url = http://127.0.0.1:9101
v2_base_url = http://127.0.0.1:8989/v2


[coordination]
url = redis://:aGWDZSjDP2AZTuUp++zps3Ji@redis:6379


[database]
host = mongo
port = 27017
db_name = st2
username = st2admin
password = st2admin

[handler_fileHandler]
class=handlers.RotatingFileHandler
level=DEBUG
formatter=verboseConsoleFormatter
args=("logs/st2api.log", "a", 100000000, 5)
(Lindsay Hill) #6

Sounds like the st2api service is not running

Might be worth backing up a second here. How is your system installed, and what configuration changes have you made?

(Gowrish) #7

I have followed documentation on docker installation steps.
Have pulled images post docker and docker compose installation and started docker images.

Configuration changes in st2.conf file is shared in above post.

(Lindsay Hill) #8

I haven’t gone through it line by line and compared it with a default setup. What changes have you made, and why?

And did you check if services were running? Based on an earlier error, st2api is not running.

(Gowrish) #9

These are the changes I made from default config file

[messaging] # changed as below
< url = amqp://guest:guest@127.0.0.1:5671/
< ssl = True

[database] # added below lines
db_name = st2
username = st2admin
password = st2admin

[handler_fileHandler]
class=handlers.RotatingFileHandler
level=DEBUG
formatter=verboseConsoleFormatter
args=(“logs/st2api.log”, “a”, 100000000, 5)

API services are running however

st2api PID: 26914
st2api PID: 26989

However mistral API not running

mistral-server is not running.
mistral.api is not running.

Also I am seeing a messgae as initctl: Job failed to start

Would this be reason