Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nacos 三台机子集群正常启动运行一段时间后,出现错误 #8931

Closed
shanlongmei opened this issue Aug 10, 2022 · 3 comments · Fixed by #8940
Closed

nacos 三台机子集群正常启动运行一段时间后,出现错误 #8931

shanlongmei opened this issue Aug 10, 2022 · 3 comments · Fixed by #8940
Labels
kind/bug Category issues or prs related to bug.

Comments

@shanlongmei
Copy link

OS:linux
nacos :2.1.1

2022-08-10 15:04:27,053 ERROR Fail to compress snapshot, path=/app/soft/nacos/data/protocol/raft/naming_persistent_service_v2/snapshot/temp, file list={}.

java.lang.RuntimeException: Serialized class com.alibaba.nacos.naming.core.v2.pojo.BatchInstanceData must implement java.io.Serializable
field: com.alibaba.nacos.naming.core.v2.client.ClientSyncData.batchInstanceData
class: com.alibaba.nacos.naming.core.v2.client.ClientSyncData (object=com.alibaba.nacos.naming.core.v2.client.ClientSyncData@65222f42)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:222)
at com.caucho.hessian.io.UnsafeSerializer.writeObject(UnsafeSerializer.java:177)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.caucho.hessian.io.MapSerializer.writeObject(MapSerializer.java:116)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:465)
at com.alibaba.nacos.consistency.serialize.HessianSerializer.serialize(HessianSerializer.java:83)
at com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl$PersistentInstanceSnapshotOperation.dumpSnapshot(PersistentClientOperationServiceImpl.java:335)
at com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl$PersistentInstanceSnapshotOperation.writeSnapshot(PersistentClientOperationServiceImpl.java:305)
at com.alibaba.nacos.naming.consistency.persistent.impl.AbstractSnapshotOperation.lambda$onSnapshotSave$0(AbstractSnapshotOperation.java:52)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Serialized class com.alibaba.nacos.naming.core.v2.pojo.BatchInstanceData must implement java.io.Serializable
field: com.alibaba.nacos.naming.core.v2.client.ClientSyncData.batchInstanceData
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:303)
at com.caucho.hessian.io.UnsafeSerializer.writeInstance(UnsafeSerializer.java:218)
... 11 common frames omitted
Caused by: java.lang.IllegalStateException: Serialized class com.alibaba.nacos.naming.core.v2.pojo.BatchInstanceData must implement java.io.Serializable
at com.caucho.hessian.io.SerializerFactory.getDefaultSerializer(SerializerFactory.java:387)
at com.caucho.hessian.io.SerializerFactory.loadSerializer(SerializerFactory.java:368)
at com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:267)
at com.caucho.hessian.io.SerializerFactory.getObjectSerializer(SerializerFactory.java:217)
at com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:463)
at com.caucho.hessian.io.UnsafeSerializer$ObjectFieldSerializer.serialize(UnsafeSerializer.java:299)
... 12 common frames omitted

节点元数据:
{
"lastRefreshTime": 1660125730834,
"raftMetaData": {
"metaDataMap": {
"naming_instance_metadata": {
"leader": "192.168.10.195:7848",
"raftGroupMember": [
"192.168.10.154:7848",
"192.168.10.195:7848",
"192.168.10.194:7848"
],
"term": 9
},
"naming_persistent_service": {
"leader": "192.168.10.195:7848",
"raftGroupMember": [
"192.168.10.154:7848",
"192.168.10.195:7848",
"192.168.10.194:7848"
],
"term": 14
},
"naming_persistent_service_v2": {
"errMsg": "Error [type=ERROR_TYPE_SNAPSHOT, status=Status[EIO<1014>: Fail to save snapshot.]]",
"leader": "192.168.10.194:7848",
"raftGroupMember": [
"192.168.10.154:7848",
"192.168.10.195:7848",
"192.168.10.194:7848"
],
"term": 7
},
"naming_service_metadata": {
"leader": "192.168.10.195:7848",
"raftGroupMember": [
"192.168.10.154:7848",
"192.168.10.195:7848",
"192.168.10.194:7848"
],
"term": 10
}
}
},
"raftPort": "7848",
"readyToUpgrade": true,
"version": "2.1.1"
}

@wuchubuzai2018
Copy link
Contributor

@i will solve it@
看错误提示是对象序列化问题,应该上次别人提交的批量实例处理的代码,我提交了一个PR,希望可以被社区合并

@KomachiSion KomachiSion added the kind/bug Category issues or prs related to bug. label Aug 11, 2022
KomachiSion pushed a commit that referenced this issue Aug 12, 2022
…#8940)

* [fix] fix BatchInstanceData cannot Serializable question

* fix update serialVersionUID auto generate
li-xiao-shuang pushed a commit that referenced this issue Aug 31, 2022
* Add exception detail stacks when connect to server failed.

