我安装了odbc驱动程序和pdo odbc。这些都是相关的问题。
虽然安装已完成,启用了odbc启动点亮,但我仍然遇到此异常。
请检查上面的问题链接,我已经提到了我在所有配置中详细介绍的所有步骤。
$ignite = $dbh = new \PDO('odbc:Apache Ignite');
$ignite->prepare('select * from Person');
[PDOException]
SQLSTATE[08001] SQLConnect: 0 [unixODBC]Failed to establish connection with the host.
这是我的odbc.ini配置
[AgnitePdoOdbc]
description=Agnite pdo odbc
driver=Apache Ignite
ADDRESS=192.168.1.107/10.0.3.1:48100
CACHE=MyCache
日志显示
>>> __________ ________________
>>> / _/ ___/ |/ / _/_ __/ __/
>>> _/ // (7 7 // / / / / _/
>>> /___/\___/_/|_/___/ /_/ /___/
>>>
>>> ver. 1.8.0#20161205-sha1:9ca40dbe
>>> 2016 Copyright(C) Apache Software Foundation
>>>
>>> Ignite documentation: http://ignite.apache.org
[11:35:24,250][INFO][main][IgniteKernal] Config URL: file:/home/me/install/apache-ignite/examples/config/example-ignite.xml
[11:35:24,250][INFO][main][IgniteKernal] Daemon mode: off
[11:35:24,250][INFO][main][IgniteKernal] OS: Linux 4.4.0-53-generic amd64
[11:35:24,250][INFO][main][IgniteKernal] OS user: me
[11:35:24,251][INFO][main][IgniteKernal] PID: 13565
[11:35:24,252][INFO][main][IgniteKernal] Language runtime: Java Platform API Specification ver. 1.8
[11:35:24,252][INFO][main][IgniteKernal] VM information: Java(TM) SE Runtime Environment 1.8.0_91-b14 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 25.91-b14
[11:35:24,256][INFO][main][IgniteKernal] VM total memory: 3.5GB
[11:35:24,256][INFO][main][IgniteKernal] Remote Management [restart: off, REST: on, JMX (remote: off)]
[11:35:24,256][INFO][main][IgniteKernal] IGNITE_HOME=/home/me/install/apache-ignite
[11:35:24,256][INFO][main][IgniteKernal] VM arguments: [-Dfile.encoding=UTF-8]
[11:35:24,256][INFO][main][IgniteKernal] Configured caches ['ignite-marshaller-sys-cache', 'ignite-sys-cache', 'ignite-atomics-sys-cache']
[11:35:24,256][WARNING][main][IgniteKernal] Peer class loading is enabled (disable it in production for performance and deployment consistency reasons)
[11:35:24,258][INFO][main][IgniteKernal] 3-rd party licenses can be found at: /home/me/install/apache-ignite/libs/licenses
[11:35:24,259][WARNING][pub-#6%null%][GridDiagnostic] Initial heap size is 250MB (should be no less than 512MB, use -Xms512m -Xmx512m).
[11:35:24,294][INFO][main][IgnitePluginProcessor] Configured plugins:
[11:35:24,295][INFO][main][IgnitePluginProcessor] ^-- None
[11:35:24,295][INFO][main][IgnitePluginProcessor]
[11:35:24,369][INFO][main][TcpCommunicationSpi] IPC shared memory server endpoint started [port=48100, tokDir=/home/me/install/apache-ignite/work/ipc/shmem/7a24ac2a-982f-4929-a1aa-70d687e5d0b2-13565]
[11:35:24,369][INFO][main][TcpCommunicationSpi] Successfully bound shared memory communication to TCP port [port=48100, locHost=0.0.0.0/0.0.0.0]
[11:35:24,380][INFO][main][TcpCommunicationSpi] Successfully bound to TCP port [port=47100, locHost=0.0.0.0/0.0.0.0]
[11:35:24,544][WARNING][main][NoopCheckpointSpi] Checkpoints are disabled (to enable configure any GridCheckpointSpi implementation)
[11:35:24,563][WARNING][main][GridCollisionManager] Collision resolution is disabled (all jobs will be activated upon arrival).
[11:35:24,565][WARNING][main][NoopSwapSpaceSpi] Swap space is disabled. To enable use FileSwapSpaceSpi.
[11:35:24,566][INFO][main][IgniteKernal] Security status [authentication=off, tls/ssl=off]
[11:35:24,762][WARNING][main][IgniteH2Indexing] Serialization of Java objects in H2 was enabled.
[11:35:24,805][INFO][main][GridTcpRestProtocol] Command protocol successfully started [name=TCP binary, host=0.0.0.0/0.0.0.0, port=11212]
[11:35:24,946][INFO][main][GridJettyRestProtocol] Command protocol successfully started [name=Jetty REST, host=/0.0.0.0, port=8080]
[11:35:24,974][INFO][main][IgniteKernal] Non-loopback local IPs: 10.0.3.1, 192.168.0.223, 192.168.1.107, fe80:0:0:0:3067:5bff:fe14:b410%lxcbr0, fe80:0:0:0:ec86:afff:fe31:310%tap0, fe80:0:0:0:effa:8f97:a461:d619%enp2s0, fe80:0:0:0:fc35:87ff:fe00:d1d%vethO7PVH6
[11:35:24,974][INFO][main][IgniteKernal] Enabled local MACs: 64006A07DD7E, EE86AF310310, FE3587000D1D
[11:35:25,001][INFO][main][TcpDiscoverySpi] Successfully bound to TCP port [port=47500, localHost=0.0.0.0/0.0.0.0, locNodeId=7a24ac2a-982f-4929-a1aa-70d687e5d0b2]
[11:35:26,388][INFO][main][GridCacheProcessor] Started cache [name=ignite-sys-cache, mode=REPLICATED]
[11:35:26,396][INFO][main][GridCacheProcessor] Started cache [name=ignite-atomics-sys-cache, mode=PARTITIONED]
[11:35:26,407][INFO][main][GridCacheProcessor] Started cache [name=ignite-marshaller-sys-cache, mode=REPLICATED]
[11:35:26,450][INFO][exchange-worker-#25%null%][GridCachePartitionExchangeManager] Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=1, minorTopVer=0], evt=NODE_JOINED, node=7a24ac2a-982f-4929-a1aa-70d687e5d0b2]
[11:35:26,490][INFO][main][IgniteKernal] Performance suggestions for grid (fix if possible)
[11:35:26,490][INFO][main][IgniteKernal] To disable, set -DIGNITE_PERFORMANCE_SUGGESTIONS_DISABLED=true
[11:35:26,490][INFO][main][IgniteKernal] ^-- Disable peer class loading (set 'peerClassLoadingEnabled' to false)
[11:35:26,490][INFO][main][IgniteKernal] ^-- Disable grid events (remove 'includeEventTypes' from configuration)
[11:35:26,490][INFO][main][IgniteKernal]
[11:35:26,490][INFO][main][IgniteKernal] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}
[11:35:26,491][INFO][main][IgniteKernal]
[11:35:26,491][INFO][main][IgniteKernal]
>>> +----------------------------------------------------------------------+
>>> Ignite ver. 1.8.0#20161205-sha1:9ca40dbeb7d559fcb299bdb6f5c90cdf8ce7e533
>>> +----------------------------------------------------------------------+
>>> OS name: Linux 4.4.0-53-generic amd64
>>> CPU(s): 4
>>> Heap: 3.5GB
>>> VM name: 13565@me-OptiPlex-3020
>>> Local node [ID=7A24AC2A-982F-4929-A1AA-70D687E5D0B2, order=1, clientMode=false]
>>> Local node addresses: [192.168.0.223/0:0:0:0:0:0:0:1%lo, 192.168.1.107/10.0.3.1, 10.0.3.1/127.0.0.1, /192.168.0.223, /192.168.1.107]
>>> Local ports: TCP:8080 TCP:11212 TCP:47100 UDP:47400 TCP:47500 TCP:48100
[11:35:26,492][INFO][main][GridDiscoveryManager] Topology snapshot [ver=1, servers=1, clients=0, CPUs=4, heap=3.5GB]
[11:35:29,935][INFO][exchange-worker-#25%null%][GridCacheProcessor] Started cache [name=TimeseriesCache, mode=PARTITIONED]
[11:35:29,958][INFO][exchange-worker-#25%null%][GridCachePartitionExchangeManager] Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=1, minorTopVer=1], evt=DISCOVERY_CUSTOM_EVT, node=7a24ac2a-982f-4929-a1aa-70d687e5d0b2]
[11:35:29,995][INFO][main][CacheJdbcPojoStore] Started load cache [cache=TimeseriesCache, keyType=java.lang.String]
[11:35:31,801][INFO][main][CacheJdbcPojoStore] Finished load cache: TimeseriesCache
[11:35:32,594][INFO][exchange-worker-#25%null%][GridCachePartitionExchangeManager] Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=1, minorTopVer=2], evt=DISCOVERY_CUSTOM_EVT, node=7a24ac2a-982f-4929-a1aa-70d687e5d0b2]
[11:35:32,625][WARNING][exchange-worker-#25%null%][CacheOsStoreManager] <RatioCache> Persistence store is configured, but both read-through and write-through are disabled. This configuration makes sense if the store implements loadCache method only. If this is the case, ignore this warning. Otherwise, fix the configuration for the cache: RatioCache
[11:35:32,626][INFO][exchange-worker-#25%null%][GridCacheProcessor] Started cache [name=RatioCache, mode=PARTITIONED]
[11:35:32,640][INFO][exchange-worker-#25%null%][GridCachePartitionExchangeManager] Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=1, minorTopVer=3], evt=DISCOVERY_CUSTOM_EVT, node=7a24ac2a-982f-4929-a1aa-70d687e5d0b2]
[11:35:37,028][INFO][ignite-update-notifier-timer][GridUpdateNotifier] Your version is up to date.
[11:35:37,110][INFO][exchange-worker-#25%null%][GridCachePartitionExchangeManager] Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=1, minorTopVer=4], evt=DISCOVERY_CUSTOM_EVT, node=7a24ac2a-982f-4929-a1aa-70d687e5d0b2]
[11:35:37,117][WARNING][exchange-worker-#25%null%][CacheOsStoreManager] <AggregateCache> Persistence store is configured, but both read-through and write-through are disabled. This configuration makes sense if the store implements loadCache method only. If this is the case, ignore this warning. Otherwise, fix the configuration for the cache: AggregateCache
[11:35:37,118][INFO][exchange-worker-#25%null%][GridCacheProcessor] Started cache [name=AggregateCache, mode=PARTITIONED]
[11:35:37,129][INFO][exchange-worker-#25%null%][GridCachePartitionExchangeManager] Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=1, minorTopVer=5], evt=DISCOVERY_CUSTOM_EVT, node=7a24ac2a-982f-4929-a1aa-70d687e5d0b2]
[11:35:37,459][INFO][exchange-worker-#25%null%][GridCachePartitionExchangeManager] Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=1, minorTopVer=6], evt=DISCOVERY_CUSTOM_EVT, node=7a24ac2a-982f-4929-a1aa-70d687e5d0b2]
答案 0 :(得分:0)
这意味着字面意思 - 您的驱动程序无法与服务器节点建立连接。可能有多种原因:
您尚未启动服务器节点。
您尚未正确配置服务器节点。请注意,您应该为服务器节点添加ODBC配置 - http://apacheignite.gridgain.org/docs/odbc-driver#cluster-configuration。
您的DSN配置错误,表示它指向错误的TCP地址。
可能还存在网络和/或防火墙配置问题。我需要更多信息来说明。
更新:有关如何为Ignite配置DSN的详细信息,请参阅https://apacheignite.readme.io/docs/connecting-string#configuring-dsn。