连接到fiware的cosmos服务器时出错

bvjveswy  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(370)

我无法通过配置单元连接到php中的cosmos服务器:

// Load this lib
  require_once __DIR__ . '/php-thrift-sql-master/ThriftSQL.phar';

  // Try out a Hive query

$usuario="user@user";
$clave="pass"; 

  $hive = new \ThriftSQL\Hive( 'cosmos.lab.fiware.org', 10000, $usuario, $clave, 1);
  $hiveTables = $hive
    ->setSasl( false ) // To turn SASL auth off, on by default
    ->connect()
    ->queryAndFetchAll( 'SHOW TABLES' );
  print_r( $hiveTables );

  // Don't forget to clear the client and close socket.
  $hive->disconnect();
Error produced is Thrift\Exception\TTransportException: TSocket: timed out reading 4 bytes from cosmos.lab.fiware.org:10000 in phar://C:/Users/.../php-thrift-sql-master/ThriftSQL.phar/Thrift/Transport/TSocket.php on line 274

我尝试了其他服务器,比如storage.cosmos.lab.fiware.org和computing.cosmos.lab.fiware.org。如果我设置了很长的超时时间,那么脚本将永远等待。
你能帮我用php连接cosmos的hive服务器吗?

cwtwac6a

cwtwac6a1#

问题出在你的端口..写端口你在哪里使用hadoop。我的电话号码是8088。

相关问题