cfginitstart_pxf.html.md.erb 5.3 KB
Newer Older
1
---
2
title: Starting, Stopping, and Restarting PXF
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
---

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->


25 26 27 28 29
PXF provides two management commands:

- `pxf cluster` - manage all PXF service instances in the Greenplum Database cluster
- `pxf` - manage the PXF service instance on a specific Greenplum Database host

30
The [`pxf cluster`](ref/pxf-cluster.html) command supports `init`, `start`, `status`, `stop`, and `sync` subcommands. When you run a `pxf cluster` subcommand on the Greenplum Database master host, you perform the operation on all segment hosts in the Greenplum Database cluster. PXF also runs the `init` and `sync` commands on the standby master host.
31 32 33 34

The [`pxf`](ref/pxf.html) command supports `init`, `start`, `stop`, `restart`, and `status` operations. These operations run locally. That is, if you want to start or stop the PXF agent on a specific Greenplum Database segment host, you log in to the host and run the command. 


35 36
## <a id="start_pxf"></a>Starting PXF

37
After initializing PXF, you must start PXF on each segment host in your Greenplum Database cluster. The PXF service, once started, runs as the `gpadmin` user on default port 5888. Only the `gpadmin` user can start and stop the PXF service.
38

39 40 41 42 43 44 45 46 47 48 49 50 51
If you want to change the default PXF configuration, you must update the configuration before you start PXF.

`$PXF_CONF/conf` includes these user-customizable configuration files:

- `pxf-env.sh` - runtime configuration parameters
- `pxf-log4j.properties` - logging configuration parameters
- `pxf-profiles.xml` - custom profile definitions

The `pxf-env.sh` file exposes the following PXF runtime configuration parameters:

| Parameter  | Description | Default Value |
|-----------|---------------| ------------|
| JAVA_HOME    | The Java JRE home directory. | /usr/java/default |
52
| PXF_LOGDIR   | The PXF log directory. | $PXF_CONF/logs |
53 54 55 56
| PXF_JVM_OPTS  | Default options for the PXF Java virtual machine. | -Xmx2g -Xms1g |
| PXF_KEYTAB  | The absolute path to the PXF service Kerberos principal keytab file. | $PXF_CONF/keytabs/pxf.service.keytab |
| PXF_PRINCIPAL  | The PXF service Kerberos principal. | gpadmin/\_HOST@EXAMPLE.COM |

57
You must synchronize any changes that you make to `pxf-env.sh`, `pxf-log4j.properties`, or `pxf-profiles.xml` to the Greenplum Database cluster, and (re)start PXF on each segment host.
58

59
### <a id="start_pxf_prereq" class="no-quick-link"></a>Prerequisites
60

61 62 63 64
Before you start PXF in your Greenplum Database cluster, ensure that:

- Your Greenplum Database cluster is up and running.
- You have previously initialized PXF.
65
 
66
### <a id="start_pxf_proc" class="no-quick-link"></a>Procedure
67

68
Perform the following procedure to start PXF on each segment host in your Greenplum Database cluster.
69

70
1. Log in to the Greenplum Database master node:
71 72 73 74 75

    ``` shell
    $ ssh gpadmin@<gpmaster>
    ```

76
3. Run the `pxf cluster start` command to start PXF on each segment host. For example:
77 78

    ```shell
79
    gpadmin@gpmaster$ $GPHOME/pxf/bin/pxf cluster start
80 81
    ```

82 83
## <a id="stop_pxf"></a>Stopping PXF

84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
If you must stop PXF, for example if you are upgrading PXF, you must stop PXF on each segment host in your Greenplum Database cluster. Only the `gpadmin` user can stop the PXF service.

### <a id="stop_pxf_prereq" class="no-quick-link"></a>Prerequisites

Before you stop PXF in your Greenplum Database cluster, ensure that your Greenplum Database cluster is up and running.
 
### <a id="stop_pxf_proc" class="no-quick-link"></a>Procedure

Perform the following procedure to stop PXF on each segment host in your Greenplum Database cluster.

1. Log in to the Greenplum Database master node:

    ``` shell
    $ ssh gpadmin@<gpmaster>
    ```

3. Run the `pxf cluster stop` command to stop PXF on each segment host. For example:

    ```shell
    gpadmin@gpmaster$ $GPHOME/pxf/bin/pxf cluster stop
    ```

## <a id="restart_pxf"></a>Restarting PXF

If you must restart PXF, for example if you updated PXF user configuration files in `$PXF_CONF/conf`, you can stop, and then start, PXF in your Greenplum Database cluster.

Only the `gpadmin` user can restart the PXF service.

### <a id="restart_pxf_prereq" class="no-quick-link"></a>Prerequisites

Before you restart PXF in your Greenplum Database cluster, ensure that your Greenplum Database cluster is up and running.
 
### <a id="restart_pxf_proc" class="no-quick-link"></a>Procedure
117

118
Perform the following procedure to restart PXF in your Greenplum Database cluster.
119

120
1. Log in to the Greenplum Database master node:
121 122 123 124 125

    ``` shell
    $ ssh gpadmin@<gpmaster>
    ```

126
2. Restart PXF:
127 128

    ```shell
129 130
    gpadmin@gpmaster$ $GPHOME/pxf/bin/pxf cluster stop
    gpadmin@gpmaster$ $GPHOME/pxf/bin/pxf cluster start
131
    ```
132