2023年3月27日 星期一

nginx 代理nacos cluster 2.X , 無法註冊服務

透過 nginx 代理nacos cluster 2.X , 無法註冊服務, 但指定單機的nacos(即不透過nginx代理) 是可以的. 直接透過nginx 代理其中一台單機版也不行, 所以跟集群無關, 而且nginx 的問題. 容器真的是好用, 我在無法再新增服務器的情況下, 使用docker nginx image 作, 是OK的, 原來, nacos 在起動時預設為8848, 同時增加2個port, 主port +1000 port for , 客戶端gRPC請求服務端端口,用於客戶端向服務端發起連接和請求 主port +1001 port for , 服務端gRPC請求服務端端口,用於服務間同步等 所以nginx 代理除了8848 port 外, 還需要代理 9848 port.

2023年3月8日 星期三

參考IT名人的BLOG

Joel Spolsky - https://www.joelonsoftware.com/ Jeff Atwood - https://blog.codinghorror.com/ Scott Hanselman - https://www.hanselman.com/blog/

2022年8月29日 星期一

SSH Client 無法連線至SSH Server 設定

因為工作用的SERVER 是比較老舊的, 所以在使用Linux Clinet SSH 連線至SERVER時會有一些錯誤。
目前的解決方式是修改Client SSH Config.
/etc/ssh 是Client 的設定資料夾
/etc/sshd 是Server 的設定資料夾

這次遇到的問題是無法連線至遠端的Server, 所以是修改 /etc/ssh 資料夾。
問題1: 
Unable to negotiate with 10.198.***.*** port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 

問題2:
Unable to negotiate with 10.198.***.** port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

因為我的環境中, SSH 會include /etc/ssh/ssh_config.d/*.conf,所以我在該路徑加了一個melin.conf 

內容如下: 


KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1

Host *
    HostKeyAlgorithms=+ssh-dss



2022年2月25日 星期五

透過 Gmail 發信二段驗證設定

Google 啟用二段式驗證後, 會無法登入,
其他需要調整
  1. 加密 SSL/TLS ->STARTTLS
  2. PORT 587, 原本可能就設定錯誤
  3. 密碼: 至Google 帳戶設定





這封郵件來自 Evernote。Evernote 是您專屬的工作空間,免費下載 Evernote

2021年11月27日 星期六

get current mathod name

image

java static get Class Name

for log4j static object initialize class name.

 

static String CLASS_NAME = java.lang.invoke.MethodHandles.lookup().lookupClass().getName(); 
static Logger log = Logger.getLogger(CLASS_NAME); 

2021年10月6日 星期三

Add Maven dependencies to Eclipse Deployment Assembly

image

在Eclipes Project 中,加入<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>

image

 

手動使用這個方法在執行Maven-update project 之後,該項設定會消失。可以透過Eclipse 的設定來處理:

 

image

image

image

image

 

在Java Build Path->Order and Export 勾選 Maven Dependencies

image

如此再執行Maven Update Project,Deployment Assembly關於Maven Dependency設定還是會不見。但另外新增一個專案,將.classpath、.project copy 至此專案,則看似正常,所以還在確認解決方法。

Ads

Seo Services