резюме:
Я не могу подключиться к VPN с Cisco IPSec, по-видимому, потому, что общий секрет не сохраняется после его ввода (он всегда остается пустым).
подробное описание:
Я создал VPN-соединение с Cisco IPSec и успешно подключился. Внезапно (через пару часов) я отключился и получил следующую ошибку после попытки повторного подключения:
"VPN-сервер не отвечает. Проверьте адрес сервера и попробуйте подключиться снова."
адрес был в порядке, поэтому я проверил журналы и нашел:
Feb 22 17:59:35 gerry racoon[4401]: couldn't find the pskey by address 204.232.144.166.
Я проверил общий секрет, и он был пустым; я набрал его снова, нажал ok и сразу открыл его и снова получил пустой общий секрет. Я снова набрал общий секрет и попытался подключиться и получил следующие журналы:
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextSetFillColorWithColor: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextSetStrokeColorWithColor: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetCompositeOperation: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextSetCompositeOperation: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextFillRects: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextSetCompositeOperation: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextClipToRect: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetShouldSmoothFonts: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetFontSmoothingStyle: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetFontAntialiasingStyle: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextSetFontSmoothingStyle: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetDefaultUserSpaceToDeviceSpaceTransform: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextConcatCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextDrawImages: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 --- last message repeated 1 time ---
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetShouldSmoothFonts: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetFontSmoothingStyle: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextSetFontSmoothingStyle: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 --- last message repeated 1 time ---
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetDefaultUserSpaceToDeviceSpaceTransform: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextConcatCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextDrawImages: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 --- last message repeated 1 time ---
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 --- last message repeated 1 time ---
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetDefaultUserSpaceToDeviceSpaceTransform: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextConcatCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextDrawImages: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Feb 22 18:10:41 --- last message repeated 1 time ---
Feb 22 18:10:41 gerry com.apple.preference.network.remoteservice[4315]: CGContextGetCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
Я искал информацию об этих журналах, но не мог понять, связаны ли они с проблемой.
Я попытался удалив VPN соединение и создав новое (Кстати, я не смог использовать то же имя) и оно тоже не сработало, поэтому, опять же, просматриваю логи:
Feb 22 18:16:26 gerry nesessionmanager[951]: Failed to load configuration with ID <__NSConcreteUUID 0x7fedfa504910> A7892601-20D6-4D80-88B7-8D2AA22CF4E1
Feb 22 18:16:26 gerry nesessionmanager[951]: Failed to create a session with type 1 and configuration ID <__NSConcreteUUID 0x7fedfa504910> A7892601-20D6-4D80-88B7-8D2AA22CF4E1
Feb 22 18:16:26 gerry nesessionmanager[951]: Failed to load configuration with ID <__NSConcreteUUID 0x7fedfa407490> A7892601-20D6-4D80-88B7-8D2AA22CF4E1
Feb 22 18:16:26 gerry nesessionmanager[951]: Failed to create a session with type 1 and configuration ID <__NSConcreteUUID 0x7fedfa407490> A7892601-20D6-4D80-88B7-8D2AA22CF4E1
к сожалению, я ничего не мог сделать без этих журналов (один и тот же журнал повторялся около 20 раз и останавливался), поэтому я удалил все свои VPN-соединения (снова), создал новый (на этот раз я смог выбрать одно и то же имя) и получил другую запись в журнале:
Feb 22 18:31:49 gerry nehelper[217]: 3C44D371-6954-4001-A2D7-0100446EDA8A.XAUTH: SecKeychainItemCreateFromContent failed: User interaction is not allowed.
Feb 22 18:31:49 gerry nehelper[217]: 3C44D371-6954-4001-A2D7-0100446EDA8A.SS: SecKeychainItemCreateFromContent failed: User interaction is not allowed.
наконец-то я искал запись связки ключей (в keychain access) для моего VPN-подключения, но не найдена. Думаю, это может быть проблемой.
какие-то идеи в чем может быть проблема? Я попытался подключиться к другому Mac (та же ОС, El Capitan) и вообще не имел проблем, но не мог заставить VPN работать на моем Mac.
спасибо!
полные журналы, сгенерированные после попытки подключения (для контекста):
Feb 22 17:59:35 gerry nesessionmanager[951]: NESMLegacySession[VPN (Cisco IPSec):47CF9F0A-25FA-43A3-A675-9B30B55D84C0]: Received a start command from SystemUIServer[292]
Feb 22 17:59:35 gerry nesessionmanager[951]: NESMLegacySession[VPN (Cisco IPSec):47CF9F0A-25FA-43A3-A675-9B30B55D84C0]: status changed to connecting
Feb 22 17:59:35 gerry nesessionmanager[951]: IPSec connecting to server 204.232.144.166
Feb 22 17:59:35 gerry nesessionmanager[951]: IPSec Phase1 starting.
Feb 22 17:59:35 gerry racoon[4401]: accepted connection on vpn control socket.
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry racoon[4401]: IPSec connecting to server 204.232.144.166
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry racoon[4401]: Connecting.
Feb 22 17:59:35 gerry racoon[4401]: IPSec Phase 1 started (Initiated by me).
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry racoon[4401]: IKE Packet: transmit success. (Initiator, Aggressive-Mode message 1).
Feb 22 17:59:35 gerry racoon[4401]: >>>>> phase change status = Phase 1 started by us
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry racoon[4401]: none message must be encrypted, status 0x14a1, side 0
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry nesessionmanager[951]: IPSec Controller: IKE FAILED. phase 2, assert 0
Feb 22 17:59:35 gerry nesessionmanager[951]: IPSec Controller: retry IPSec aggressive mode with DH Group 2
Feb 22 17:59:35 gerry nesessionmanager[951]: IPSec Phase1 starting.
Feb 22 17:59:35 gerry racoon[4401]: IPSec connecting to server 204.232.144.166
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry racoon[4401]: Connecting.
Feb 22 17:59:35 gerry racoon[4401]: IPSec Phase 1 started (Initiated by me).
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry racoon[4401]: IKE Packet: transmit success. (Initiator, Aggressive-Mode message 1).
Feb 22 17:59:35 gerry racoon[4401]: >>>>> phase change status = Phase 1 started by us
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry racoon[4401]: port 62465 expected, but 0
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry racoon[4401]: try to get pskey by the peer's address.
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry racoon[4401]: couldn't find the pskey by address 204.232.144.166.
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry racoon[4401]: couldn't find the pskey for 204.232.144.166.
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry racoon[4401]: failed to generate SKEYID
Feb 22 17:59:35 --- last message repeated 1 time ---
Feb 22 17:59:35 gerry racoon[4401]: IKE Packet: receive failed. (Initiator, Aggressive-Mode Message 2).
Feb 22 17:59:38 gerry racoon[4401]: IKE Packet: transmit success. (Phase 1 Retransmit).
Feb 22 17:59:38 gerry racoon[4401]: port 37905 expected, but 0
Feb 22 17:59:38 --- last message repeated 1 time ---
Feb 22 17:59:38 gerry racoon[4401]: try to get pskey by the peer's address.
Feb 22 17:59:38 --- last message repeated 1 time ---
Feb 22 17:59:38 gerry racoon[4401]: couldn't find the pskey by address 204.232.144.166.
Feb 22 17:59:38 --- last message repeated 1 time ---
Feb 22 17:59:38 gerry racoon[4401]: couldn't find the pskey for 204.232.144.166.
Feb 22 17:59:38 --- last message repeated 1 time ---
Feb 22 17:59:38 gerry racoon[4401]: failed to generate SKEYID
Feb 22 17:59:38 --- last message repeated 1 time ---
Feb 22 17:59:38 gerry racoon[4401]: IKE Packet: receive failed. (Initiator, Aggressive-Mode Message 2).
Feb 22 17:59:41 gerry racoon[4401]: IKE Packet: transmit success. (Phase 1 Retransmit).
Feb 22 17:59:43 gerry racoon[4401]: port 37905 expected, but 0
Feb 22 17:59:43 --- last message repeated 1 time ---
Feb 22 17:59:43 gerry racoon[4401]: try to get pskey by the peer's address.
Feb 22 17:59:43 --- last message repeated 1 time ---
Feb 22 17:59:43 gerry racoon[4401]: couldn't find the pskey by address 204.232.144.166.
Feb 22 17:59:43 --- last message repeated 1 time ---
Feb 22 17:59:43 gerry racoon[4401]: couldn't find the pskey for 204.232.144.166.
Feb 22 17:59:43 --- last message repeated 1 time ---
Feb 22 17:59:43 gerry racoon[4401]: failed to generate SKEYID
Feb 22 17:59:43 --- last message repeated 1 time ---
Feb 22 17:59:43 gerry racoon[4401]: IKE Packet: receive failed. (Initiator, Aggressive-Mode Message 2).
Feb 22 17:59:45 gerry racoon[4401]: IKE Packet: transmit success. (Phase 1 Retransmit).
Feb 22 17:59:45 gerry nesessionmanager[951]: NESMLegacySession[VPN (Cisco IPSec):47CF9F0A-25FA-43A3-A675-9B30B55D84C0]: status changed to disconnecting
Feb 22 17:59:45 gerry nesessionmanager[951]: IPSec disconnecting from server 204.232.144.166
Feb 22 17:59:45 gerry racoon[4401]: IPSec disconnecting from server 204.232.144.166
Feb 22 17:59:45 --- last message repeated 3 times ---
Feb 22 17:59:45 gerry nesessionmanager[951]: NESMLegacySession[VPN (Cisco IPSec):47CF9F0A-25FA-43A3-A675-9B30B55D84C0]: status changed to disconnected, last stop reason None
Feb 22 17:59:45 gerry racoon[4401]: glob found no matches for path "/var/run/racoon/*.conf"
Feb 22 17:59:46 gerry racoon[4401]: Connecting.
Feb 22 17:59:46 --- last message repeated 1 time ---
Feb 22 17:59:46 gerry racoon[4401]: Unknown Informational exchange received.