* [ISSUE#8653]Fix health check bug (#8639)

* fix health bug.

* fix health bug.

* fix health bug.

* test update

* format code

* 注释

* check service exist

* check service exist

* test fail

* user group()

* add unit test.

* add unit test.

* add unit test.

* add unit test.

* add unit test.

* add unit test.

* Add comment for config aspect.

* [ISSUE#8481]Unified TRACE capacity building  (#8805)

* [ISSUE#8481]Unified TRACE capacity building

* [ISSUE#8481]Unified TRACE capacity building
1. Event type add to traceEvent.
2. The event about instance add instancePort.
3. Add health check type to healthChangeEvent.
4. Other fixup.

* Add Generic Type for Simple Cache Map (#8812)

* import config file auth fail (#8844)

* import config file auth fail

* run ci

* run ci2

* Feat/calculate ip count when use batchregister (#8858)

Feat/calculate ip count when use batchregister

* [ISSUE #8880] add a request exception handler (#8881)

* [ISSUE #8880] add a request exception handler

Close #8880

* [ISSUE #8880] retry ci

* Upgrade to 2.1.1 (#8899)

* [ISSUE#8910] bug fix calcu ipCount (#8911)

* bug fix calcu ipCount

* update logic

* judge endpoint (#8933)

* [ISSUE #8925] fix that the value of hasQueryString is always false (#8927)

Close #8925

* [ISSUES#8905]simplify some code (#8908)

* refactor: 💡 update console-ui theme (#8951)

✅ Closes: #8950

* Update IoUtils.java (#8948)

An IOException has been catch,so throws IOException Is invalid

* [ISSUE #8931] Fix bug :BatchInstanceData cannot Serializable question (#8940)

* [fix] fix BatchInstanceData cannot Serializable question

* fix update serialVersionUID auto generate

* [ISSUE #8925] fix that the replaceAll operation is invalid (#8929)

Close #8925

* fix #8947. (#8959)

* judge endpoint

* add some junit test (#8966)

* add some junit test

* fix some junit

* add license

* optimize: internationalization of product description content on landing pages (#8956)

* Improve code specifications. (#8965)

Flip the call to equals method to avoid null pointer exception.

* fix LookupFactoryTest  ut / ci (#8985)

* fix ci

* run ci

* check cla report

* check style

* add some auth plugin test (#8988)

* add some auth plugin test

* ru ci

* remove namespaceShowName uniqueness check (#8989)

* add unit test for ReflectUtils (#8999)

* add unit test for ReflectUtils

* reformat code

* [ISSUE #8993]Close input stream and output stream by try with resource[nacos-common] (#8997)

* [ISSUE #8993]Close input stream and output stream by try with resource[nacos-common]

* [ISSUE #8993]Close input stream and output stream by try with resource[nacos-common]

* [ISSUE #8993]Close input stream and output stream by try with resource[nacos-common]

* add some utils UT (#9006)

add some utils UT

* Fix grpc push data not filter by cluster. (#9019)

* [#344] rename initialization sql files (#8969)

* [ISSUE #9014] performance optimization--refacte TpsMonitorPoint (#9021)

* performance optimization

* fix check style

* fix test unit

* fix test unit for `getTimeFormatOfSecond` method.

* fix unit test  for LimiterTest.

* fix error usage case for asserEquals method;eliminate interactions between test methods

* Fix spelling mistakes. (#9026)

* [ISSUE #9013] enhance grpc client (#9017)

* fix issue #9013

* reformat code style

* reformat code style

* reformat code style

* reformat code style

* reformat code style

* reformat code style

* reformat code style

* change config name

* do some enhance

* add queue size to configProperties

* reformat code style

* Change configuration load order

* Fix ServerListMgr is not shutdown. (#9048)

* set server.error.include-message to ALWAYS (#9045)

* [ISSUE #8934] add header back after convert request to jsonBytes (#8935)

* [ISSUE #9023] fix corner case config dataId 'cipher-' that cannot create (#9024)

* [ISSUE #9023] fix corner case config dataId 'cipher-' that cannot create

* [ISSUE #9023] remove unused import

* [ISSUE #9023] PMD fix

* [ISSUE #9023] add comments

* [ISSUE #9023] should return first token instead of any

* [ISSUE #9023] add more EncryptionHandler ut

* [ISSUE #9023] fix style

* [ISSUE #9023] fix style, keep indentation in blank line

Co-authored-by: KomachiSion <[email protected]>
Co-authored-by: 胡俊 <[email protected]>
Co-authored-by: MajorHe1 <[email protected]>
Co-authored-by: GuiShao <[email protected]>
Co-authored-by: ZhangShenao <[email protected]>
Co-authored-by: chenhao26 <[email protected]>
Co-authored-by: onewe <[email protected]>
Co-authored-by: 胡俊 <[email protected]>
Co-authored-by: liushaoyu-soft <[email protected]>
Co-authored-by: heimanba <[email protected]>
Co-authored-by: 无处不在 <[email protected]>
Co-authored-by: Weizhan Yun <[email protected]>
Co-authored-by: liaochuntao <[email protected]>
Co-authored-by: @xiaochangbai <[email protected]>
Co-authored-by: shiherua <[email protected]>
Co-authored-by: Karson <[email protected]>
Co-authored-by: yjqg6666 <[email protected]>
Co-authored-by: 阿魁 <[email protected]>
Co-authored-by: wuwen <[email protected]>
Co-authored-by: hutt <[email protected]>
@shanlongmei
Copy link
Author

shanlongmei commented Oct 9, 2022 via email

@wuchubuzai2018
Copy link
Contributor

您好, 看到您的PR已经被采用了。>

你下载源码后,执行打包的命令即可。
mvn -Prelease-nacos -Dmaven.test.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true -Drat.skip=true clean install -U

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants