sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Foster, Craig" <foscr...@amazon.com>
Subject Re: Sqoop server port
Date Thu, 10 Dec 2015 16:37:26 GMT
Thanks. I know about the resource file but I would like to set the environment appropriately
for anyone logging into the system without that resource file. So that means setting environment
variables in the Sqoop client shell scripts at least. Setting SQOOP_HTTP_PORT has no effect
on the client. I set SQOOP2_PORT rather than SQOOP_HTTP_PORT for the client. This seems consistent
with the other variables you can set: SQOOP2_HOST and SQOOP2_WEBAPP.
Interestingly, I found a few issues when installing Sqoop2: 

1) setenv.sh never appears to be sourced. I have to manually edit the sqoop.sh shell script
in order for it to actually source my file. I’ve tried numerous things like restarting the
server…but I just don’t see it actually sourced anywhere anyway. 

2) I think you’ve now cleared up for me what’s going on:
SQOOP_HTTP_PORT is setting the port for the server/Tomcat. 
SQOOP2_PORT setting the port for clients such as the shell. 

Thanks again!

On 12/10/15, 1:14 AM, "Jarek Jarcec Cecho" <jarcec@gmail.com on behalf of jarcec@apache.org>

>Hi Craig,
>I believe that setting SQOOP_HTTP_PORT to 9999 in setenv.sh should be sufficient for the
server to start on port 9999. Have you try only this change and going to http://localhost:999/sqoop/version?
>In terms of the command line shell - that is independent on Sqoop 2 server, so it’s
expected that you will have to specify correct URL there. If you changed the port you will
need to run:
>sqoop:000> set server —port 999
>(you can store this command in your resource file as mentioned in the docs [1])
>1: http://sqoop.apache.org/docs/1.99.6/CommandLineClient.html#resource-file
>> On Dec 10, 2015, at 6:56 AM, Foster, Craig <foscraig@amazon.com> wrote:
>> Ping. It seems that if one sets SQOOP2_PORT they need to set SQOOP_HTTP_PORT—please
>> From: "Foster, Craig" <foscraig@amazon.com>
>> Date: Wednesday, December 9, 2015 at 11:14 AM
>> To: "user@sqoop.apache.org" <user@sqoop.apache.org>
>> Subject: Sqoop server port
>> What is the Sqoop2 server port? It’s somewhat confusing and seems inconsistent.

>> I am experimentally setting SQOOP_HTTP_PORT to 9999. In setenv.sh, it says: “The
port Sqoop server runs” so I assumed it was the way to set this port. 
>> But when I look in sqoop.sh it says:
>> “The Java System properties ‘sqoop.http.port’ and ‘sqoop.admin.port’ are
not used by Sqoop. They are used in Tomcat’s server.xml configuration file.” 
>> Furthermore, when I restart the server with this set, it no longer works. When I
start sqoop2, it says:
>> sqoop2
>> Sqoop home directory: /usr/lib/sqoop2
>> Sqoop Shell: Type 'help' or '\h' for help.
>> sqoop:000> show server --all
>> Server host: sanitized
>> Server port: 12000
>> Server webapp: sqoop
>> sqoop:000> create link -c 2
>> Creating link for connector with id 2
>> Exception has occurred during processing command 
>> Exception: com.sun.jersey.api.client.ClientHandlerException Message: java.net.ConnectException:
Connection refused
>> So, looking in the org.apache.sqoop.core.Constants class I find a SQOOP2_PORT and
setting that I find that this works again. So its seems pretty critical that I not set SQOOP_HTTP_PORT.

>> Thanks,
>> Craig
View raw message