Nutanix X-Ray

Welcome to the Nutanix NEXT community. To get started please read our short welcome post. Thanks!

cancel
Showing results for 
Search instead for 
Did you mean: 

Configure proxy for login

SOLVED Go to solution
Adventurer

Configure proxy for login

Hi,

 

I got the x-ray vm working and reachable via network but now I need to set up a proxy for internet connectivity as my.nutanix credentials seem to be required to login.

 

Thanks

 

Sergio

Tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: Configure proxy for login

I think you might need to set the environment variables in /etc/environment since the xray_server is started as a service.

 

So your /etc/environment file should contain:

http_proxy="x.x.x.x:yyyy"

https_proxy="x.x.x.x:yyyy"

no_proxy="localhost, 127.0.0.1"

6 REPLIES
Adventurer

Re: Configure proxy for login

Anyone? I'm stuck at login. Am I missing something?

 

Any help would be appreciated.

 

Thanks

 

Sergio

 

 

Moderator

Re: Configure proxy for login

Sorry I didn't see this message until today. Have you tried logging into the VM and configuring a proxy like: http://www.thesysadminhimself.com/2013/08/configuring-web-proxy-on-centos.html 

 

I haven't tried this myself yet. Let us know if this works for you.

Adventurer

Re: Configure proxy for login

Hi cwilson,

 

I tired to follow this how-to http://wingloon.com/2014/04/11/how-to-install-and-configure-cntlm-to-access-isa-server-on-centos-6-5...

 

But I get a timeout error although I can reach my.nutanix.com

 

[20/Jul/2017:15:15:03] Enabling HTTPS
[20/Jul/2017:15:15:03] Registering hook to redirect http://0.0.0.0 to https://0.0.0.0
[20/Jul/2017:15:15:03] Adding request hook 'redirect_http_to_https_hook' for '/.*$' but not [empty]
[20/Jul/2017:15:15:03] ENGINE Bus STARTING
[20/Jul/2017:15:15:03] ENGINE Forking once.
[20/Jul/2017:15:15:03] ENGINE Forking twice.
[20/Jul/2017:15:15:03] ENGINE Daemonized to PID: 2516
[20/Jul/2017:15:15:03] ENGINE Started monitor thread '_TimeoutMonitor'.
[20/Jul/2017:15:15:03] ENGINE Serving on 0.0.0.0:80
[20/Jul/2017:15:15:03] ENGINE Serving on 0.0.0.0:443
[20/Jul/2017:15:15:03] Mounted the file share: '/home/nutanix/data/xray/data' -> '/files'
[20/Jul/2017:15:15:03] Discovering tests...
[20/Jul/2017:15:15:07] Excluding task 'charon.dummy_test' because the server is not running in debug mode
[20/Jul/2017:15:15:07] Excluding task 'charon.throughput_scalability_rand-reads' because the server is not running in debug mode
[20/Jul/2017:15:15:07] Excluding task 'charon.cluster_power_cycle' because the server is not running in debug mode
[20/Jul/2017:15:15:07] Excluding task 'charon.throughput_scalability_seq-reads' because the server is not running in debug mode
[20/Jul/2017:15:15:07] Excluding task 'charon.throughput_scalability_seq-writes' because the server is not running in debug mode
[20/Jul/2017:15:15:07] Excluding task 'charon.throughput_scalability_rand-writes' because the server is not running in debug mode
[20/Jul/2017:15:15:08] Enqueued new global metadata upload
[20/Jul/2017:15:15:08] No upload thread is currently running, spawning new thread
[20/Jul/2017:15:15:08] Uploading global bundle: 57eba207-0a99-46a8-b1b6-a4c5d5504b53
[20/Jul/2017:15:15:08] The EULA has not been accepted
[20/Jul/2017:15:15:08] Serving the UI at '/'
[20/Jul/2017:15:15:08] Mounted the X-Ray API at '/xray/v1'
[20/Jul/2017:15:15:08] Adding request hook 'access_check' for '/.*$' but not '/xray/v1/public_auth$', '/xray/v1/eula$', '/xray/v1/eula$', '/xray/v1/auth$', '/xray/v1/version$', '/$', '/app$', '/app/.*$', '/index.html$', '/loading.html$', '/lib$', '/lib/.*$', '/app-extension$', or '/app-extension/.*$'
[20/Jul/2017:15:15:08] ENGINE Bus STARTED
[20/Jul/2017:15:15:12] Sending the following error response with status 401:
{
"details": "",
"message": "Please provide your credentials",
"status": "need_credentials"
}
[root@localhost tmp]# wget my.nutanix.com
--2017-07-20 15:15:55-- http://my.nutanix.com/
Connecting to 127.0.0.1:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 7794 (7.6K) [text/html]
Saving to: “index.html.1”

100%[===================================================================================================================================================================================================>] 7,794 --.-K/s in 0.004s

2017-07-20 15:15:55 (1.85 MB/s) - “index.html.1” saved [7794/7794]

 

Capture.JPG

Highlighted
Moderator

Re: Configure proxy for login

I think you might need to set the environment variables in /etc/environment since the xray_server is started as a service.

 

So your /etc/environment file should contain:

http_proxy="x.x.x.x:yyyy"

https_proxy="x.x.x.x:yyyy"

no_proxy="localhost, 127.0.0.1"

Adventurer

Re: Configure proxy for login

I managed to get a proxy with no authentication for  "*.nutanix.com" domain and set the environment variables as suggested. It worked!

 

Thanks

 

Sergio

Pathfinder

Re: Configure proxy for login

I have tried this solution without good results.
Although at the level of the system I have Internet connection (I get to do a "yum check", for example) the proxy parameters never reach Docker. Checking the Squid log, at the moment of initiating session, it does not get to request any reading for my.nutanix.com.
Also try to configure the Docker environment, with official information, without result.

I was create a config file on:

/etc/systemd/system/docker.service.d/https-proxy.conf

with this parameters:

[Service]
Environment="HTTPS_PROXY=http://ip.address.squid:8080/" "HTTP_PROXY=http://ip.address.squid:8080/" "NO_PROXY=localhost,127.0.0.1"

 

Anyone else has happened?

Any other solution?