MAC OS El Capitan - VPN O segredo compartilhado do Cisco IPSec não está salvo

2

Resumo:

Não consigo me conectar a uma VPN com o Cisco IPSec, aparentemente porque o Segredo compartilhado não está sendo salvo depois de inseri-lo (ele permanece sempre em branco).

Explicação detalhada:

Eu criei uma conexão VPN com o Cisco IPSec e conectei com sucesso. De repente (algumas horas depois) eu fui desconectado e recebi o seguinte erro após tentar reconectar:

"O servidor VPN não respondeu. Verifique o endereço do servidor e tente se reconectar."

O endereço estava ok, então eu verifiquei os logs e encontrei:

Feb 22 17:59:35 gerry racoon[4401]: couldn't find the pskey by address 204.232.144.166.

Eu verifiquei o segredo compartilhado e estava em branco; Eu digitei novamente, cliquei ok e abri-lo imediatamente e recebi novamente um segredo compartilhado em branco. Eu digitei o segredo compartilhado novamente e tentei me conectar e recebi os seguintes registros:

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.

Pesquisei informações sobre esses registros, mas não consegui descobrir se eles estavam relacionados ao problema.

Eu tentei excluir a conexão VPN e criar uma nova (a propósito, não consegui usar o mesmo nome) e ela também não funcionou, então revisei os logs:

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
Infelizmente eu não poderia fazer nada sem esses logs (o mesmo log se repetiu cerca de 20 vezes e parou), então eu deletei todas as minhas conexões VPN (novamente), criei uma nova (desta vez eu fui capaz de escolher o mesmo nome) e obteve uma entrada de log diferente:

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.

Por fim, procurei pela entrada das chaves (no acesso às chaves) para minha conexão VPN, mas não encontrei nenhuma. Eu acho que isso poderia ser o problema.

Alguma idéia do que poderia ser o problema? Tentei me conectar em um Mac diferente (mesmo sistema operacional, El Capitan) e não tive nenhum problema, mas não consigo fazer a VPN funcionar no meu Mac.

Obrigado!

Conclua os registros gerados depois de tentar se conectar (para o contexto):

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.
    
por Gerry 23.02.2017 / 01:50

1 resposta

0

O problema foi de fato com as chaves da Apple, eu não consegui resolver o problema, então decidi redefinir o chaveiro (Keychain Access > Preferences > Reset My Default Keychain) e funcionou, a única (menor) desvantagem foi que Eu precisava adicionar todas as minhas senhas novamente.

Eu não consegui descobrir o que causou o problema, então, se alguém tem alguma idéia do que poderia causar o fracasso do porta-chaves, por favor, compartilhe!

ATUALIZAÇÃO

O problema está acontecendo novamente, então eu acho que algo entre keychain e vpn não está funcionando. A única maneira que eu posso mantê-lo funcionando é reiniciar o chaveiro mais e mais ... Alguma sugestão?

UPDATE 2

Eu finalmente encontrei a origem desse problema: a versão mais recente (5.1.2) do Phusion Passenger faz uma modificação em /Library/Preferences/com.apple.security.plist , causando problemas com o chaveiro.

A descrição completa do problema e uma solução temporária podem ser encontradas aqui .

    
por 23.02.2017 / 04:08